由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Unix版 - How to monitor peak memory usage?
相关主题
what's wrong with this ftp batch file?a question about operating system
真心求助!谢谢。unix下编译fortran 的错误太多,看不到怎么办?
**真心求助!!多谢了!!.cshrc?.login?.profile?
shell programming请求帮助!!!
A question about cron joblogin shell and normal shell?
how to convert csh shell script to dos batch filersh hangs on background job
sgi怪事procmail: a mini-mimi FAQ
请教How to get rid of the bg job id redirection?multiple file copy
相关话题的讨论汇总
话题: usage话题: peak话题: monitor话题: memory话题: file
进入Unix版参与讨论
1 (共1页)
s******e
发帖数: 273
1
Currently I use "top". However, is there any way to
capture it into a file so that I can read it later.
This is because I need to run a batch of jobs by a script.
I can't monitor all of them. I want to have a program
do it automatically and write the peak memory usage for
each of the job to a file.
Thanks.
c*r
发帖数: 278
2
"top" in batch mode (option "-b") can be redirected to a file.
But in order to do what you want, you have to invoke "top" repeatedly.
A simple but ugly way: write a shell script, call "top" periodically
and ">>" output to a file. You can filter out unwanted lines.
On systems that support /proc, you can write your own program to read
the /proc//status file and keep track the peak usage.

【在 s******e 的大作中提到】
: Currently I use "top". However, is there any way to
: capture it into a file so that I can read it later.
: This is because I need to run a batch of jobs by a script.
: I can't monitor all of them. I want to have a program
: do it automatically and write the peak memory usage for
: each of the job to a file.
: Thanks.

s******e
发帖数: 273
3
Thank you very much for the reply.

【在 c*r 的大作中提到】
: "top" in batch mode (option "-b") can be redirected to a file.
: But in order to do what you want, you have to invoke "top" repeatedly.
: A simple but ugly way: write a shell script, call "top" periodically
: and ">>" output to a file. You can filter out unwanted lines.
: On systems that support /proc, you can write your own program to read
: the /proc//status file and keep track the peak usage.

t*****s
发帖数: 3478
4

you may use "sar"

【在 s******e 的大作中提到】
: Thank you very much for the reply.
1 (共1页)
进入Unix版参与讨论
相关主题
multiple file copyA question about cron job
土问题how to convert csh shell script to dos batch file
HELP: How to get rid of unwanted characters in file namesgi怪事
Re: HELP: How to get rid of unwanted characters in file name请教How to get rid of the bg job id redirection?
what's wrong with this ftp batch file?a question about operating system
真心求助!谢谢。unix下编译fortran 的错误太多,看不到怎么办?
**真心求助!!多谢了!!.cshrc?.login?.profile?
shell programming请求帮助!!!
相关话题的讨论汇总
话题: usage话题: peak话题: monitor话题: memory话题: file