How to check on process time?
noahspurrier at my-deja.com
noahspurrier at my-deja.com
Sun Jan 14 17:01:54 EST 2001
This is neat, but as you say it's not very portable!
I tested this with some modifications on Solaris 2.6 and OpenBSD 2.7.
Solaris has a /proc filesystem and the file names are
about the same, but the 'status' file is binary.
I couldn't even find a /proc directory under OpenBSD.
I searched around a bit, but I couldn't figure out
where they stuck it. I don't have easy access to
any other UNIX flavors to test this out on.
Jeeze... I can't believe there isn't any POSIX stuff
for process status. Not even in POSIX.4?
Yours,
Noah
In article <93iip0$jhu$1 at nntp6.u.washington.edu>,
Donn Cave <donn at u.washington.edu> wrote:
> Quoth noahspurrier at my-deja.com:
> | Which Python library do I want to get extensive process information?
> As far as I know, that isn't supported on contemporary computer
> platforms, at least in any meaningfully portable way, and that
> would be why you don't see anything for it in Python. The "ps"
> command doesn't use any kind of API, it just reads kernel memory
> where this stuff is stored.
>
> If it doesn't need to be portable, and your present platform
> supports it, I'd say use the "/proc" filesystem. The following
> prints accumulated times, on FreeBSD 4.1.
>
> Donn Cave, donn at u.washington.edu
Sent via Deja.com
http://www.deja.com/
More information about the Python-list
mailing list