[Israel.pm] memory usage
choo at actcom.co.il
Tue Sep 5 10:01:11 PDT 2006
system("ps aux | egrep " . getpid() . " | egrep -v egrep | awk .....").
by the way, i usually run the memory-checking externally, in a seperate
script that greps for something know to belong to the program i want to
test. i always did this for C/C++ programs, so i had a unique name. with a
perl script its a bit harder...
On Tue, 5 Sep 2006, Gabor Szabo wrote:
> Date: Tue, 5 Sep 2006 15:31:45 +0300
> From: Gabor Szabo <szabgab at gmail.com>
> Reply-To: Perl in Israel <perl at perl.org.il>
> To: Perl in Israel <perl at perl.org.il>
> Subject: Re: [Israel.pm] memory usage
> vmstat does not seem to provide per process statistics and I would prefer
> a Perl module for this or something that has a Perl wrapper already.
> The issues is that I need to test if a given script has memory leak.
> I know it used to have on Solaris andI hope I have fixed it.
> In the end I think I would like to have a module that could just report
> the total memory usage of the process it is running in.
> On 9/5/06, Yishay Weiss <yishayjobs at hotmail.com> wrote:
> > vmstat, as shown in
> > http://www.adminschoice.com/docs/iostat_vmstat_netstat.htm
> > >From: "Gabor Szabo" <szabgab at gmail.com>
> > >How can I find out (preferably cross platform, but at least on Unix/Linux)
> > >what is the total memory used by my own process?
> > >
> > >Not the memory usage of a single variable but the full process.
> > >
> Perl mailing list
> Perl at perl.org.il
"For world domination - press 1,
or dial 0, and please hold, for the creator." -- nob o. dy
More information about the Perl