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  user  to  see  useful
16       information  related  to  the processes.  This information includes CPU
17       percentage, memory  and  stack  usage,  scheduling  and  priority.   By
18       default 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  and several other pcp options become indirectly available; refer
24       to PCPIntro(1) for 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   Print version number then exit.
120
121       -G processname, --process-name=processname
122            Display only processes whose command name includes the string pro‐
123            cessname.  This string can be a regular expression.
124
125       -p pid1,pid2.., --pid-list=pid1,pid2..
126            Display only processes with the listed PIDs.
127
128       -t interval, --interval=interval
129            Set the interval between two samples.  The default is one second.
130
131       -s count, --samples=count
132            Set the number of samples to be displayed.  Since the first sample
133            is  used for the rate conversion of some of the metrics, the total
134            number of samples reported are one less than count.   The  default
135            is continous.
136
137       -a archive, --archive=archive
138            Causes pcp-pidstat to use the specified archive than connecting to
139            PMCD.  The argument to -a is a comma-separated list of names, each
140            of  which  may  be  the  base  name of an archive or the name of a
141            directory containing one or more archives.
142
143       -B   Report process states.  The argument to -B is one of  the  follow‐
144            ing:
145
146            detail
147                   Show  total time processes have spent in each of the 5 dif‐
148            ferent states
149
150            all
151                   Show total time processes spent in their current state
152
153            [R,S,T,D,Z]
154                   A comma separated list of process states.  For example,  -B
155            R,S  will  report  processes currently in either R or S states and
156            not report processes currently in any other states.
157
158       -f   Use the format string for formatting the  timestamp.   The  format
159            will  be used with the python(1) datetime.strftime method which is
160            similar to that described in strftime(3).  An empty format  string
161            (i.e, "") will remove the timestamps from the output.  The default
162            with stdout is %H:%M:%S.
163
164       -Z timezone, --timezone=timezone
165            By default, pcp-pidstat reports the time of day according  to  the
166            local  timezone  on  the  system where pcp-pidstat is run.  The -Z
167            option changes the timezone to timezone in the format of the envi‐
168            ronment variable TZ as described in environ(7).
169
170       -z , --hostzone
171            Change  the  reporting  timezone to the local timezone at the host
172            that is the source of the performance metrics.  When  replaying  a
173            PCP archive that was captured in a foreign timezone, the -z option
174            would almost always be used (the default reporting timezone is the
175            local  timezone,  which may not be the same as the timezone of the
176            PCP archive).
177
178       -? , --help
179            Display usage message and exit.
180

NOTES

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

PCP ENVIRONMENT

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

SEE ALSO

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