SEARCH
NEW RPMS
DIRECTORIES
ABOUT
FAQ
VARIOUS
BLOG

 
 

perl-Proc-Stat rpm build for : OpenSuSE. For other distributions click perl-Proc-Stat.

Name : perl-Proc-Stat
Version : 0.03 Vendor : obs://build_opensuse_org/devel:languages:perl
Release : lp155.1.1 Date : 2023-07-20 19:40:52
Group : Development/Libraries/Perl Source RPM : perl-Proc-Stat-0.03-lp155.1.1.src.rpm
Size : 0.06 MB
Packager : https://www_suse_com/
Summary : Proc::Stat Perl module
Description :
This module reads /proc/uptime and /proc/{pid}/stat to gather statistics
and calculate cpu utilization of designatated PID\'s with or without
children

All the data from /proc/[pid]/stat is returned attached to the method
pointer, see list below by index (-1).

Calculates processor JIFFY

Calculate realtime load average of a particular job(pid) or list of
job(pid\'s)

Real load Balancing using $ps->loadavg(pid list) below.

* * $ref = new Proc::Stat;

Return a method pointer

* * $psj = $ut->jiffy();

Returns a blessed reference with a scalar representing the best guess of
the SC_CLK_TCK or USR_HZ for this system based on proc data

input: [optional] method pointer from \"uptime\"
returns:

$psj->{
jiffy => number
};

Returns 9999 on error and sets $AATT

Will call $ps->uptime() if not a $ut->method pointer

NOTE: known to be supported on LINUX, requires the /proc/filesystem

* * $ut = $ps->uptime();

input: none
returns: blessed method pointer of the form

$ut->{ # seconds and fractions
current => {
uptime => uptime of the system,
idle => time spent in idle
},
last => {
uptime => 0,
idle => 0,
}

};

Subsequent calls will return:

$ut->{ # seconds and fractions
current => {
uptime => uptime of the system,
idle => time spent in idle
},
last => {
uptime => previous uptime,
idle => previous idle
}
};

Returns undef on error

* * = $stat = $ps->stat($pid0,$pid1,...);

Returns pointer to an array of values for each proc/PID/stat as defined in
man proc(5)

input: an array of PID\'s or ref to array of PID\'s
returns: blessed method pointer of the form

$stat->{
curstat => {
$pid0 => [stat array],
$pid1 => [stat array],
...
},
lastat => {
$pid0 => [],
$pid1 => [],
...
}
};

Subsequent calls will return:

$stat->{
curstat => {
$pid0 => [stat array],
$pid1 => [stat array],
...
},
lastat => {
$pid0 => [],
$pid1 => [],
...
}
};

Returns undef on error.

Will not populate PID\'s missing from /proc

May be chained. i.e.

$stat = $ps->uptime()->stat($pid,...);

* * $usage = $ut->usage();

Calculate the CPU usage from data in a chained uptime, stat call pair

i.e $usage = $ps->uptime()->jiffy()->stats(pid0,pid1,...)->usage(); in any
order, only \"stats\" required

calculates differences for
utime
stime
cutime
cstime

First call for a particular PID will return the absolute value since job
start

Subsequent calls for a particular PID will return the difference from the
last call

input: an array of PID\'s or ref to array of PID\'s
returns: additional fields added to \"uptime\" and \"stats\"

$usage->{
utime => {
$pid0 => diff,
$pid1 => diff,
... etc...
},
stime => {
$pid0 => diff,
$pid1 => diff,
... etc...
},
cutime => {
$pid0 => diff,
$pid1 => diff,
... etc...
},
cstime => {
$pid0 => diff,
$pid1 => diff,
... etc...
}
};

Returns undef on error

* * $prep = $ps->prepare($pid0,$pid1,...);

Collect information about jobs(pids) needed to calculate cpu utilization.
Call repetitively at intervals.

input: an array of PID\'s or ref to array of PID\'s
returns: a blessed hash structure containing data

This is a wrapper around:

$ps->uptime()->stat($pids);

...and will conditionally call ->jiffy if it is not populated

* * $percent = $prep->loadavg($pid0,$pid1,...);

* * $percent = $prep->loadkid($pid0,$pid1,...);

Call:

method: loadavg for job(pid) utilization
method: loadkid to include utilization of child processes

Calculates the % CPU utilization of each job (pid) over the period between
calls

input: an array of PID\'s or ref to array of PID\'s
returns: a blessed hash structure of the form:

$ps = {
utilize => {
$pid0 => num[float 0..100] representing %,
$pid1 => num...,
...
},
};

Method will report ZERO for a job(pid) which does not have a previous call
entry.

Return undef on error.

Will call the other package methods as needed to populate the \'$ps\' hash.

* * $ps = $ps->purgemissing($pid0,$pid1,...);

Removes all PID\'s from the \'$ps\' structure not in the PID list

input: an array of PID\'s or ref to array of PID\'s
returns: bless reference stripped of all other PID\'s

Returns undef on error

RPM found in directory: /packages/linux-pbone/ftp5.gwdg.de/pub/opensuse/repositories/devel:/languages:/perl:/CPAN-P/15.5/noarch

Content of RPM  Provides Requires

Download
ftp.icm.edu.pl  perl-Proc-Stat-0.03-lp155.1.1.noarch.rpm
     

Provides :
perl(Proc::Stat)
perl-Proc-Stat

Requires :
perl(:MODULE_COMPAT_5.26.1)
rpmlib(CompressedFileNames) <= 3.0.4-1
rpmlib(FileDigests) <= 4.6.0-1
rpmlib(PayloadFilesHavePrefix) <= 4.0-1
rpmlib(PayloadIsXz) <= 5.2-1


Content of RPM :
/usr/lib/perl5/vendor_perl/5.26.1/Proc
/usr/lib/perl5/vendor_perl/5.26.1/Proc/Stat.pm
/usr/lib/perl5/vendor_perl/5.26.1/x86_64-linux-thread-multi
/usr/share/doc/packages/perl-Proc-Stat
/usr/share/doc/packages/perl-Proc-Stat/Changes
/usr/share/doc/packages/perl-Proc-Stat/README
/usr/share/licenses/perl-Proc-Stat
/usr/share/licenses/perl-Proc-Stat/Artistic
/usr/share/licenses/perl-Proc-Stat/Copying
/usr/share/man/man3/Proc::Stat.3pm.gz

 
ICM