Docs / Using the app

Actions

ProcessGuard observes by default. When you ask, it can slow a process down, pause it, quit it, stop a Time Machine backup or purge the file cache. A closed list of actions, each behind a switch, each logged.

The actions

ActionWhat it doesTargetDefaultFrom the CLI
Slow down / Restore speedRuns the process at background priority for CPU and disk (taskpolicy -b). Restore speed undoes it.One processOnAllowed
Force quitSIGTERM, then SIGKILL after 5 seconds if the same run is still alive. Unsaved work is lost.One processOnNot allowed
Pause / ResumeSIGSTOP and SIGCONT. A paused system service can hang other apps.One processOffNot allowed
Stop backuptmutil stopbackup. The backup resumes at the next scheduled time.The MacOnAllowed
Purge file cachepurge. Drops the file cache. It frees no app memory or swap, and the Mac is slower while the cache refills.The MacOffNot allowed

Change the defaults in Settings › Actions: one switch per action, and a CLI switch that allows it from pguard act.

Where you find them

Every action asks for confirmation and says what will happen, in the words of the table above.

Safety checks

The daemon checks every request, in this order:

  1. Who asks. The code signature of the caller, read from the socket's audit token. Only ProcessGuard's signed app and CLI may act. Any other client, root or admin included, may read but not act.
  2. The switch. The action must be on; from the CLI, its CLI switch must be on too.
  3. The exact run. A process action names a PID and its start time. A PID that now belongs to another program is refused.
  4. The protected list. Never PID 0 or 1, the daemon itself, core macOS processes, root system services, security agents or ProcessGuard.

Security agents are off limitsFor a scanner that your organization manages, ProcessGuard names the configuration profile and advises you to report repeated warnings to whoever manages the Mac. It never offers to slow down, pause or quit it.

The action log

Every attempt is logged with its outcome, refused ones included. The daemon keeps the last 10 000.

pguard actions log --limit 20
pguard actions settings     # what is on, what the CLI may run, how the daemon sees this caller

Examples

# Find the exact run first
pguard top --limit 5

# Slow it down, then restore it
pguard act background --pid 53056 --start-time 1210427116141
pguard act foreground --pid 53056 --start-time 1210427116141

# Stop a running Time Machine backup
pguard act stop-backup

A refused action exits with code 3 and says why: switched off, not allowed from the CLI, protected target, or a PID that belongs to another run.

Unsigned builds

A build that is not signed by ProcessGuard's team is not recognised as the app. Its Settings show: The daemon does not recognise this build as the signed app: actions and these settings are read-only.