[Gllug] ulimits

Jon Masters jonathan at jonmasters.org
Sun Sep 2 02:33:37 UTC 2001


On 02 Sep 2001 02:05:47 +0000, Ian Norton wrote:

> you could have something do 'ps -aux' every 120 sec or so and interperet its
> output, if root all processes will be seen, and thier cpu/ram usage%.

I was thinking of monitoring along these lines - but not from a script.
I think I would rather it were a very small compiled program[0] which
could be run quite frequently[1] to monitor activity. For the most part
in the actual situation in which I wish to use this it does not matter
if I cannot do the full monitoring I want - I suppose I am mostly now
interested in this because it seems so tricky.

> it could add it all up and if user 'fred' owns a process over say 40% cpu then
> that process will get reniced to really priority.

Ideally, one would also stop processes which went over another
threshold, and then be able to automatically do a ptrace() of very
intensive processes to "intelligently" look for stupid stuff like a
program getting in to loop calling the same instuction continually for X
period of time[2]...and so forth. Of course you would "want" to entirely
be able to specify this in some kind of uber XML configuration file or
something :)

> maybe we could start a project on it? sourceforge anyone?

Possibly yes, but I would rather wait until the start of term when I'll
be busy sleeping^W studying and have time to look at this sort of thing
some more. I haven't completely been deterred from sticking nasty stuff
in the scheduler sometime - mostly so I can learn more about it, rather
than for usefulness :)

Actually on the subject of process monitoring, I have also said to my
department that I wish to provide them with some more intelligent
scripts to look for dodgy things running on their boxen (like John and
so forth) and to report these things - maybe if we do look at this idea
some more we could integrate the two somewhat and allow for the
configuration to list patterns of system calls and other things to look
for and log to syslog. Sounds like a good idea huh? :)

...as long as you forgive me for switching your machine off - I'm still
sort of scared going too near you Ian in case you decide to enact
rightful vengance :P

Cheers,

--jcm

[0] certainly not perl. When you, Chris and others can make perl fly
like
    the wind then maybe it would be more appealing for such "low level"
stuff.

[1] or more likely just run as its own daemon.

[2] of course you need to be able to ignore stuff like stupid numbers of
calls
    to gettimeofday() and other functions some programs are too happy to
waste
    clock cycles calling...strace Adobe's Acrobat Reader sometime when
it's not
    so evil to use it :)



-- 
Gllug mailing list  -  Gllug at linux.co.uk
http://list.ftech.net/mailman/listinfo/gllug




More information about the GLLUG mailing list