I have the process id of a process. Can I get other information about process like CPU%, memory, exe name, etc?
I have seen that there is no built-in function to get all this. How to do this with Native?
Please help.
Java is a platform independent platform. Its specification doesn't define anything about pid. So you cannot find a general/portable way to manipulate pid. Although it is not a good practice, you can make an implemenation for a specific platform.
On windows you can use tasklist to get the full list of PIDs and filter for the one you want.
On Unix/Linux system you can use ps ax | grep to get your information.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With