In this article, users will learn about the different arguments they can use with swxtch-where and example outputs they should expect.
swXtch-where Cloud Type
Below are the Linux and Windows commands to call swxtch-where. An empty command (without an argument) like the examples below will only return the cloud type.
Windows
For Windows VM, swxtch-where must be called from the xNIC directory and have the .exe extension.
PS C:\Program Files\SwXtch.io\Swxtch-xNIC2> .\swxtch-where.exe
Linux
For Linux VM, a user would only need to input the following:
swxtch-where
swxtch-where Format
What is probably the most useful option in the swxtch-where argument list is -f json or --format json, which provides users with a json of hardware-related information regarding the cloudSwXtch VM. This is information is similar to the Hardware view in swxtch-top and Hardware panel in wXcked Eye's Settings' General tab. It presents a breakdown of the control and data subnet with information categorized as either metadata or operating system.
Windows
PS C:\Program Files\SwXtch.io\Swxtch-xNIC2> .\swxtch-where.exe --format json
Linux
swxtch-where -f json
Example Output in Windows:
S C:\Program Files\SwXtch.io\Swxtch-xNIC2> .\swxtch-where.exe --format json
{
"cloudType": "AZURE",
"nics": [
{
"computed": {
"isPreferredControlNic": false,
"isPreferredDataNic": true,
"isSRIOV": false
},
"meta": {
"ipAddress": "10.5.1.7",
"ipBroadcast": "10.5.1.255",
"ipSubnet": "10.5.1.0",
"mac": "00:22:48:27:0e:dc",
"subnetMask": "255.255.255.0"
},
"os": {
"driver": "mlx5.sys",
"mac": "00:22:48:27:0e:dc",
"mtu": 1500,
"name": "Ethernet 261",
"pciAddress": "65025:00:02.0"
}
},
{
"computed": {
"isPreferredControlNic": true,
"isPreferredDataNic": false,
"isSRIOV": false
},
"meta": {
"ipAddress": "10.5.2.7",
"ipBroadcast": "10.5.2.255",
"ipSubnet": "10.5.2.0",
"mac": "00:22:48:27:07:14",
"subnetMask": "255.255.255.0"
},
"os": {
"driver": "netvsc.sys",
"ipAddress": "10.5.2.7",
"ipBroadcast": "10.5.2.255",
"ipSubnet": "10.5.2.0",
"mac": "00:22:48:27:07:14",
"mtu": 1500,
"name": "Ethernet",
"pciAddress": "",
"subnetMask": "255.255.255.0"
}
}
]
}
swxtch-where Version
Using the -v or --version argument after the swxtch-where command will return the version.
Example in Windows:
PS C:\Program Files\SwXtch.io\Swxtch-xNIC2> .\swxtch-where.exe -v
1.0
swxtch-where Help
The swXtch-where -h or --help argument provides users with a detailed list of available arguments.
Example in Windows:
PS C:\Program Files\SwXtch.io\Swxtch-xNIC2> .\swxtch-where.exe - h
Usage: C:\Program Files\SwXtch.io\Swxtch-xNIC2\swxtch-where.exe [options]
swxtch-where utility.
Calling with no arguments simply returns the cloud type.
Optional arguments:
-h --help shows help message and exits [default: false]
-v --version prints version information and exits [default: false]
-f --format output format (example: "json")