/usr/share/doc/libproc-processtable-perl/examples/example.pl is in libproc-processtable-perl 0.50-1.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | #!/usr/bin/perl
use Proc::ProcessTable;
$ref = new Proc::ProcessTable;
foreach $proc (@{$ref->table}) {
if(@ARGV) {
next unless grep {$_ == $proc->{pid}} @ARGV;
}
print "--------------------------------\n";
foreach $field ($ref->fields){
print $field, ": ", $proc->{$field}, "\n";
}
}
|