Locating xNIC Logs
An xNIC installed on a virtual machine creates one .log file per day with the following naming structure: swx-xnic.log.N (where N is a number from 1 to 9; when the system gets to the number 9, the next log will be 1). If the file size exceeds the maximum within the same day (16MB), it will be renamed by adding a counter as a suffix. Then, a new file will be created.
To find the logs, use the following file paths:
Windows
C:\Users\Public\swxtch\logs
Linux
/var/log/swxtch
For Linux, logs can also be viewed by using journalctl:
sudo journalctl -u swx-xnic -n 500 -fNOTE
Standard journalctl arguments apply (see How to View cloudSwXtch and swXtchBridge Logs for more details). The above examples use -n for number of lines and -f to follow.
Log File Deletion
Log files older than 30 days are automatically deleted.
What is verbosity?
Depending on the level of verbosity detailed in the xNIC config file, a log will contain different application messages and usage statistics. The default verbosity level after xNIC installation is 0, which means that no periodic statistics are being reported. It will only show start and stop information, as well as critical errors.
A user can change the verbosity to pull more information out from their xNIC. The levels are detailed below:
Level 0: Only show start and stop info as well as critical errors. This is the default.
Level 1: Shows statistics and IGMP messages
Level 2: Additional control messages
Level 3: Hexadecimal dumps of control/config packages
Level 4: Hexadecimal dumps of data packages
An average user would typically only need up to Level 2 for troubleshooting issues with their xNIC.
Verbosity and File Size
Please note that increasing the verbosity level of future logs will result in larger file sizes. It is recommended to revert back to the default Level 0 when testing and troubleshooting are complete.
How to Change Verbosity
To change the verbosity, a user can manually edit the xNIC config file on their VM.
For Windows:
Go to the swx-xnic folder on the VM where the xNIC is installed:
C:\Program Files\SwXtch.io\swx-xnic\swx-xnic-config.json
Open the
swx-xnic-config.jsonfile.Change the number next to "verbosity" so that it matches the level you desire. The default is 0.

Save and Close the JSON file.
Open "Task Manager" and go to the "Services" tab at the top right of the window.
To apply changes from the JSON file, scroll down to "swx-xnic-service" and right-click on it.
Select Restart.

The selection in verbosity will now be applied to future logs. This should only be changed if directed by swXtch.io, and ensure that they are set back to default when troubleshooting is complete.
For Linux:
Enter the following command to view your config file in the terminal. Make sure it is on the xNIC you want logs for.
sudo nano /var/opt/swxtch/swx-xnic-config.jsonLook for "verbosity" line and change the value to match the desired level. The default is 0.
Save and Exit the file (CTRL+X, then hit “Y”, then “Enter”)
Restart the swx-xnic service by using the following command
sudo systemctl restart swx-xnic
The selection in verbosity will now be applied to future logs. This should only be changed if directed by swXtch.io, and ensure that they are set back to default when troubleshooting is complete.
PRO-TIP
Users can rename the existing log file before restarting the xNIC service in order to differentiate it from the freshly generated log file containing the new verbosity data.