开发者

how to monitor a processes memory usage over time - ubuntu [closed]

Closed. This question is off-topic. It is not currently accepting answers.

Want to improve this question? Update the question so it's on-topic for Stack Overflow.

Closed 10 years ago.

Improve this question

I want to watch a given process in unix over time to see what time memory grows (its a long running job)开发者_StackOverflow社区

I guess I could do

ps -aux | grep PID

and run this from cron every 5 minutes, but it seems there should be a better way.

Is there a way I can use sar to do this?


I use the following:

$ ps -o rss $(pgrep executablename)

Put that in a while loop or use watch to monitor it over time coupled with tail. You can also tee it to a file and have gnuplot plot it for you and refresh it every few seconds.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜