Browse Source

ready for release

master
Zane C. B-H 2 years ago
parent
commit
6799a32950
3 changed files with 51 additions and 12 deletions
  1. +3
    -2
      Proc-ProcessTable-InfoString/Changes
  2. +31
    -10
      Proc-ProcessTable-InfoString/README
  3. +17
    -0
      Proc-ProcessTable-InfoString/lib/Proc/ProcessTable/InfoString.pm

+ 3
- 2
Proc-ProcessTable-InfoString/Changes View File

@ -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.

+ 31
- 10
Proc-ProcessTable-InfoString/README View File

@ -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.
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.
Prints a handy info string representing
state and various flags as well as showing
the wait channel in use if there is one.
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


+ 17
- 0
Proc-ProcessTable-InfoString/lib/Proc/ProcessTable/InfoString.pm View File

@ -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…
Cancel
Save