{"id":103498,"date":"2024-01-12T12:44:00","date_gmt":"2024-01-12T17:44:00","guid":{"rendered":"https:\/\/jumpcloud.com\/?post_type=support&p=103498"},"modified":"2024-03-26T16:00:02","modified_gmt":"2024-03-26T20:00:02","slug":"view-agent-logs-using-commands","status":"publish","type":"support","link":"https:\/\/jumpcloud.com\/support\/view-agent-logs-using-commands","title":{"rendered":"View Agent Logs Using Commands"},"content":{"rendered":"\n

Admins can gather the 探花大神 Agent log manually or through the Admin Portal by downloading the logs under the Actions menu of the target device. However, it\u2019s also possible to view the logs using Commands within 探花大神. The following examples show how to read the Agent log on different operating systems.<\/p>\n\n\n\n

<\/p><\/div>

Note:<\/strong> \n

Agent logs may exceed the 1MB size limitation of 探花大神 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. <\/p>\n <\/div><\/div><\/div><\/div>\n\n\n\n

Viewing the Windows Agent Log<\/h2>\n\n\n\n
    \n
  1. From DEVICE MANAGEMENT<\/strong> > Commands<\/strong>, click +<\/strong>, then click Command<\/strong>.<\/li>\n\n\n\n
  2. For Name<\/strong>, enter Read Windows Agent Log<\/strong>. <\/li>\n\n\n\n
  3. For Type<\/strong>, select Windows<\/strong>.<\/li>\n\n\n\n
  4. Check the Windows PowerShell<\/strong> option.<\/li>\n\n\n\n
  5. Paste the following in the Command<\/strong> field:<\/li>\n<\/ol>\n\n\n\n
    \n

    Get-Content -Path C:\\Windows\\Temp\\jcagent.log -Tail 8000<\/p>\n<\/div><\/div>\n\n\n\n

    \"\"<\/figure>\n\n\n\n
      \n
    1. Under the Device Groups<\/strong> and Devices<\/strong> tabs, select the devices on which the command will run and click save<\/strong>.<\/li>\n\n\n\n
    2. From the commands list view, select the command you just created and click Run Now<\/strong>.<\/li>\n\n\n\n
    3. The command will execute with a Command Running…<\/strong> message. Wait at least two minutes for the command to run and create a readable result. <\/li>\n\n\n\n
    4. From the Commands page, click the Results<\/strong> tab to see the command output. Click view<\/strong> on the appropriate command result to open the Command Result Details and view the log.<\/li>\n<\/ol>\n\n\n\n

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

        tail -c 1048576 \/var\/log\/jcagent.log<\/p>\n<\/div><\/div>\n\n\n\n

          \n
        1. Under the Device Groups<\/strong> and Devices<\/strong> tabs, select the devices on which the command will run and click save<\/strong>.<\/li>\n\n\n\n
        2. From the commands list view, select the command you just created and click Run Now<\/strong>.<\/li>\n\n\n\n
        3. The command will execute with a Command Running…<\/strong> message. Wait at least two minutes for the command to run and create a readable result. <\/li>\n\n\n\n
        4. From the Commands page, click the Results<\/strong> tab to see the command output. Click view<\/strong> on the appropriate command result to open the Command Result Details and view the log.<\/li>\n<\/ol>\n\n\n\n

          Viewing the Linux Agent Log<\/h2>\n\n\n\n
            \n
          1. From DEVICE MANAGEMENT<\/strong> > Commands<\/strong>, click +<\/strong>, then click Command<\/strong>.<\/li>\n\n\n\n
          2. For Name<\/strong>, enter Read Linux Agent Log<\/strong>. <\/li>\n\n\n\n
          3. Under Run As<\/strong>, select sudo<\/strong>.<\/li>\n\n\n\n
          4. For Type<\/strong>, select Linux<\/strong>.<\/li>\n\n\n\n
          5. Paste the following in the Command<\/strong> field:<\/li>\n<\/ol>\n\n\n\n
            \n

            tail -c 1048576 \/var\/log\/jcagent.log<\/p>\n<\/div><\/div>\n\n\n\n

              \n
            1. Under the Device Groups<\/strong> and Devices<\/strong> tabs, select the devices on which the command will run and click save<\/strong>.<\/li>\n\n\n\n
            2. From the commands list view, select the command you just created and click Run Now<\/strong>.<\/li>\n\n\n\n
            3. The command will execute with a Command Running…<\/strong> message. Wait at least two minutes for the command to run and create a readable result. <\/li>\n\n\n\n
            4. From the Commands page, click the Results<\/strong> tab to see the command output. Click view<\/strong> on the appropriate command result to open the Command Result Details and view the log.<\/li>\n<\/ol>\n","protected":false},"excerpt":{"rendered":"

              Admins can gather the 探花大神 Agent log manually or through the Admin Portal by downloading the logs under the Actions […]<\/p>\n","protected":false},"author":206,"featured_media":0,"template":"","meta":{"_acf_changed":false,"_oasis_is_in_workflow":0,"_oasis_original":0,"_oasis_task_priority":"2normal","inline_featured_image":false,"footnotes":""},"support_category":[2923,3161,2895,2852,3127],"support_tag":[],"coauthors":[2842],"acf":[],"yoast_head":"\nView Agent Logs Using Commands - 探花大神<\/title>\n<meta name=\"description\" content=\"Learn how to leverage 探花大神 Commands to retrieve and view Agent logs on Mac, Windows, and Linux machines.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/jumpcloud.com\/support\/view-agent-logs-using-commands\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"View Agent Logs Using Commands\" \/>\n<meta property=\"og:description\" content=\"Browse the 探花大神 Help Center by category, search for a specific topic, or check out our featured articles.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/jumpcloud.com\/support\/view-agent-logs-using-commands\" \/>\n<meta property=\"og:site_name\" content=\"探花大神\" \/>\n<meta property=\"article:modified_time\" content=\"2024-03-26T20:00:02+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/jumpcloud.com\/wp-content\/uploads\/2024\/01\/get-agent-command-win-1024x406.png\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"2 minutes\" \/>\n\t<meta name=\"twitter:label2\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data2\" content=\"Pam Kellman\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/jumpcloud.com\/support\/view-agent-logs-using-commands\",\"url\":\"https:\/\/jumpcloud.com\/support\/view-agent-logs-using-commands\",\"name\":\"View Agent Logs Using Commands - 探花大神\",\"isPartOf\":{\"@id\":\"https:\/\/jumpcloud.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/jumpcloud.com\/support\/view-agent-logs-using-commands#primaryimage\"},\"image\":{\"@id\":\"https:\/\/jumpcloud.com\/support\/view-agent-logs-using-commands#primaryimage\"},\"thumbnailUrl\":\"https:\/\/jumpcloud.com\/wp-content\/uploads\/2024\/01\/get-agent-command-win-1024x406.png\",\"datePublished\":\"2024-01-12T17:44:00+00:00\",\"dateModified\":\"2024-03-26T20:00:02+00:00\",\"description\":\"Learn how to leverage 探花大神 Commands to retrieve and view Agent logs on Mac, Windows, and Linux machines.\",\"breadcrumb\":{\"@id\":\"https:\/\/jumpcloud.com\/support\/view-agent-logs-using-commands#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/jumpcloud.com\/support\/view-agent-logs-using-commands\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/jumpcloud.com\/support\/view-agent-logs-using-commands#primaryimage\",\"url\":\"https:\/\/jumpcloud.com\/wp-content\/uploads\/2024\/01\/get-agent-command-win.png\",\"contentUrl\":\"https:\/\/jumpcloud.com\/wp-content\/uploads\/2024\/01\/get-agent-command-win.png\",\"width\":1276,\"height\":506},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/jumpcloud.com\/support\/view-agent-logs-using-commands#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/jumpcloud.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Support\",\"item\":\"https:\/\/jumpcloud.com\/support\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"View Agent Logs Using Commands\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/jumpcloud.com\/#website\",\"url\":\"https:\/\/jumpcloud.com\/\",\"name\":\"探花大神\",\"description\":\"Daily insights on directory services, IAM, LDAP, identity security, SSO, system management (Mac, Windows, Linux), networking, and the cloud.\",\"publisher\":{\"@id\":\"https:\/\/jumpcloud.com\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/jumpcloud.com\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/jumpcloud.com\/#organization\",\"name\":\"探花大神\",\"url\":\"https:\/\/jumpcloud.com\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/jumpcloud.com\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/jumpcloud.com\/wp-content\/uploads\/2021\/01\/jc-logo-brand-2021.png\",\"contentUrl\":\"https:\/\/jumpcloud.com\/wp-content\/uploads\/2021\/01\/jc-logo-brand-2021.png\",\"width\":598,\"height\":101,\"caption\":\"探花大神\"},\"image\":{\"@id\":\"https:\/\/jumpcloud.com\/#\/schema\/logo\/image\/\"}}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"View Agent Logs Using Commands - 探花大神","description":"Learn how to leverage 探花大神 Commands to retrieve and view Agent logs on Mac, Windows, and Linux machines.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/jumpcloud.com\/support\/view-agent-logs-using-commands","og_locale":"en_US","og_type":"article","og_title":"View Agent Logs Using Commands","og_description":"Browse the 探花大神 Help Center by category, search for a specific topic, or check out our featured articles.","og_url":"https:\/\/jumpcloud.com\/support\/view-agent-logs-using-commands","og_site_name":"探花大神","article_modified_time":"2024-03-26T20:00:02+00:00","og_image":[{"url":"https:\/\/jumpcloud.com\/wp-content\/uploads\/2024\/01\/get-agent-command-win-1024x406.png"}],"twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"2 minutes","Written by":"Pam Kellman"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/jumpcloud.com\/support\/view-agent-logs-using-commands","url":"https:\/\/jumpcloud.com\/support\/view-agent-logs-using-commands","name":"View Agent Logs Using Commands - 探花大神","isPartOf":{"@id":"https:\/\/jumpcloud.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/jumpcloud.com\/support\/view-agent-logs-using-commands#primaryimage"},"image":{"@id":"https:\/\/jumpcloud.com\/support\/view-agent-logs-using-commands#primaryimage"},"thumbnailUrl":"https:\/\/jumpcloud.com\/wp-content\/uploads\/2024\/01\/get-agent-command-win-1024x406.png","datePublished":"2024-01-12T17:44:00+00:00","dateModified":"2024-03-26T20:00:02+00:00","description":"Learn how to leverage 探花大神 Commands to retrieve and view Agent logs on Mac, Windows, and Linux machines.","breadcrumb":{"@id":"https:\/\/jumpcloud.com\/support\/view-agent-logs-using-commands#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/jumpcloud.com\/support\/view-agent-logs-using-commands"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/jumpcloud.com\/support\/view-agent-logs-using-commands#primaryimage","url":"https:\/\/jumpcloud.com\/wp-content\/uploads\/2024\/01\/get-agent-command-win.png","contentUrl":"https:\/\/jumpcloud.com\/wp-content\/uploads\/2024\/01\/get-agent-command-win.png","width":1276,"height":506},{"@type":"BreadcrumbList","@id":"https:\/\/jumpcloud.com\/support\/view-agent-logs-using-commands#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/jumpcloud.com\/"},{"@type":"ListItem","position":2,"name":"Support","item":"https:\/\/jumpcloud.com\/support"},{"@type":"ListItem","position":3,"name":"View Agent Logs Using Commands"}]},{"@type":"WebSite","@id":"https:\/\/jumpcloud.com\/#website","url":"https:\/\/jumpcloud.com\/","name":"探花大神","description":"Daily insights on directory services, IAM, LDAP, identity security, SSO, system management (Mac, Windows, Linux), networking, and the cloud.","publisher":{"@id":"https:\/\/jumpcloud.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/jumpcloud.com\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/jumpcloud.com\/#organization","name":"探花大神","url":"https:\/\/jumpcloud.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/jumpcloud.com\/#\/schema\/logo\/image\/","url":"https:\/\/jumpcloud.com\/wp-content\/uploads\/2021\/01\/jc-logo-brand-2021.png","contentUrl":"https:\/\/jumpcloud.com\/wp-content\/uploads\/2021\/01\/jc-logo-brand-2021.png","width":598,"height":101,"caption":"探花大神"},"image":{"@id":"https:\/\/jumpcloud.com\/#\/schema\/logo\/image\/"}}]}},"_links":{"self":[{"href":"https:\/\/jumpcloud.com\/wp-json\/wp\/v2\/support\/103498"}],"collection":[{"href":"https:\/\/jumpcloud.com\/wp-json\/wp\/v2\/support"}],"about":[{"href":"https:\/\/jumpcloud.com\/wp-json\/wp\/v2\/types\/support"}],"author":[{"embeddable":true,"href":"https:\/\/jumpcloud.com\/wp-json\/wp\/v2\/users\/206"}],"version-history":[{"count":3,"href":"https:\/\/jumpcloud.com\/wp-json\/wp\/v2\/support\/103498\/revisions"}],"predecessor-version":[{"id":107896,"href":"https:\/\/jumpcloud.com\/wp-json\/wp\/v2\/support\/103498\/revisions\/107896"}],"wp:attachment":[{"href":"https:\/\/jumpcloud.com\/wp-json\/wp\/v2\/media?parent=103498"}],"wp:term":[{"taxonomy":"support_category","embeddable":true,"href":"https:\/\/jumpcloud.com\/wp-json\/wp\/v2\/support_category?post=103498"},{"taxonomy":"support_tag","embeddable":true,"href":"https:\/\/jumpcloud.com\/wp-json\/wp\/v2\/support_tag?post=103498"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/jumpcloud.com\/wp-json\/wp\/v2\/coauthors?post=103498"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}