ready for release
This commit is contained in:
parent
e193318d20
commit
6799a32950
|
@ -1,5 +1,6 @@
|
|||
Revision history for Proc-ProcessTable-InfoString
|
||||
|
||||
0.01 Date/time
|
||||
First version, released on an unsuspecting world.
|
||||
0.0.1 2019-08-28/01:55
|
||||
- Initial release.
|
||||
|
||||
|
||||
|
|
|
@ -1,15 +1,36 @@
|
|||
Proc-ProcessTable-InfoString
|
||||
|
||||
The README is used to introduce the module and provide instructions on
|
||||
how to install the module, any machine dependencies it may have (for
|
||||
example C compilers and installed libraries) and any other information
|
||||
that should be provided before the module is installed.
|
||||
Prints a handy info string representing
|
||||
state and various flags as well as showing
|
||||
the wait channel in use if there is one.
|
||||
|
||||
A README file is required for CPAN modules since CPAN extracts the README
|
||||
file from a module distribution so that people browsing the archive
|
||||
can use it to get an idea of the module's uses. It is usually a good idea
|
||||
to provide version information here so that people can decide whether
|
||||
fixes for the module are worth downloading.
|
||||
use Proc::ProcessTable::InfoString;
|
||||
use Proc::ProcessTable;
|
||||
|
||||
my $is = Proc::ProcessTable::InfoString->new;
|
||||
|
||||
my $p = Proc::ProcessTable->new( 'cache_ttys' => 1 );
|
||||
my $pt = $p->table;
|
||||
|
||||
foreach my $proc ( @{ $pt } ){
|
||||
print $proc->pid.' '.$is->info( $proc )."\n";
|
||||
}
|
||||
|
||||
|
||||
results in output like...
|
||||
|
||||
|
||||
57255 Rs+
|
||||
57254 Ss+ zio->io_
|
||||
57253 Ss+ wait
|
||||
57252 Ss+ zcw->zcw
|
||||
57226 Ss+ zio->io_
|
||||
57224 Ss+ wait
|
||||
57223 Rs+
|
||||
57222 Ss+ wait
|
||||
56824 Ss+ zio->io_
|
||||
55632 Ss+ zcw->zcw
|
||||
55631 Ss+ wait
|
||||
|
||||
|
||||
INSTALLATION
|
||||
|
|
|
@ -36,6 +36,23 @@ Perhaps a little code snippet.
|
|||
print $proc->pid.' '.$is->info( $proc )."\n";
|
||||
}
|
||||
|
||||
The mapping for the left side of the output is as below.
|
||||
|
||||
States Description
|
||||
Z Zombie
|
||||
S Sleep
|
||||
W Wait
|
||||
R Run
|
||||
|
||||
Flags Description
|
||||
O Swapped Output
|
||||
E Exiting
|
||||
s Session Leader
|
||||
L POSIX lock advisory
|
||||
+ has controlling terminal
|
||||
X traced by a debugger
|
||||
F being forked
|
||||
|
||||
=head1 METHODS
|
||||
|
||||
=head2 new
|
||||
|
|
Loading…
Reference in New Issue