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 therecordkeyword π
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
- arch rolling: perf 7.3.1-1 Β· GPL-2.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms