Home arrow static arrow Java Programming [Archive] - System Info
Warning: Creating default object from empty value in /www/htdocs/w008deb8/wiki/components/com_staticxt/staticxt.php on line 51
Java Programming [Archive] - System Info
5 Duke Stars available
This topic has 5 replies on 1 page.

Posts:3
Registered: 6/17/04
System Info  
Jun 17, 2004 10:10 AM



 
Hello
I am looking for a way of getting system info, appart from the basic info that System class provides ( OS, user.name, paths, java version...)
I am interested in getting this other info:
- Machine host name
- CPU rating
- Total and free memory
- Load on machine
- Network load ( when connecting a provided remote host)

If you know the way to do so, or know any source code where someone adress any of these problems, plase make me know.

I am considering also the option of getting those infos by means of linux commands using
Runtime.getRuntime().exec(COMMAND_NAME) and then getting back the result into the java program, but I don't know if this is a good solution considering I want to prevent to the maximum enviroment dependency.

Many thanks for your help
 

Posts:24,036
Registered: 2/3/03
Re: System Info  
Jun 17, 2004 10:18 AM (reply 1 of 5)



 
I am considering also the option of getting those
infos by means of linux commands using
Runtime.getRuntime().exec(COMMAND_NAME) and then
getting back the result into the java program, but I
don't know if this is a good solution considering I
want to prevent to the maximum enviroment dependency.

These things are dependent on the evironment. Look into JNI or the Runtime.exec() commands.
 

Posts:3
Registered: 6/17/04
Re: System Info  
Jun 17, 2004 10:28 AM (reply 2 of 5)



 

Thanks

Well, this migth be the reason way they did't include those infos in the java core classes.
But maybe someone has programmed some piece of code for various platforms ( in my case I need Linux and Solaris) that can help me much if I can reuse it

Does anybody knows where can I found that code? ( some 2 hours surfing the net haven't give me any interesting result)
 

Posts:3,258
Registered: 00-08-28
Re: System Info  
Jun 17, 2004 10:33 AM (reply 3 of 5)



 
[url http://www.merrymeet.com/minow/javainfo/javainfo.html] this might be helpful in grabbing some though[/url]
 

Posts:3
Registered: 6/17/04
Re: System Info  
Jun 17, 2004 10:43 AM (reply 4 of 5)



 
I think I found that 1 hour ago... but has nothing really interesting to pick up
Thanks anyway

I think the best way of finding it is on a extensive code repository, but till know I have not found such a big repository.
 

Posts:89
Registered: 04-06-04
Re: System Info  
Jun 17, 2004 11:26 AM (reply 5 of 5)



 
Following up on the yawmark's comment about JNI, here's an article that may be useful:

http://www.codeguru.com/Cpp/misc/misc/assemblylanguage/article.php/c3847/

∞ bm ∞
 
This topic has 5 replies on 1 page.