Ana M2emarfag�n wrote:
> Hi all!
> I'm new in perl, and I'm a little lost.
> I want to find something, perl module, function, site to find it, ...,
> that return me the size of a process in memory. I've the pid of the
> process and need to now the size.
> If possible, I need that work in Unix, Linux and windows.
>
> Thanks in advance
>
> Ana
try:
#!/usr/bin/perl -w
use strict;
use Proc::ProcessTable;
my $t = new Proc::ProcessTable();
foreach my $p (@{$t->table}){
print $p->pid," ",$p->cmndline," ",$p->size,"\n";
}
__END__
$p->pid gives you the process id of the process
$p->cmndline gives you the command line that start the process
$p->size gives you the size of the process in memory
david
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]