Well you would probably have to write client apps that reside on the other machines, and has a deamon thread running waiting for calls. Then from you app you call the client machines deamon thread requesting that information. Then the client app gets the information and sends it back. Or you client app can be loaded into the RMI Registry on the client machine, which is just like above. Either way there needs to be an application running on the client machine. Since a remote machine cannot get that other information directly.
Originally posted by Ayan Dutta: Hi, I need to know another machines CPU Utilization,OS specific information using Java.I have 2 information. 1. That machines IP. 2.That machine OS is windows. Apart from this nothing I know .
Can it be done ? If yes how ? How can know even my own machines CPU Utilization,OS specific information using Java ? If possible please send me some sample code . Regards, Ayan
I think a better solution would be to download and install jvmstat:
You'll be able to monitor memory and such very nicely with that.
Joined: Oct 16, 2005
Thanks I have solved the problem.I will send the code very soon. I want to say something to Mr C Lamont Gilbert , As there are rules for asking questions ,then there should be some thought applied before answering any question.If someone goes through my code properly ,the main problem is in formatting the content from an InputStream. And this is not an windows related question at all.Having no answer is better than having baseless comments. Regards Ayan
I also have a similar requirement for getting CPU Utilization of a machine using its IP Address. As said in your last reply, can you please post the entire code for achieving that requirement on this site or send it to my yahoo id : firstname.lastname@example.org?
Hi ayan when i run this code only login id is asked
suddenly it shows Successfully Disconnected.
So please tell me how to proceed its urgent for me.
And one more thing what is "administrator" in this.
suppose my login id and assword is abcdef asdfg resp.
@bhuvnesh bansal: Note that the last reply before your post was dated more than seven years ago.
The value "administrator" appears to be the command he is trying to execute. If you want to execute shell commands, check out the java.lang.Runtime and java.lang.Process classes first.
Ayan is probably not going to see the new activity in this thread... I agree, telnet'ing around is not the right way to do this. At the very least, use secure shell (ssh) if you're going into remote machines.
Joined: Aug 02, 2013
I am successfully connected through connect method but when i enter login no forward process is shown...