PERF-DAEMON(1)

πŸŽ€ perf-daemon(1) β€” your fave background record-session wrangler πŸŽ€

okay bestie, welcome to perf daemon, straight out of the perf Manual ✨ β€” this is one of those pages you read once and then keep in your back pocket forever, iykyk πŸ’…


✨ NAME ✨

perf-daemon β€” run record sessions in the background, lowkey doing the most so you don't have to 🫢


🌸 SYNOPSIS 🌸

perf daemon
perf daemon [<options>]
perf daemon start  [<options>]
perf daemon stop   [<options>]
perf daemon signal [<options>]
perf daemon ping   [<options>]

πŸ¦‹ DESCRIPTION πŸ¦‹

This command lets you run a simple little daemon process that starts and monitors your configured record sessions. It's giving "manager who actually does their job" energy, ngl πŸ‘‘

Think of perf daemon as a background process with several perf record child tasks hanging out under it, like so:

# ps axjf
...
     1  916507 ... perf daemon start
916507  916508 ...  \_ perf record --control=fifo:control,ack -m 10M -e cycles --overwrite --switch-output -a
916507  916509 ...  \_ perf record --control=fifo:control,ack -m 20M -e sched:* --overwrite --switch-output -a

Not every perf record session is suitable for running under the daemon, bestie β€” so listen up πŸ“’ You need a perf session that either produces data on query (like the flight-recorder sessions in the example above 🌈) or one that's configured to produce data periodically, like with the --switch-output configuration for time and size β°πŸ“¦

Each session is started with control setup β€” that's the perf record --control options, no cap.

Sessions are configured through a config file, so peek at the CONFIG FILE section plus the EXAMPLES πŸ’–


πŸ’… OPTIONS πŸ’…

  • -v, --verbose β€” be more verbose. yes, more talking, more info, we love that for us πŸ—£οΈβœ¨
  • --config=<PATH> β€” the config file path. If you don't provide one, perf checks the system and default locations (/etc/perfconfig, $HOME/.perfconfig) πŸ”
  • --base=<PATH> β€” the base directory path. Each daemon instance runs on top of a base directory. Only one instance of the server can run on top of one directory at a time β€” so play nice, no sharing πŸš«πŸ‘―

All generic options are available also under the commands. cute, right? πŸ’œ


πŸš€ START COMMAND πŸš€

The start command creates the daemon process. main character energy fr fr πŸ‘‘

  • -f, --foreground β€” do not put the process in the background. it stays right there with you, holding your hand 🫢

πŸ›‘ STOP COMMAND πŸ›‘

The stop command stops all the sessions and the daemon process. it's the "okay everyone go home" moment πŸ’€


πŸ“‘ SIGNAL COMMAND πŸ“‘

The signal command sends a signal to configured sessions. pew pew ✨

  • --session β€” send the signal to a specific session. just the one, not the whole group chat πŸ™ˆ

🩺 PING COMMAND 🩺

The ping command sends a control ping to configured sessions. wellness check time bestie 🌸

  • --session β€” send the ping to a specific session. one-on-one, very intimate πŸŽ€

πŸŽ€ CONFIG FILE πŸŽ€

The daemon is configured inside the standard perf config file using these new variables:

  • daemon.base β€” base path for daemon data. All sessions' data is stored under this path πŸ“
  • session-<NAME>.run β€” defines a new record session. The value is the record's command line without the record keyword πŸ‘€

Each perf record session is run in the daemon.base/<NAME> directory. neat, organized, iconic 🧚


🌟 EXAMPLES 🌟

Example with 2 record sessions:

# cat ~/.perfconfig
[daemon]
base=/opt/perfdata

[session-cycles]
run = -m 10M -e cycles --overwrite --switch-output -a

[session-sched]
run = -m 20M -e sched:* --overwrite --switch-output -a

Starting the daemon:

# perf daemon start

Check sessions:

# perf daemon
[603349:daemon] base: /opt/perfdata
[603350:cycles] perf record -m 10M -e cycles --overwrite --switch-output -a
[603351:sched] perf record -m 20M -e sched:* --overwrite --switch-output -a

The first line is the daemon process info with the configured daemon base. see it? that's the boss line πŸ‘‘

Check sessions with more info:

# perf daemon -v
[603349:daemon] base: /opt/perfdata
  output:  /opt/perfdata/output
  lock:    /opt/perfdata/lock
  up:      1 minutes
[603350:cycles] perf record -m 10M -e cycles --overwrite --switch-output -a
  base:    /opt/perfdata/session-cycles
  output:  /opt/perfdata/session-cycles/output
  control: /opt/perfdata/session-cycles/control
  ack:     /opt/perfdata/session-cycles/ack
  up:      1 minutes
[603351:sched] perf record -m 20M -e sched:* --overwrite --switch-output -a
  base:    /opt/perfdata/session-sched
  output:  /opt/perfdata/session-sched/output
  control: /opt/perfdata/session-sched/control
  ack:     /opt/perfdata/session-sched/ack
  up:      1 minutes

So here's the tea β˜• the base path is the daemon/session base. The lock file is the daemon's lock file, guarding that no other daemon is running on top of the base β€” it's literally the bouncer at the club πŸšͺπŸ’… The output file is the perf record output for that specific session. The control and ack files are perf control files. And the up number shows how many minutes the daemon/session has been running ⏱️

Make sure the control session is online:

# perf daemon ping
OK   cycles
OK   sched

Send USR2 signal to session cycles to generate a perf.data file:

# perf daemon signal --session cycles
signal 12 sent to session 'cycles [603452]'

# tail -2  /opt/perfdata/session-cycles/output
[ perf record: dump data: Woken up 1 times ]
[ perf record: Dump perf.data.2020123017013149 ]

Send USR2 signal to all sessions (go big or go home πŸ”₯):

# perf daemon signal
signal 12 sent to session 'cycles [603452]'
signal 12 sent to session 'sched [603453]'

# tail -2  /opt/perfdata/session-cycles/output
[ perf record: dump data: Woken up 1 times ]
[ perf record: Dump perf.data.2020123017024689 ]
# tail -2  /opt/perfdata/session-sched/output
[ perf record: dump data: Woken up 1 times ]
[ perf record: Dump perf.data.2020123017024713 ]

Stop daemon:

# perf daemon stop

πŸ‘€ SEE ALSO πŸ‘€

perf-record(1), perf-config(1) β€” your next reads, bestie, go click them πŸ“šπŸ’–


that's the whole page, mwah πŸ’‹ β€” with love from the perf manual, version dated 10/31/2026, PERF-DAEMON(1) and all πŸŽ€βœ¨πŸ¦‹

πŸ“¦ where this page comes from