View Agent Logs Using Commands

Admins can gather the JumpCloud 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 JumpCloud. The following examples show how to read the Agent log on different operating systems.

Note:

Agent logs may exceed the 1MB size limitation of JumpCloud 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

  1. From DEVICE MANAGEMENT > Commands, click +, then click Command.
  2. For Name, enter Read Windows Agent Log.
  3. For Type, select Windows.
  4. Check the Windows PowerShell option.
  5. Paste the following in the Command field:

Get-Content -Path C:\Windows\Temp\jcagent.log -Tail 8000

  1. Under the Device Groups and Devices tabs, select the devices on which the command will run and click save.
  2. From the commands list view, select the command you just created and click Run Now.
  3. The command will execute with a Command Running… message. Wait at least two minutes for the command to run and create a readable result.
  4. 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

  1. From DEVICE MANAGEMENT > Commands, click +, then click Command.
  2. For Name, enter Read macOS Agent Log.
  3. Under Run As, select root.
  4. For Type, select Mac.
  5. Paste the following in the Command field:

tail -c 1048576 /var/log/jcagent.log

  1. Under the Device Groups and Devices tabs, select the devices on which the command will run and click save.
  2. From the commands list view, select the command you just created and click Run Now.
  3. The command will execute with a Command Running… message. Wait at least two minutes for the command to run and create a readable result.
  4. 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

  1. From DEVICE MANAGEMENT > Commands, click +, then click Command.
  2. For Name, enter Read Linux Agent Log.
  3. Under Run As, select sudo.
  4. For Type, select Linux.
  5. Paste the following in the Command field:

tail -c 1048576 /var/log/jcagent.log

  1. Under the Device Groups and Devices tabs, select the devices on which the command will run and click save.
  2. From the commands list view, select the command you just created and click Run Now.
  3. The command will execute with a Command Running… message. Wait at least two minutes for the command to run and create a readable result.
  4. 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.
Back to Top

List IconIn this Article

Still Have Questions?

If you cannot find an answer to your question in our FAQ, you can always contact us.

Submit a Case