[Subject Prev][Subject Next][Thread Prev][Thread Next][Subject Index][Thread Index]

Linux system resources reporting to Java....

Hi All,

I am using RH Linux 6.2 with Apache, Jserv, JSSI, JSP, Qmail on my
webserver. I have a processing job thats fairly disk, CPU & memory intensive.

I want to wrive a Java Handler that somehow gets server resourse usage
parameters from Linux (number of processes active for mail, apache etc., in
addition to memory free, swap file usage, cpu load and so on) and decides
on the number of concurrent threads to activate for processing. This
handler will just assign a fixed number of jobs to the processing threads
and should be able to direct them to stop work & die, in order to free
system resources or to double or triple the number of processing threads,
should the server be free....can't really let the server idle
around.....you know ;-))...idle mind being the instrument of the devil & so
on ;-))

The question is...how do I get this info from Linux? Is there a Java class
that can do this? preferably open source but even shareware or commercial
will have to do....can't really set out to reinvent the wheel.

One otion was to setup a cron job & get linux utilities to reprt on the
resources to a disk file or a socket and get a java program to fetch/listen
for them....but my mind balks at implementing such an inelegant solution.
Any suggestions?

Will be undyingly grateful!!! can't really die of gratitude...y'know.

Best regards.