1PCP-PIDSTAT(1) General Commands Manual PCP-PIDSTAT(1)
2
3
4
6 pcp-pidstat - Report statistics for Linux tasks.
7
9 pcp pidstat [-s N] [-t DELTA] [-I] [-a FILE] [-f FORMAT] [-G NAME]
10 [-U[USERNAME]] [-p PID1,PID2..] [-R/-r/-k] [-V] [-Z timezone --time‐
11 zone=TZ] [-z --hostzone] [-l] [-?]
12
13
15 pcp-pidstat command is used for monitoring individual tasks currently
16 being managed by the Linux kernel. Using various options it helps user
17 to see useful information related with the processes. This information
18 can include percentage CPU, memory and stack usages, scheduling and
19 priority information. By default pcp-pidstat reports live data for the
20 local host but can also report for a remote host (--host) or from a
21 previously captured PCP archive (-a). pcp-pidstat fetches the data to
22 be analysed from PMCD unless provided -a option. (See below)
23
24
26 Output control options:
27
28 -s N, --samples=N
29 Set the number of samples to be displayed. Since the first sam‐
30 ple is used for the rate conversion of some of the metrics, the
31 total number of samples reported are one less that N. Default is
32 continous.
33
34
35 -t DELTA, --interval=DELTA
36 Set the interval between two samples. Default is one second.
37
38
39 General Options:
40
41
42 -I In an SMP environment, indicates that tasks CPU usage should
43 be divided by the total number of processors.
44
45
46 -a FILE, --archive=FILE
47 Causes pcp-pidstat to use the specified archive than connecting
48 to PMCD. The argument to -a is a comma-separated list of names,
49 each of which may be the base name of an archive or the name of
50 a directory containing one or more archives. Archives can be
51 created using pmlogger(1).
52
53
54 --host Current performance metric values are retrieved from the nomi‐
55 nated host machine.
56
57
58 -B Report process states. The argument to -B is one of the follow‐
59 ing:
60
61 detail
62 Show total time processes have spent in each of the 5
63 different states
64
65 all
66 Show total time processes spent in their current state
67
68 [R,S,T,D,Z]
69 A comma separated list of states which can be any or all
70 of [R,S,T,Z,D]. For example, -B R,S will report processes cur‐
71 rently in either R or S states and not report processes cur‐
72 rently in any other states.
73
74
75 -f Use the format string for formatting the timestamp. The format
76 will be used with Python's datetime.strftime method which is
77 mostly the same as that described in strftime(3). An empty for‐
78 mat string(i.e,"") will remove the timestamps from the output.
79 The default with stdout is %H:%M:%S.
80
81
82 -R Report realtime priority and scheduling policy information. The
83 following values may be displayed:
84
85 UID
86 The real user identification number of the task being
87 monitored.
88
89 USER
90 The name of the real user owning the task being moni‐
91 tored.
92
93 PID
94 The identification number of the task being monitored.
95
96 prio
97 The realtime priority of the task being monitored.
98
99 policy
100 The scheduling policy of the task being monitored.
101
102 Command
103 The command name of the task.
104
105
106 -r Report page faults and memory utilization. The following values
107 may be displayed:
108
109 UID
110 The real user identification number of the task being
111 monitored.
112
113 USER
114 The name of the real user owning the task being moni‐
115 tored.
116
117 PID
118 The identification number of the task being monitored.
119
120 minflt/s
121 Total number of minor faults the task has made per sec‐
122 ond, those which have not required loading a memory page from
123 disk.
124
125 majflt/s
126 Total number of major faults the task has made per sec‐
127 ond, those which have required loading a memory page from disk.
128
129 VSZ
130 Virtual Size: The virtual memory usage of entire task in
131 kilobytes.
132
133 RSS
134 Resident Set Size: The non-swapped physical memory used
135 by the task in kilobytes.
136
137 %MEM
138 The tasks's currently used share of available physical
139 memory.
140
141 Command
142 The command name of the task.
143
144
145 -k Report stack utilization. The following values may be dis‐
146 played:
147
148 UID
149 The real user identification number of the task being mon‐
150 itored.
151
152 USER
153 The name of the real user owning the task being monitored.
154
155 PID
156 The identification number of the task being monitored.
157
158 StkSize
159 The amount of memory in kilobytes reserved for the task as
160 stack, but not necessarily used.
161
162 StkRef
163 The amount of memory in kilobytes used as stack, refer‐
164 enced by the task.
165
166 Command
167 The command name of the task.
168
169
170 -V Display version and exit
171
172
173 -Z By default, pcp-pidstat reports the time of day according to the
174 local timezone on the system where pcp-pidstat is run. The -Z
175 option changes the timezone to timezone in the format of the
176 environment variable TZ as described in environ(7).
177
178
179 -z Change the reporting timezone to the local timezone at the host
180 that is the source of the performance metrics, as identified via
181 either the -h or -a options. When replaying a PCP archive that
182 was captured in a foreign timezone, the -z option would almost
183 always be used (the default reporting timezone is the local
184 timezone, which may not be the same as the timezone of the PCP
185 archive).
186
187
188 -l Display the process command name and all its arguments.
189
190
191 -? , --help
192 Display help and exit
193
194
195 Ouput Filter Options
196
197
198 -G NAME, --process-name=NAME
199 Display only processes whose command name includes the string
200 NAME. This string can be a regular expression.
201
202
203 -U[USERNAME], --user-name=[USERNAME]
204 Display the real user name of the tasks being monitored instead
205 of the UID. If username is specified, then only tasks belonging
206 to the specified user are displayed.
207
208
209 -p PID1,PID2.. , --pid-list=PID1,PID2..
210 Display only processes whose PID belongs to the given Pid List.
211
212
214 pcp-pidstat is inspired by the pidstat(1) command and aims to be com‐
215 mand line and output compatible with it.
216
217
219 pcp(1), pidstat(1), PCPIntro(1), pmParseInterval(3) and environ(7).
220
221
222
223Performance Co-Pilot PCP PCP-PIDSTAT(1)