Operating System - HP-UX
1843948 Members
3290 Online
110226 Solutions
New Discussion

how do i programme with java to get hp-unix mem res

 
hnlixm
Advisor

how do i programme with java to get hp-unix mem res

i do it with"
Runtime ce=Runtime.getRuntime();
InputStream in=ce.exec("top").getInputStream();
"
but the top command does't end.so it acctually does't work.is somebody have any ideas ,thanks !
3 REPLIES 3
Dennis Handly
Acclaimed Contributor

Re: how do i programme with java to get hp-unix mem res

"top -f file" will write text output to a file.
You should also look at the -d and -n options to specify how many time and how many processes.
hnlixm
Advisor

Re: how do i programme with java to get hp-unix mem res

thank you!,i can read the file
Dennis Handly
Acclaimed Contributor

Re: how do i programme with java to get hp-unix mem res

>thank you!

If you are happy with the answer you got, please read the following about how to reopen threads and to assign points:
http://forums.itrc.hp.com/service/forums/helptips.do?#41
http://forums.itrc.hp.com/service/forums/helptips.do?#33