List of running programs in Linux using java -



List of running programs in Linux using java -

i'm trying code task manager linux using java.

i need list of running programs. , other info like: memory usage, cpu usage ...

is possible java?

thanks.

try { // execute command string command = "ps aux"; process kid = runtime.getruntime().exec(command); // input stream , read inputstream in = child.getinputstream(); int c; while ((c = in.read()) != -1) { process((char)c); } in.close(); } grab (ioexception e) { }

source (modified): http://www.exampledepot.com/egs/java.lang/readfromcommand.html

java linux process operating-system

Comments

Popular posts from this blog

java - How to pass parameters between Request-Scoped Controllers? -

actionscript 3 - Flex: moving a point with rotation doesnt change the point XY? -

ms access - C# - Using OleDbParameter on table name -