Hi,
I'm developing a application with JBoss 7 and JSF. I need to display OS information in the web page - CPU load, RAM, HDD, installed RPM packets and etc.
How I can do this?
Regards
Peter
Printable View
Hi,
I'm developing a application with JBoss 7 and JSF. I need to display OS information in the web page - CPU load, RAM, HDD, installed RPM packets and etc.
How I can do this?
Regards
Peter
Unless you have platform support from JBoss/JSF, you'll have to run utilities from your OS that produce that kind of info and capture / parse their output. You can do that by having long-running scripts that make occasional updates to files in known locations, or by invoking those utilities via java.lang.ProcessBuilder
What OS? Server or client? Server you can use the system dependent utils to get the appropriate info you need. Client side there are security issues with things like javascript or an applet, and I'd recommend against it.
The server OS is Centos
I need from a simple JSF page to monitor the load the the server on which the JBoss server is running.
You'd normally need some kind of privileged access to get that kind of information about the underlying OS - do you have privileged access (a CentOS login) on the server?. Do you know how to write shell scripts for Linux?
I'm not sure any more what's stopping you from writing your page.