TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Monner - Monitor CPU, memory and network whilst running a program

56 pointsby colinhowealmost 13 years ago

9 comments

sigilalmost 13 years ago
Useful idea. I sometimes use time [1] to print stats at the end of the program's run, like so.<p><pre><code> /usr/bin/time -f 'user=%U system=%S maxrss=%M ins=%I outs=%O" PROGRAM </code></pre> Seeing stats while the program is running is nice though! Also, cumulative monitoring of an entire foreground process group would be super handy (a long build, for instance).<p>Drop the --target-output option, you don't need it. Same thing can be achieved with:<p><pre><code> monner.py sh -c 'exec 1&#62;/dev/null 2&#62;&#38;1 $0 "$@"' PROGRAM </code></pre> I also agree with the other commenter that monner should be the parent process.<p>[1] Note, time(1) is not the same as the shell builtin of the same name.
评论 #4372980 未加载
评论 #4372878 未加载
andrewcookealmost 13 years ago
what does "memory" mean here? it would be nice to have more details (eg virtual v physical). also disk io (with paging separate) would be good. and maybe files opened (like /prod/PID/fd/*)<p>it would be really nice to have something that shows all this for a single process (and perhaps also for other processes that are "top" in some category). at the moment, when i am trying to balance code to run as well as possible within given hardware constraints, i have to juggle various monitor programs - this is a good first step to using just one...
kenferryalmost 13 years ago
How does this compare to Instruments?<p><a href="http://goo.gl/BFWEv" rel="nofollow">http://goo.gl/BFWEv</a><p>Its advantages are not obvious to me..
评论 #4372795 未加载
pyrealmost 13 years ago
Why not just fork the subprocess rather than forking the monitoring process?
评论 #4372643 未加载
aw3c2almost 13 years ago
Nice!<p>Would be ace if you could add i/o to it (eg maybe through iotop?).
评论 #4372988 未加载
评论 #4372632 未加载
repomanalmost 13 years ago
htop will solve all your problem. Why even bother Monner?
评论 #4372986 未加载
rabbitfangalmost 13 years ago
What is the minimum python version required to run this?
xnt14almost 13 years ago
Does this work on child threads?
lectrickalmost 13 years ago
What is all this methods-starting-with-an-underscore crap? That's a pretty shitty way to namespace methods. /ruby guy
评论 #4373186 未加载