~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/tools/perf/Documentation/perf-daemon.txt

Version: ~ [ linux-6.12-rc7 ] ~ [ linux-6.11.7 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.60 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.116 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.171 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.229 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.285 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.323 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.12 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

Diff markup

Differences between /tools/perf/Documentation/perf-daemon.txt (Version linux-6.12-rc7) and /tools/perf/Documentation/perf-daemon.txt (Version linux-4.13.16)


  1 perf-daemon(1)                                    
  2 ==============                                    
  3                                                   
  4                                                   
  5 NAME                                              
  6 ----                                              
  7 perf-daemon - Run record sessions on backgroun    
  8                                                   
  9                                                   
 10 SYNOPSIS                                          
 11 --------                                          
 12 [verse]                                           
 13 'perf daemon'                                     
 14 'perf daemon' [<options>]                         
 15 'perf daemon start'  [<options>]                  
 16 'perf daemon stop'   [<options>]                  
 17 'perf daemon signal' [<options>]                  
 18 'perf daemon ping'   [<options>]                  
 19                                                   
 20                                                   
 21 DESCRIPTION                                       
 22 -----------                                       
 23 This command allows to run simple daemon proce    
 24 monitors configured record sessions.              
 25                                                   
 26 You can imagine 'perf daemon' of background pr    
 27 'perf record' child tasks, like:                  
 28                                                   
 29   # ps axjf                                       
 30   ...                                             
 31        1  916507 ... perf daemon start            
 32   916507  916508 ...  \_ perf record --control    
 33   916507  916509 ...  \_ perf record --control    
 34                                                   
 35 Not every 'perf record' session is suitable fo    
 36 User need perf session that either produces da    
 37 flight recorder sessions in above example or s    
 38 to produce data periodically, like with --swit    
 39 for time and size.                                
 40                                                   
 41 Each session is started with control setup (wi    
 42 options).                                         
 43                                                   
 44 Sessions are configured through config file, s    
 45 with EXAMPLES.                                    
 46                                                   
 47                                                   
 48 OPTIONS                                           
 49 -------                                           
 50 -v::                                              
 51 --verbose::                                       
 52         Be more verbose.                          
 53                                                   
 54 --config=<PATH>::                                 
 55         Config file path. If not provided, per    
 56         locations (/etc/perfconfig, $HOME/.per    
 57                                                   
 58 --base=<PATH>::                                   
 59         Base directory path. Each daemon insta    
 60         of base directory. Only one instance o    
 61         top of one directory at the time.         
 62                                                   
 63 All generic options are available also under c    
 64                                                   
 65                                                   
 66 START COMMAND                                     
 67 -------------                                     
 68 The start command creates the daemon process.     
 69                                                   
 70 -f::                                              
 71 --foreground::                                    
 72         Do not put the process in background.     
 73                                                   
 74                                                   
 75 STOP COMMAND                                      
 76 ------------                                      
 77 The stop command stops all the session and the    
 78                                                   
 79                                                   
 80 SIGNAL COMMAND                                    
 81 --------------                                    
 82 The signal command sends signal to configured     
 83                                                   
 84 --session::                                       
 85         Send signal to specific session.          
 86                                                   
 87                                                   
 88 PING COMMAND                                      
 89 ------------                                      
 90 The ping command sends control ping to configu    
 91                                                   
 92 --session::                                       
 93         Send ping to specific session.            
 94                                                   
 95                                                   
 96 CONFIG FILE                                       
 97 -----------                                       
 98 The daemon is configured within standard perf     
 99 following new variables:                          
100                                                   
101 daemon.base:                                      
102         Base path for daemon data. All session    
103         stored under this path.                   
104                                                   
105 session-<NAME>.run:                               
106         Defines new record session. The value     
107         line without the 'record' keyword.        
108                                                   
109 Each perf record session is run in daemon.base    
110                                                   
111                                                   
112 EXAMPLES                                          
113 --------                                          
114 Example with 2 record sessions:                   
115                                                   
116   # cat ~/.perfconfig                             
117   [daemon]                                        
118   base=/opt/perfdata                              
119                                                   
120   [session-cycles]                                
121   run = -m 10M -e cycles --overwrite --switch-    
122                                                   
123   [session-sched]                                 
124   run = -m 20M -e sched:* --overwrite --switch    
125                                                   
126                                                   
127 Starting the daemon:                              
128                                                   
129   # perf daemon start                             
130                                                   
131                                                   
132 Check sessions:                                   
133                                                   
134   # perf daemon                                   
135   [603349:daemon] base: /opt/perfdata             
136   [603350:cycles] perf record -m 10M -e cycles    
137   [603351:sched] perf record -m 20M -e sched:*    
138                                                   
139 First line is daemon process info with configu    
140                                                   
141                                                   
142 Check sessions with more info:                    
143                                                   
144   # perf daemon -v                                
145   [603349:daemon] base: /opt/perfdata             
146     output:  /opt/perfdata/output                 
147     lock:    /opt/perfdata/lock                   
148     up:      1 minutes                            
149   [603350:cycles] perf record -m 10M -e cycles    
150     base:    /opt/perfdata/session-cycles         
151     output:  /opt/perfdata/session-cycles/outp    
152     control: /opt/perfdata/session-cycles/cont    
153     ack:     /opt/perfdata/session-cycles/ack     
154     up:      1 minutes                            
155   [603351:sched] perf record -m 20M -e sched:*    
156     base:    /opt/perfdata/session-sched          
157     output:  /opt/perfdata/session-sched/outpu    
158     control: /opt/perfdata/session-sched/contr    
159     ack:     /opt/perfdata/session-sched/ack      
160     up:      1 minutes                            
161                                                   
162 The 'base' path is daemon/session base.           
163 The 'lock' file is daemon's lock file guarding    
164 daemon is running on top of the base.             
165 The 'output' file is perf record output for sp    
166 The 'control' and 'ack' files are perf control    
167 The 'up' number shows minutes daemon/session i    
168                                                   
169                                                   
170 Make sure control session is online:              
171                                                   
172   # perf daemon ping                              
173   OK   cycles                                     
174   OK   sched                                      
175                                                   
176                                                   
177 Send USR2 signal to session 'cycles' to genera    
178                                                   
179   # perf daemon signal --session cycles           
180   signal 12 sent to session 'cycles [603452]'     
181                                                   
182   # tail -2  /opt/perfdata/session-cycles/outp    
183   [ perf record: dump data: Woken up 1 times ]    
184   [ perf record: Dump perf.data.20201230170131    
185                                                   
186                                                   
187 Send USR2 signal to all sessions:                 
188                                                   
189   # perf daemon signal                            
190   signal 12 sent to session 'cycles [603452]'     
191   signal 12 sent to session 'sched [603453]'      
192                                                   
193   # tail -2  /opt/perfdata/session-cycles/outp    
194   [ perf record: dump data: Woken up 1 times ]    
195   [ perf record: Dump perf.data.20201230170246    
196   # tail -2  /opt/perfdata/session-sched/outpu    
197   [ perf record: dump data: Woken up 1 times ]    
198   [ perf record: Dump perf.data.20201230170247    
199                                                   
200                                                   
201 Stop daemon:                                      
202                                                   
203   # perf daemon stop                              
204                                                   
205                                                   
206 SEE ALSO                                          
207 --------                                          
208 linkperf:perf-record[1], linkperf:perf-config[    
                                                      

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php