*
The moose likes Linux / UNIX and the fly likes Measure CPU and Memory utilization Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Engineering » Linux / UNIX
Bookmark "Measure CPU and Memory utilization" Watch "Measure CPU and Memory utilization" New topic
Author

Measure CPU and Memory utilization

Chetan Parekh
Ranch Hand

Joined: Sep 16, 2004
Posts: 3636
I need a .sh file which will write current CPU and Memory in a specified file.

I am new to Unix.

Anybody has this code?


My blood is tested +ve for Java.
Chris Hendy
Ranch Hand

Joined: Mar 04, 2006
Posts: 98
I don't have any ready made shell scripts, but the utility vmstat should tell you everyting you need. See

http://ertw.com/%7Esean/news/Mar-7-2002.html

and look for section 1) Sean's Notes
Stefan Wagner
Ranch Hand

Joined: Jun 02, 2003
Posts: 1923

maybe useful too:


http://home.arcor.de/hirnstrom/bewerbung
Chetan Parekh
Ranch Hand

Joined: Sep 16, 2004
Posts: 3636
Thanks all!!
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Measure CPU and Memory utilization