> 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/8.2-eol/cortex-xdr-agent-for-macos/troubleshooting-resources-for-mac/cytool-for-mac.md).

# Cytool for Mac

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

On Mac endpoints, 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. For the Cytool admin commands that require a password, the password is the same as is defined as the Uninstall password.

{% hint style="info" %}

### Note

Since Cortex XDR agent 7.6, the `pmd` process includes and replaces the `trapsd` process.
{% endhint %}

| Command Option      | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| ------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **`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 Cortex XDR agent console.</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>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| **`endpoint_tags`** | <p>Usage: <strong><code>sudo ./cytool endpoint\_tags </code></strong><em><strong><code>\<action></code></strong></em></p><p>where <em><strong><code>\<action></code></strong></em> can be:</p><ul><li><strong><code>add</code></strong>—To add tags to the endpoint tags.</li><li><strong><code>remove</code></strong>—Remove the given tags from the list of endpoint tags.</li><li><strong><code>list</code></strong>—Displays the available endpoint tags.</li></ul><div data-gb-custom-block data-tag="hint" data-style="info" class="hint hint-info"><p><strong>Note</strong></p><p>Tags should be passed as one string separated by comas.</p></div><p>For example:</p><ul><li><p><code>Traps-Mac:bin Traps$</code></p><p><strong><code>sudo ./cytool endpoint\_tags add "tag1 \[,tag2, ...,tagN]"</code></strong></p></li><li><p><code>Traps-Mac:bin Traps$</code></p><p><strong><code>sudo ./cytool endpoint\_tags remove "tag1 \[,tag2, ...,tagN]"</code></strong></p></li><li><p><code>Traps-Mac:bin Traps$</code></p><p><strong><code>sudo ./cytool endpoint\_tags list</code></strong></p></li></ul>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| **`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 User1 Mail 2099 User2</code></p><div data-gb-custom-block data-tag="hint" data-style="info" class="hint hint-info"><p><strong>Note</strong></p><p>If you change the action mode for protected processes in the Exploit Security Profile in Cortex XDR, you must restart the protected processes for the security policy to be enforced on the processes and its forked processes, and only then you will see them on this list.</p></div>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| **`-h --help`**     | `Traps-Mac:bin Traps$`` `**`sudo ./cytool`**\` Usage: cytool cytool - Support tool Options: -h --help Display help information. enum List processes protected by Cortex XDR. startup query List startup status for Cortex XDR agent and daemons. startup \<enable                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| `import suex`       | Import pre-downloaded content or local support exceptions. Used for solving specific problems with a support representative.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| **`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 agent component: <strong><code>authorized</code></strong>, <strong><code>pmd</code></strong>, <strong><code>cortex xdr</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>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| **`opswat`**        | <p>Check the Cortex XDR agent status and version.</p><p>Usage: <strong><code>sudo ./cytool opswat \<parameter></code></strong></p><p>where <strong><code>\<parameter></code></strong> is:</p><ul><li><strong><code>version</code></strong>—Displays the version of the agent.</li><li><p><strong><code>installed</code></strong>—Displays the agent installation status:</p><p><code>true</code> if the com.paloaltonetworks.pkg.cortx xdr package is installed</p><p>or <code>false</code> if the package is not installed.</p><p>You must also supply the agent supervisor password to view the status.</p></li><li><strong><code>running</code></strong>—Displays the running status of agent daemons: true if running or false if not running.</li><li><strong><code>protected</code></strong>—Displays the applied policy status: true if applied or false if not applied.</li></ul><p><code>Traps-Mac:bin Traps$ </code><strong><code>sudo ./cytool opswat version</code></strong><code>8.1.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>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| **`persist`**       | <p>The Cortex XDR agent 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>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| **`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><p><em><strong><code>\<action></code></strong></em>—Change startup runtime action for an agent component.</p><p>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.</p></li><li><p><em><strong><code>\<component></code></strong></em>—Target component for which to set the runtime action, or all components if no components are specified.</p><p>To change the runtime action for multiple components, list them with spaces separating each component.</p><p>Options are: <strong><code>cortex xdr</code></strong>, <strong><code>authorized</code></strong>, <strong><code>pmd</code></strong>, <strong><code>kproc-ctrl</code></strong></p></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 cortex xdr 1055 User1 Running /Library/Application Support/PaloAltoNetworks/Traps/bin/cortex xdr.app/Contents/MacOS/cortex xdr 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 cortex xdr 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 cortex xdr.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 cortex xdr N/A N/A FAILED TO START N/A kproc-ctrl 160 root Loaded com.paloaltonetworks.driver.kproc-ctrl</code></p> |
| **`self_prot`**     | Query, enable, disable or return to policy the Cortex XDR agent anti-tampering protection.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| **`startup`**       | <p>Enable, disable, or query the startup state of Cortex XDR agent 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><p><em><strong><code>\<action></code></strong></em>—Change startup action for an agent component.</p><p>Options are: <strong><code>enable</code></strong>, <strong><code>disable</code></strong>, <strong><code>query</code></strong>.</p><p>The query option displays the startup status for each component.</p></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>cortex xdr</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 cortex xdr pmd</code></strong><code>Process name Startup status cortex xdr Disabled 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 cortex xdr Enabled authorized Enabled pmd Enabled kproc-ctrl Loaded</code></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>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |


---

# 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/8.2-eol/cortex-xdr-agent-for-macos/troubleshooting-resources-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.
