> -----Original Message-----
> From: Biju Ramachandran [mailto:bijurama@no-spam
> Sent: Friday, August 08, 2003 8:56 AM
> To: beginners@no-spam
> Subject: Re: pid->memory usage - Any takers
>=20
>=20
> Please, anybody...
>=20
> Biju
>=20
>=20
> >From: "Biju Ramachandran" <bijurama@no-spam>
> >To: beginners@no-spam
> >Subject: pid->memory usage
> >Date: Thu, 07 Aug 2003 11:23:33 -0400
> >
> >Hi there
> >
> >I just want to know is there any way to find out the PID=20
> ans how much a=20
> >process is using
> >the physical and virtual memory, as it is show by the=20
> Windows NT task=20
> >manager.
> >
> >Thanks
> >
> >Biju
> >
> >_________________________________________________________________
> >MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*. =20
> >http://join.msn.com/?page=3Dfeatures/virus
> >
> >
> >--
> >To unsubscribe, e-mail: beginners-unsubscribe@no-spam
> >For additional commands, e-mail: beginners-help@no-spam
> >
>=20
> _________________________________________________________________
> MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*. =20
> http://join.msn.com/?page=3Dfeatures/virus
>=20
>=20
> --=20
> To unsubscribe, e-mail: beginners-unsubscribe@no-spam
> For additional commands, e-mail: beginners-help@no-spam
=20
=20
Well your Process id is $$, But I haven't any ideas on retieving the =
physical/virtual mem.
On Fri, 8 Aug 2003 09:06:25 -0400, Stephen_Gilbert@no-spam (Stephen
Gilbert) wrote:
>> -----Original Message-----
>> From: Biju Ramachandran [mailto:bijurama@no-spam
>> Subject: Re: pid->memory usage - Any takers
>> Please, anybody...
>> >I just want to know is there any way to find out the PID
>> ans how much a
>> >process is using
>> >the physical and virtual memory, as it is show by the
>> Windows NT task
>> >manager.
>Well your Process id is $$, But I haven't any ideas on retieving the physical/virtual mem.
You ought to be looking at the Proc::ProcessTable module.
I don't know about your NT requirement, but the following
is a sample that works well under linux.
#!/usr/bin/perl -w
use strict;
use Proc::ProcessTable;
my $t = new Proc::ProcessTable();
foreach my $p (@no-spam>table}){
print $p->pid," ",$p->cmndline," ",$p->size,"\n";
}
__END__