deamon help
Barry Shein
bzs at world.std.com
Thu Feb 7 14:17:12 AEST 1991
From: jfh at rpp386.cactus.org (John F Haugh II)
>Hmmm. I'm half tempted to take that bet. One problem I envision with
>the PS approach is that the CPU resolution is to the full second, and
>there are many processes which lurk about in the background and don't
>use much more than a second in a days time.
That's a good point (see, you can tell the "wizards", they're the ones
willing to admit they may be wrong...:-)
Looks like we need another option to ps...to increase clock res.
Seriously, grokking around in the kernel proc structures tends to be
fraught with peril unless you're really pre-disposed to that sort of
thing. The next best suggestion would be to try to find a reliable
program distributed with source to just modify for this task.
"Top" comes to mind, modifying top to do this, or even just rip out
the full-screenness (there's a flag for this, -b) and modify the
print-out to include more precision and then revert to the script
idea.
Whatever, at that point the rest of the code is probably pretty
simple, just sleep, sweep an array, and kill if desired (how easy this
is depends on how top is structured internally.)
--
-Barry Shein
Software Tool & Die | bzs at world.std.com | uunet!world!bzs
Purveyors to the Trade | Voice: 617-739-0202 | Login: 617-739-WRLD
More information about the Comp.unix.wizards
mailing list