|
Prev: simple sed help - delete word containing + (plus sign)
Next: How to open, lock, write and close a file in ksh
From: kj on 21 Jan 2006 19:10 What's the best way to determine the most memory a program uses during its execution? Thanks! kj -- NOTE: In my address everything before the first period is backwards; and the last period, and everything after it, should be discarded.
From: krsyoung on 21 Jan 2006 20:32
Depending on how accurate of data you need, usually top or ps will do the trick. If you want more data than just eye balling top, run ps in a shell script to have it poll the process every couple of seconds/minutes too see how much memory it is using. With a command of ps -o vsz,rss <pid> you can get a good idea of these values. Also, if you wanted in another shell you could run watch -n 5 "ps -o vsz,rss <pid>" which will run the command every 5 seconds. Hope this helps! Chris |