Admins can gather the ºÚÁϺ£½Ç91Èë¿Ú Agent log manually or through the Admin Portal by downloading the logs under the Actions menu of the target device. However, it’s also possible to view the logs using Commands within ºÚÁϺ£½Ç91Èë¿Ú. The following examples show how to read the Agent log on different operating systems.
Agent logs may exceed the 1MB size limitation of ºÚÁϺ£½Ç91Èë¿Ú Commands, resulting in a truncated log. The following examples are designed to return the last 1MB (most recent portion) of the log if it exceeds that limitation.
Viewing the Windows Agent Log
- From DEVICE MANAGEMENT > Commands, click +, then click Command.
- For Name, enter Read Windows Agent Log.
- For Type, select Windows.
- Check the Windows PowerShell option.
- Paste the following in the Command field:
Get-Content -Path C:\Windows\Temp\jcagent.log -Tail 8000
- Under the Device Groups and Devices tabs, select the devices on which the command will run and click save.
- From the commands list view, select the command you just created and click Run Now.
- The command will execute with a Command Running... message. Wait at least two minutes for the command to run and create a readable result.
- From the Commands page, click the Results tab to see the command output. Click view on the appropriate command result to open the Command Result Details and view the log.
Viewing the macOS Log
- From DEVICE MANAGEMENT > Commands, click +, then click Command.
- For Name, enter Read macOS Agent Log.
- Under Run As, select root.
- For Type, select Mac.
- Paste the following in the Command field:
tail -c 1048576 /var/log/jcagent.log
- Under the Device Groups and Devices tabs, select the devices on which the command will run and click save.
- From the commands list view, select the command you just created and click Run Now.
- The command will execute with a Command Running... message. Wait at least two minutes for the command to run and create a readable result.
- From the Commands page, click the Results tab to see the command output. Click view on the appropriate command result to open the Command Result Details and view the log.
Viewing the Linux Agent Log
- From DEVICE MANAGEMENT > Commands, click +, then click Command.
- For Name, enter Read Linux Agent Log.
- Under Run As, select sudo.
- For Type, select Linux.
- Paste the following in the Command field:
tail -c 1048576 /var/log/jcagent.log
- Under the Device Groups and Devices tabs, select the devices on which the command will run and click save.
- From the commands list view, select the command you just created and click Run Now.
- The command will execute with a Command Running... message. Wait at least two minutes for the command to run and create a readable result.
- From the Commands page, click the Results tab to see the command output. Click view on the appropriate command result to open the Command Result Details and view the log.