␊ |
# Get owner name␊ |
my $uid = 0;␊ |
open(FIC,"</proc/$pid/status") or die $!;␊ |
open(FIC,"</proc/$pid/status") or next; # Processus may have stopped between readdir and analyze␊ |
while( defined( $l = <FIC> ) ) {␊ |
␉if ($l =~ /Uid:\s+([0-9]+)\s+.*/)␊ |
␉{␊ |
|
$quota,$comment,$gcos,$dir,$shell,$expire) = getpwuid($uid);␊ |
␊ |
# Get infos␊ |
open(FIC,"</proc/$pid/stat") or die $!;␊ |
open(FIC,"</proc/$pid/stat") or next; # Processus may have stopped between readdir and analyze␊ |
my @infos = split(/ /, <FIC>);␊ |
close (FIC);␊ |
␊ |