1PCP-PIDSTAT(1)              General Commands Manual             PCP-PIDSTAT(1)
2
3
4

NAME

6       pcp-pidstat - Report statistics for Linux tasks.
7

SYNOPSIS

9       pcp [pcp options] pidstat [-I] [-l] [-R] [-r] [-k] [-U [username]] [-V]
10       [-G processname] [-p pid1,pid2..]  [-t interval]  [-s  count]  [-a  ar‐
11       chive] [-B state] [-f format] [-Z timezone] [-z] [-?]
12

DESCRIPTION

14       The pcp-pidstat command is used for monitoring individual tasks running
15       on the system.  Using various options it helps a user to see useful in‐
16       formation related to the processes.  This information includes CPU per‐
17       centage, memory and stack usage, scheduling and priority.   By  default
18       pcp-pidstat reports live data for the local host.
19

OPTIONS

21       When  invoked  via  the  pcp(1)  command,  the -h/--host, -a/--archive,
22       -O/--origin, -s/--samples,  -t/--interval,  -Z/--timezone  and  several
23       other pcp options become indirectly available; refer to PCPIntro(1) for
24       a complete description of these options.
25
26       The additional command line options available for pcp-pidstat are:
27
28       -I   In an SMP environment, indicates that tasks CPU  usage  should  be
29            divided by the total number of processors.
30
31       -l   Display the process command name and all its arguments.
32
33       -R   Report  realtime  priority and scheduling policy information.  The
34            following values may be displayed:
35
36            UID
37                   The real user identification number of the task being moni‐
38            tored.
39
40            USER
41                   The name of the real user owning the task being monitored.
42
43            PID
44                   The identification number of the task being monitored.
45
46            prio
47                   The realtime priority of the task being monitored.
48
49            policy
50                   The scheduling policy of the task being monitored.
51
52            Command
53                   The command name of the task.
54
55       -r   Report  page  faults and memory utilization.  The following values
56            may be displayed:
57
58            UID
59                   The real user identification number of the task being moni‐
60            tored.
61
62            USER
63                   The name of the real user owning the task being monitored.
64
65            PID
66                   The identification number of the task being monitored.
67
68            minflt/s
69                   Total  number of minor faults the task has made per second,
70            those which have not required loading a memory page from disk.
71
72            majflt/s
73                   Total number of major faults the task has made per  second,
74            those which have required loading a memory page from disk.
75
76            VSZ
77                   Virtual  Size:  The  virtual memory usage of entire task in
78            kilobytes.
79
80            RSS
81                   Resident Set Size: The non-swapped physical memory used  by
82            the task in kilobytes.
83
84            %MEM
85                   The  tasks  currently used share of available physical mem‐
86            ory.
87
88            Command
89                   The command name of the task.
90
91       -k   Report stack utilization.  The following values may be displayed:
92
93            UID
94                  The real user identification number of the task being  moni‐
95            tored.
96
97            USER
98                  The name of the real user owning the task being monitored.
99
100            PID
101                  The identification number of the task being monitored.
102
103            StkSize
104                  The  amount  of memory in kilobytes reserved for the task as
105            stack, but not necessarily used.
106
107            StkRef
108                  The amount of memory in kilobytes used as stack,  referenced
109            by the task.
110
111            Command
112                  The command name of the task.
113
114       -U [username], --user-name[=username]
115            Display the real user name of the tasks being monitored instead of
116            the UID.  If username is specified, then only tasks  belonging  to
117            the specified user are displayed.
118
119       -V, --version
120            Print version number then exit.
121
122       -G processname, --process-name=processname
123            Display only processes whose command name includes the string pro‐
124            cessname.  This string can be a regular expression.
125
126       -p pid1,pid2.., --pid-list=pid1,pid2..
127            Display only processes with the listed PIDs.
128
129       -t interval, --interval=interval
130            Set the interval between two samples.  The default is one second.
131
132       -s count, --samples=count
133            Set the number of samples to be displayed.  Since the first sample
134            is  used for the rate conversion of some of the metrics, the total
135            number of samples reported are one less than count.   The  default
136            is continous.
137
138       -a archive, --archive=archive
139            Causes pcp-pidstat to use the specified archive than connecting to
140            PMCD.  The argument to -a is a comma-separated list of names, each
141            of  which  may be the base name of an archive or the name of a di‐
142            rectory containing one or more archives.
143
144       -B   Report process states.  The argument to -B is one of  the  follow‐
145            ing:
146
147            detail
148                   Show  total time processes have spent in each of the 5 dif‐
149            ferent states
150
151            all
152                   Show total time processes spent in their current state
153
154            [R,S,T,D,Z]
155                   A comma separated list of process states.  For example,  -B
156            R,S  will  report  processes currently in either R or S states and
157            not report processes currently in any other states.
158
159       -f   Use the format string for formatting the  timestamp.   The  format
160            will  be used with the python(1) datetime.strftime method which is
161            similar to that described in strftime(3).  An empty format  string
162            (i.e, "") will remove the timestamps from the output.  The default
163            with stdout is %H:%M:%S.
164
165       -Z timezone, --timezone=timezone
166            By default, pcp-pidstat reports the time of day according  to  the
167            local timezone on the system where pcp-pidstat is run.  The -Z op‐
168            tion changes the timezone to timezone in the format of  the  envi‐
169            ronment variable TZ as described in environ(7).
170
171       -z , --hostzone
172            Change  the  reporting  timezone to the local timezone at the host
173            that is the source of the performance metrics.  When  replaying  a
174            PCP archive that was captured in a foreign timezone, the -z option
175            would almost always be used (the default reporting timezone is the
176            local  timezone,  which may not be the same as the timezone of the
177            PCP archive).
178
179       -? , --help
180            Display usage message and exit.
181

NOTES

183       pcp-pidstat is inspired by the pidstat(1) command and aims to  be  com‐
184       mand line and output compatible with it.
185

PCP ENVIRONMENT

187       Environment variables with the prefix PCP_ are used to parameterize the
188       file and directory names used by PCP.  On each installation,  the  file
189       /etc/pcp.conf  contains  the  local  values  for  these variables.  The
190       $PCP_CONF variable may be used to specify an alternative  configuration
191       file, as described in pcp.conf(5).
192
193       For environment variables affecting PCP tools, see pmGetOptions(3).
194

SEE ALSO

196       PCPIntro(1),  pcp(1),  pidstat(1), python(1), pmParseInterval(3), strf‐
197       time(3) and environ(7).
198
199
200
201Performance Co-Pilot                  PCP                       PCP-PIDSTAT(1)
Impressum