View Server Logs
Table of Contents
- Viewing Server Logs shows the last interaction with the server. This can be a useful debugging tool.
- This shows all of the logs for the day of the last connection.
- Logs are highly summarized.
- If no logs are shown, the device may not have connected, or connected a long time ago.
3rd Party Direct Users
Please note that Server Logs can not be viewed on Device Manager (OEM server) if the devices are using the third party direct/option 4 integration method.
Click on details (1) for the device in question:
Go to the Logs tab. Click on View Server Logs (Last Connected Date) (1)
- Date and Time of each record
- The action that the server took
- Commits show
- the connector used in [square brackets],
- the Result: true if connected server accepted the records. False if the connected server rejected the records
- the Duration of the operation
- and how many records were sent in how many uploads. eg: 1r in 1u = 1 record in 1 upload.
Interpreting Logs
Successful Commit
"Commit" in Device Manager is when the device gets an ok response back from the end server, confirming that it has received all records. The server log image shown above is an example of a successful commit. It has the device serial number, the date and time of the record, connector used (marked in square brackets), the number of records uploaded and the result.
Socket Disposed
When an asset in on the move, it may come to areas with poor or marginal cellular coverage. The device might still be able to connect to the network and Device Manager and will try to upload. Since its in marginal coverage, the connection may drop before the full upload completes. We may then see a difference in the "Since Connected" and "Since Committed", and the server logs will mark this as "Socket Disposed".
Shutdown while Busy With Commit
This log is generally generated by Device Manager when the connection between the end server and the device is terminated while the device tries to commit and waiting for a commit response. Some factors causing this will be
- End server rejecting the data
- An unresponsive server leading to timeout on the device
- Device signal issue - causing the connection to drop.
Other issues e.g. HTTP 401, HTTP 500
We may see 401 (Unauthorized) - or 500 (Server Not Found) indicating an issue on the server side.
Note
For our 'Edge' range of devices - the equivalent to server logs are the Forwarder logs - Please see this article to find out how to check forwarder logs for debugging.
Timeout
Each message is processed by one of 10 Device Manager instances. S0 → S9.
In the above screenshot - retrieving the log data from S8 and S9 timed out. Generally this is temporary and isn't related to the device. Does not point to an issue.
View Server Logs in Debug Terminal
NOTE: This is not available for devices on third-party direct mode.
This useful debugging feature shows the device/server interaction in real-time. It is more verbose than the logs visible here
Click on Details (yellow) for the device in question:
Go to the Debug Terminal tab. Select the server to be "ALL". Then view the updates live as they come in.
If the device is not currently connecting, nothing will be shown.
If the device does connect, note the following:
- Hello messages will be shown on initial connection. Look for the result from the connected platform. If the device is not known to the platform, it may be rejected and the connection closed.
- Version check messages will be shown. The device may download a slot based on these results
- Record uploads will be shown
If you lose connection to the server you will get a "wsocket error" – refresh the page.
Server Logs - GetDatedServerLog
One developer hack, is that when you are on the device detail page you can open the developer tools (F12) and type the following command in the console “GetDatedServerLog('7 July 2019')” this will print out the devices log on a date other than the “Last Connected Date”.