in reply to Perl Server Load Check?
Though that is a very generic solution that will run well and work well cross-platform; it does require the instalation of an SNMP daemon on the box to be monitored. Traditionally getting information like you want has required some very tricky kernel IO programming. Howerver Linux (and many other unixes) now have a /proc filesystem that contains various performance metrics and kernel settings. For instance on my linux box the file /proc/meminfo contains the following:
And the file /proc/loadavg contains:total: used: free: shared: buffers: cached: Mem: 131321856 99635200 31686656 25956352 3571712 48758784 Swap: 131567616 37847040 93720576 MemTotal: 128244 kB MemFree: 30944 kB MemShared: 25348 kB Buffers: 3488 kB Cached: 47616 kB SwapTotal: 128484 kB SwapFree: 91524 kB
These aren't "real" files, they are generated virtually by the kernel when you read them. You can open and read these files just like you can any other file on your box. For more info on the /proc filesystem and all the wonders it contains see your system man pages.0.05 0.05 0.01 2/96 22289
Apache has a mod_status module that you can use to gather performance metrics about the apache processes. See the apache documentation for more details on its use.
|
|---|