Sounds like a job for GTop.pm, which is a Perl interface to libgtop. I haven't used it myself, but it looks like you can write something to this effect:
#!/usr/bin/perl -w use strict; use GTop (); my $gtop = GTop->new; my $mem = $gtop->mem; my $total = $mem->total; my $free = $mem->free; if ($free / $total > .5) # Or whatever { # If there's enough free memory, execute your # code, etc. }
-Matt
In reply to RE: Perl Server Load Check?
by DrManhattan
in thread Perl Server Load Check?
by PipTigger
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |