Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #44561
| References | <CAOF-KfhSkQrRPjiyN3bkLwCguFw58Pzf-nu1ne9ZoZDQw3t6SQ@mail.gmail.com> <517FF394.9040701@davea.name> <klp0gt$8ba$1@ger.gmane.org> |
|---|---|
| Date | 2013-04-30 14:11 -0400 |
| Subject | Re: python process accounting |
| From | Rita <rmorgan466@gmail.com> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.1193.1367345488.3114.python-list@python.org> (permalink) |
[Multipart message — attachments visible in raw view] - view raw
Exactly, its a place holder measure. Currently, I have a shell program like this. #!/usr/bin/env bash exec "$@" Any thoughts how I can put python in there? On Tue, Apr 30, 2013 at 1:54 PM, Robert Kern <robert.kern@gmail.com> wrote: > On 2013-04-30 17:38, Dave Angel wrote: > >> On 04/30/2013 12:25 PM, Rita wrote: >> >>> Hi, >>> >>> I was wondering if it possible to write a python wrapper which will >>> account >>> my processes. I would like to account for all the children processes >>> (fork) >>> by looking at their /proc/<pid> info. Such as memory, io, open files, >>> stats. >>> >>> So, instead of me running "/bin/sleep 10", i would like to run it as >>> "pywrap.py /bin/sleep 10" and it will do an exec /bin/sleep 10 and do a >>> periodic snapshot for whats in /proc/<pid>/stats. >>> >> >> I only understood a quarter of that. But if you want to sleep, why not >> just >> call time.sleep ? >> > > I think that was just a placeholder example, not the program he actually > wants to measure. > > -- > Robert Kern > > "I have come to believe that the whole world is an enigma, a harmless > enigma > that is made terrible by our own mad attempt to interpret it as though it > had > an underlying truth." > -- Umberto Eco > > -- > http://mail.python.org/**mailman/listinfo/python-list<http://mail.python.org/mailman/listinfo/python-list> > -- --- Get your facts first, then you can distort them as you please.--
Back to comp.lang.python | Previous | Next | Find similar | Unroll thread
Re: python process accounting Rita <rmorgan466@gmail.com> - 2013-04-30 14:11 -0400
csiph-web