> For the complete documentation index, see [llms.txt](https://cortex-docs.paloaltonetworks.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://cortex-docs.paloaltonetworks.com/cortex-xdr-agent/5.0/traps-agent-5.0-for-mac/troubleshooting-resources-for-the-traps-agent-for-mac/cytool-for-mac.md).

# Cytool for Mac

Cytool is a command-line interface that is integrated into Traps that enables you to query and manage both basic and advanced functions of Traps. Any changes that you make using Cytool are active until Traps receives the next heartbeat communication from the Traps management service.

On Mac endpoints, you can access Cytool as a super user using a terminal. Cytool is located in the `/Library/Application Support/PaloAltoNetworks/Traps/bin` directory on the endpoint.

The following table displays the Cytool options available on Mac endpoints.

| Command Option  | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| --------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **`-h --help`** | `Traps-Mac:bin Traps$`` `**`sudo ./cytool`**\` Usage: cytool cytool - Support tool Options: -h --help Display help information. enum List processes protected by Traps. startup query List startup status for Traps agent and daemons. startup \<enable                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| **`enum`**      | <p>Enumerate protected processes.</p><p>Usage: <strong><code>sudo ./cytool enum</code></strong></p><p>For example:</p><p><code>Traps-Mac:bin Traps$ </code><strong><code>sudo ./cytool enum</code></strong><code> List of protected processes: Process name Process ID User Photos 2047 Traps Mail 2099 Traps</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| **`startup`**   | <p>Enable, disable, or query the startup state of Traps components.</p><p>Usage: <strong><code>sudo ./cytool startup </code></strong><em><strong><code>\<action></code></strong></em> <em><strong><code>\<component></code></strong></em></p><p>where:</p><ul><li><em><strong><code>\<action></code></strong></em> —Change startup action for a Traps component. Options are: <strong><code>enable</code></strong>, <strong><code>disable</code></strong>, <strong><code>query</code></strong>. The query option displays the startup status for each component.</li><li><em><strong><code>\<component></code></strong></em> —Target component for which to set the startup action. To change the startup action for multiple components, list them with spaces separating each component. Options are: <strong><code>traps\_agent</code></strong>, <strong><code>trapsd</code></strong>, <strong><code>authorized</code></strong>, <strong><code>pmd</code></strong>, <strong><code>kproc-ctrl</code></strong></li></ul><p>For example:</p><p><code>Traps-Mac:bin Traps$ </code><strong><code>sudo ./cytool startup disable traps\_agent pmd</code></strong><code>Process name Startup status traps\_agent Disabled trapsd Enabled authorized Enabled pmd Disabled kproc-ctrl Loaded Traps-Mac:bin Traps$</code><strong><code>sudo ./cytool startup enable all</code></strong><code>Process name Startup status traps\_agent Enabled trapsd Enabled authorized Enabled pmd Enabled kproc-ctrl Loaded</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| **`runtime`**   | <p>Stop or start product components.</p><p>Usage: <strong><code>sudo ./cytool runtime </code></strong><em><strong><code>\<action></code></strong></em> <em><strong><code>\<component></code></strong></em></p><p>where:</p><ul><li><em><strong><code>\<action></code></strong></em> —Change startup runtime action for a Traps component. Options are: <strong><code>start</code></strong>, <strong><code>stop</code></strong>, <strong><code>query</code></strong>. The query option displays the startup status for each component.</li><li><em><strong><code>\<component></code></strong></em> —Target component for which to set the runtime action, or all components if no components are specified. To change the runtime action for multiple components, list them with spaces separating each component. Options are: <strong><code>traps\_agent</code></strong>, <strong><code>trapsd</code></strong>, <strong><code>authorized</code></strong>, <strong><code>pmd</code></strong>, <strong><code>kproc-ctrl</code></strong></li></ul><p>For example:</p><p><code>Traps-Mac:bin Traps$ </code><strong><code>sudo ./cytool runtime query</code></strong><code>Name PID User Status Command traps\_agent 1055 Traps Running /Library/Application Support/PaloAltoNetworks/Traps/bin/traps\_agent.app/Contents/MacOS/traps\_agent trapsd 906 root Running /Library/Application Support/PaloAltoNetworks/Traps/bin/trapsd authorized 927 \_traps\_panw Running /Library/Application Support/PaloAltoNetworks/Traps/bin/authorized pmd 909 root Running /Library/Application Support/PaloAltoNetworks/Traps/bin/pmd kproc-ctrl 159 root Loaded com.paloaltonetworks.driver.kproc-ctrl Traps-Mac:bin Traps$</code><strong><code>sudo ./cytool runtime stop all</code></strong><code>Name PID User Status Command authorized N/A N/A STOPPED N/A pmd N/A N/A STOPPED N/A traps\_agent N/A N/A STOPPED N/A trapsd N/A N/A STOPPED N/A kproc-ctrl N/A N/A Unloaded N/A Traps-Mac:bin Traps$</code><strong><code>sudo ./cytool runtime start all</code></strong><code> Name PID User Status Command system call failed for command='/usr/bin/su -l Traps -c "/bin/launchctl start traps\_agent.plist"', returned status code=768 authorized 1883 \_traps\_panw Running /Library/Application Support/PaloAltoNetworks/Traps/bin/authorized pmd 1889 root Running /Library/Application Support/PaloAltoNetworks/Traps/bin/pmd traps\_agent N/A N/A FAILED TO START N/A trapsd 1901 root Running /Library/Application Support/PaloAltoNetworks/Traps/bin/trapsd kproc-ctrl 160 root Loaded com.paloaltonetworks.driver.kproc-ctrl</code></p> |
| **`persist`**   | <p>Traps stores policy and security event information such as the list of trusted signers, local verdicts, and one-time actions in local databases on the endpoint. To troubleshoot policy issues and security events, you can use cytool persist operations to import, export, and view information stored in the local database.</p><p>Usage: <strong><code>sudo ./cytool persist </code></strong><em><strong><code>\<action></code></strong></em></p><p>where <em><strong><code>\<action></code></strong></em> :</p><ul><li><strong><code>list</code></strong>—List the local databases on the endpoint.</li><li>\*\*<code>export </code><em><code>\[\<database name></code></em>\`</li></ul>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| **`log`**       | <p>Set log level for the desired process.</p><p>Usage: <strong><code>sudo ./cytool log \<log\_level> \<components></code></strong></p><p>where:</p><ul><li><p><code>\<log\_level></code> is an integer value corresponding to the log level:</p><ul><li>0—Disable logging</li><li>1—Fatal</li><li>2—Critical</li><li>3—Error</li><li>4—Warning</li><li>5—Notice</li><li>6—Information</li><li>7—Debug</li><li>8—Trace</li></ul></li><li><code>\<components></code> is <strong><code>all</code></strong> or one or more of the following Traps component: <strong><code>trapsd</code></strong>, <strong><code>authorized</code></strong>, <strong><code>pmd</code></strong>, <strong><code>traps\_agent</code></strong>, <strong><code>kproc-ctrl</code></strong>.</li></ul><p>For example:</p><p><code>Traps-Mac:bin Traps$ </code><strong><code>sudo ./cytool log 2 all</code></strong></p><p>Then use the <strong><code>sudo ./cytool log collect</code></strong> command to generate a support file archive of all logs in a TGZ file. On Mac endpoints running OS X 10.10 and OSX 10.11, Cytool outputs the logs to the <code>/var/log/traps</code> directory. On Mac endpoints running macOS 10.12, you can view logs from the Console application.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| **`wakeup`**    | <p>Wake up the endpoint from an OS incompatibility state.</p><p><code>Traps-Mac:bin Traps$ </code><strong><code>sudo ./cytool wakeup SIGTERM caught</code></strong></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| **`dump`**      | <p>Enable or disable dump generation or restore policy settings.</p><p><code>Traps-Mac:bin Traps$ </code><strong><code>sudo ./cytool dump enable</code></strong><code>Traps-Mac:bin Traps$</code><strong><code>sudo ./cytool dump disable</code></strong><code>Traps-Mac:bin Traps$</code><strong><code>sudo ./cytool dump restore</code></strong></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| **`checkin`**   | <p>Initiate check-in to the server.</p><p>Usage: <strong><code>sudo ./cytool checkin</code></strong></p><p>To verify the checkin, view the check-in time on the Traps console.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| **`opswat`**    | <p>Check Traps Agent status and version.</p><p>Usage: <strong><code>sudo ./cytool opswat \<parameter></code></strong></p><p>where <em><strong><code>\<parameter></code></strong></em> is:</p><ul><li><strong><code>version</code></strong>—Display the version of Traps.</li><li><strong><code>installed</code></strong>—Display the Traps installation status (<code>true</code> if the com.paloaltonetworks.pkg.traps package is installed or <code>false</code> if the package is not installed). You must also supply the Traps supervisor password to view the status.</li><li><strong><code>running</code></strong>—Display the running status of Traps daemons (true if running or false).</li><li><strong><code>protected</code></strong>—Display the applied policy status (true if applied or false).</li></ul><p><code>Traps-Mac:bin Traps$ </code><strong><code>sudo ./cytool opswat version</code></strong><code>5.0.0.1042 Traps-Mac:bin Traps$</code><strong><code>sudo ./cytool opswat installed</code></strong><code>Password: true Traps-Mac:bin Traps$</code><strong><code>sudo ./cytool opswat running</code></strong><code>true Traps-Mac:bin Traps$</code><strong><code>sudo ./cytool opswat protected</code></strong><code> true</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://cortex-docs.paloaltonetworks.com/cortex-xdr-agent/5.0/traps-agent-5.0-for-mac/troubleshooting-resources-for-the-traps-agent-for-mac/cytool-for-mac.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
