in reply to Re: get memory usage
in thread get memory usage

hehe looks like they ran into the same issue... (code from Apache::SizeLimit)
BEGIN { # decide at compile time how to check for a process' memory size. if (($Config{'osname'} eq 'solaris') && ($Config{'osvers'} >= 2.6)) { $HOW_BIG_IS_IT = \&solaris_2_6_size_check; } elsif ($Config{'osname'} eq 'linux') { $HOW_BIG_IS_IT = \&linux_size_check; } elsif ($Config{'osname'} =~ /(bsd|aix)/i) { # will getrusage work on all BSDs? I should hope so. if (eval("require BSD::Resource;")) { $HOW_BIG_IS_IT = \&bsd_size_check; } else { die "you must install BSD::Resource for Apache::SizeLimit to w +ork on your platform."; } } else { die "Apache::SizeLimit not implemented on your platform."; } }


-Waswas

Replies are listed 'Best First'.
Re: Re: Re: get memory usage
by perrin (Chancellor) on Aug 24, 2002 at 17:33 UTC
    Right. There's no portable way to do it. Apache::GTopLimit uses a library from the Gnome project to abstract it, but it's harder to install because of that.