Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

RE: Perl Server Load Check?

by DrManhattan (Chaplain)
on Jul 21, 2000 at 19:04 UTC ( [id://23592]=note: print w/replies, xml ) Need Help??


in reply to Perl Server Load Check?

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

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://23592]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others contemplating the Monastery: (4)
As of 2024-04-20 16:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found