swXtch.io Support may also request for you to send cloudSwXtch logs. For more information, see How to View cloudSwXtch Logs for Troubleshooting.
Locating xNIC Logs
An xNIC installed on a virtual machine creates one .log file per day with the following naming structure: swxtch-xnic-YYYYMMDD.log. 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 your logs, use the following file paths:
Windows
- C:\Users\Public\swx\logs\xnic-control
- C:\Users\Public\swx\logs\xnic-data
Linux
- /var/log/swx/xnic-control
- /var/log/swx/xnic-data
For Linux, logs can also be viewed by using either journalctl examples below:
xnic-control
sudo journalctl -u swxtch-xnic-control -n 500 -f
xnic-data
sudo journalctl -u swxtch-xnic-data -n 500 -f
Please note: Standard journalctl arguments apply. The above examples use -n for number of lines and -f to follow.
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.
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 Swxtch-xNIC folder on the VM you have an xNIC installed. Make sure it is the xNIC you want logs for.
- C:\Program Files\SwXtch.io\Swxtch-xNIC
- C:\Program Files\SwXtch.io\Swxtch-xNIC
- Open the xnic.json file.
- For xNIC-Data, change the number next to "verbosity" so that it matches the level you desire. The default is 0.
- For xNIC-Control, modify the StatsReportWait to change the time in seconds of the report stats.
- Save and Close the json file.
- Open "Task Manager" and go to the "Services" tab towards the top of the window.
- To apply changes from the json file, scroll down to "swXtchNIC-Control" and right-click on it.
- Select"Restart."
- Please note: Only xNIC-Control has to be restarted to update both control and data logs.
- Please note: Only xNIC-Control has to be restarted to update both control and data logs.
Your 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 Bash terminal. Make sure it is on the xNIC you want logs for.Text
sudo nano /var/opt/swxtch/swxtch-xnic/swxtch-xnic.conf
- For xNIC-Data, change the number next to "verbose" so that it matches the level you desire. The default is 0.
- For xNIC-Control, modify the StatsReportWait to change the time in seconds of the report stats.
- Save and Exit the file.
- Restart your swxtch-xnic-control by using the following command. Please note: Only xNIC-Control has to be restarted to update both control and data logs. Text
sudo systemctl restart swxtch-xnic-control
Your 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.