1Unix::Statgrab::sg_procUessesr_sCtoanttsr(i3b)uted PerlUDnoicxu:m:eSnttaattgiroanb::sg_process_stats(3)
2
3
4

NAME

6       Unix::Statgrab::sg_process_stats - container for libstatgrab process
7       statistics
8

DESCRIPTION

10       "Unix::Statgrab::sg_process_stats" is a Perl package name providing
11       accessors to bundled libstatgrab sg_process_stats <http://www.i-
12       scream.org/libstatgrab/docs/sg_get_process_stats.3.html> process
13       statistics.
14

METHODS

16   nentries
17       Returns the number of entries in the container.
18
19   systime
20       Returns the seconds since Epoch (0:00:00 on January, 1st 1970) of the
21       time measure the process statistics.
22
23   as_list
24       Deprecated alias of "fetchall_hash"
25
26   fetchall_hash
27       Returns all records from sg_process_stats <http://www.i-
28       scream.org/libstatgrab/docs/sg_get_process_stats.3.html> container as
29       list of hash containing each datum name as key and the datum as value.
30
31   fetchall_array
32       Returns all records from sg_process_stats <http://www.i-
33       scream.org/libstatgrab/docs/sg_get_process_stats.3.html> container as
34       list of arrays containing the values in following order:
35
36         (process_name proctitle pid parent pgid sessid uid euid gid egid
37          context_switches voluntary_context_switches involuntary_context_switches
38          proc_size proc_resident start_time time_spent cpu_percent nice state
39          systime)
40
41       in that order without leading headline.
42
43   fetchall_table
44       Returns all records from sg_process_stats <http://www.i-
45       scream.org/libstatgrab/docs/sg_get_process_stats.3.html> container as
46       list of arrays containing the values in following order:
47
48         (disk_name read_bytes write_bytes systime)
49
50       in that order including leading headline.
51
52   fetchrow_arrayref($row = 0)
53       Returns one row as array containing values as above.
54
55   fetchall_arrayref
56       Returns all records from sg_process_stats <http://www.i-
57       scream.org/libstatgrab/docs/sg_get_process_stats.3.html> container as
58       array of arrays without header.
59
60   fetchrow_hashref($row = 0)
61       Returns one row as hash containing "{ process_name =>
62       $self.process_name($row), proctitle => ... }".
63
64   fetchall_hashref
65       Returns all records from sg_process_stats <http://www.i-
66       scream.org/libstatgrab/docs/sg_get_process_stats.3.html> container as
67       array of hashes.
68
69   colnames
70       Returns list of column names: "(process_name proctitle pid parent pgid
71       sessid uid euid gid egid context_switches voluntary_context_switches
72       involuntary_context_switches proc_size proc_resident start_time
73       time_spent cpu_percent nice state systime)"
74
75   process_name
76       The name of the command that was run. The content of this field heavily
77       depends on the underlying operating system, some store the basename the
78       executable passes to the exec(2) system call, some the entire path.
79       Most OS restrict the size of this field - some like the *BSD family to
80       a very low value of 15 bytes.
81
82       This field is usually immutable for userland processes.
83
84   proctitle
85       The command line (the "title") of the process. Take note - this can be
86       modified by the process, so isn't guaranteed to be the original command
87       line.
88
89   pid
90       The process ID.
91
92   parent
93       The parent process ID.
94
95   pgid
96       The process ID of the process group leader.
97
98   sessid
99       Session id of the session the process belongs to.
100
101   uid
102       The ID of the user the process is running as.
103
104   euid
105       The ID of the effective user the process is running as.
106
107   gid
108       The ID of the group the process is running as.
109
110   egid
111       The ID of the effective group the process is running as.
112
113   context_switches
114       The number of context switches of this process (voluntary and
115       involuntary).
116
117   voluntary_context_switches
118       The number of voluntary context switches of this process (e.g. by
119       calling "sched_yield()", "sleep()" or "nanosleep()").
120
121   involuntary_context_switches
122       The number of involuntary context switches of this process (e.g. time
123       slice exhausted or signal sent).
124
125   proc_size
126       The virtual memory size of the process in bytes.
127
128   proc_resident
129       The size of the process that's resident in memory.
130
131   start_time
132       The time when the process has been started in seconds since epoch.
133
134   time_spent
135       The number of seconds the process has been running (user+system time,
136       without time spent by child processes).
137
138   cpu_percent
139       The current percentage of CPU the process is using.
140
141   nice
142       The nice value of the process.
143
144   state
145       The current state of the process, one of
146
147           SG_PROCESS_STATE_RUNNING SG_PROCESS_STATE_SLEEPING SG_PROCESS_STATE_STOPPED
148           SG_PROCESS_STATE_ZOMBIE SG_PROCESS_STATE_UNKNOWN
149

AUTHOR

151       Jens Rehsack, <rehsack AT cpan.org>
152
154       Copyright (C) 2012-2018 by Jens Rehsack
155
156       This library is free software; you can redistribute it and/or modify it
157       under the terms of the GNU Lesser General Public License as published
158       by the Free Software Foundation; either version 2.1 of the License, or
159       (at your option) any later version.
160
161
162
163perl v5.34.0                      2021-07-27Unix::Statgrab::sg_process_stats(3)
Impressum