I need to get information about the memory and CPU usage of some process running on a machine (not a Java process).
How can i do this?
It depends on the platform, but essentially uses it Runtime.getRuntime()to execute the corresponding command, to output it and analyze it for the necessary data.
Runtime.getRuntime()
If I am not mistaken Runtime.getRuntimefor the virtual machine, but not for the physical. What you are asking is getting information about a physical machine (which means a processor).
Runtime.getRuntime