How to View swXtchBridge Logs

Prev Next

WHAT TO EXPECT

In this article, users will learn how to access swXtchBridge logs for the purpose of troubleshooting. Common arguments that can be used when compiling information for the Support team at swXtch.io will also be discussed.

Support may also request for you to send xNIC logs. For more information, see How to Find xNIC Logs

swXtchBridge Service Logs

For log requests, the standard command, sudo journalctl -u can be used with either swxtch-bridge3-ctrl or swxtch-bridge3-data to get a detailed breakdown of swXtchBridge control or data service, respectively. 

For example: 

sudo journalctl -u swxtch-bridge3-ctrl

It is recommended to send logs to support@swxtch.io, covering 24 hours worth of time, starting form before the issue to up until now. 

Users can use any combination of arguments below to create their logs. 

Accessing and Following Logs (-f)

The following command will begin to display swXtchBridge logs at the time of the request. The -f argument will follow the logs and continually update. Logs prior to the call will not display. 

sudo journalctl -u <swxtch-bridge3-ctrl or swxtch-bridge3-data> -f

Note: You will have to select which swXtchBridge service you would like your logs for: control (swxtch-bridge3-ctrl) or data (swxtch-bridge3-data).

Example

sudo journalctl -u swxtch-bridge3-ctrl -n 200

Displaying Logs within a Timeframe (--since --until)

The following command will display logs within a set timeframe (between 2 dates). 

sudo journalctl - u <swxtch-bridge3-ctrl or swxtch-bridge3-data> --since <yyyy-mm-dd> --until <yyyy-mm-dd>

Example

sudo journalctl - u swxtch-bridge3-ctrl --since 2023-03-07 --until 2023-03-10

--since "Yesterday", "today", "now" 

You can also use the words "yesterday," "today", or "now" after --since to get logs from that time period. 

sudo journalctl - u swxtch-bridge3-ctrl --since yesterday

Displaying Logs since Last Boot (-b)

To display logs since last boot, users can use the -b argument. 

sudo journalctl -u swxtch-bridge3-ctrl -b

List boots (--list-boot)

The following argument can be used to list all the boots in date/time order. 

sudo journalctl -u swxtch-bridge3-ctrl --list-boot

Exporting Logs (>)

The following command will export your logs to a .txt file. Logs should be emailed to support@swxtch.io

sudo journalctl -u <swxtch-bridge3-ctrl or swxtch-bridge3-data> > <file-name>.txt

Example

sudo journalctl -u swxtch-bridge3-ctrl > cloudswxtch-test.txt

You can also combine arguments to export logs from a timeframe or from last boot. It is recommended that logs should cover 24 hours worth of time, starting from before the issue to up until now. 

Example

LAST BOOT:
sudo journalctl - u swxtch-bridge3-ctrl -b > cloudswxtch-test.txt

TIMEFRAME:
sudo journalctl - u swxtch-bridge3-ctrl --since 2023-03-07 --until 2023-03-10 > cloudswxtch-test.txt

Change Logs to UTC (--utc)

To switch logs from local time to UTC, use the following argument: 

sudo journalctl --utc