On Wed, Mar 23, 2005 at 03:54:30PM -0600, Raymond Norton wrote:
> I am running a fedora core 1 box with perl 5.8.3. the server is shutting
> down services because of being out of memory, etc.. When I run Top it
> shows perl is dominating 98% cpu time and 70 % of the memory. This occurs
> even when httpd is shutdown. Any ideas how to find out what is causing
> this?

ObNitpick:  Perl is not a web-based process.  Many web applications
have been written in perl, but thinking that perl should not be doing
anything unless a web server is running is as absurd as thinking that
your C libraries should not be in use unless a game is running.

Now that that's out of the way, the first thing I would try, if you
want to find the cause, is to get the process ID from top and then do
a `ps <process id>` to see what command-line arguments it was given,
which is likely to include the name of the script it's running.  You
could also try `pstree -p | less` and search in less for the runaway
process's pid to see what started it.

Or, if you just want to get rid of it and you're not that worried
about why it's there, you can always just `kill <pid>`...  (Well, OK,
it sounds like a recurring problem.  So write a script (preferably in
perl for the sake of poetic justice) that periodically checks `top -n
1` and automatically kills off any processes exceeding a certain
amount of memory usage and/or cumulative CPU time.  Or you could
probably do something with ulimit to do the same auto-kill, but
that's less fun than teaching perl to kill perl.)

-- 
The freedoms that we enjoy presently are the most important victories of the
White Hats over the past several millennia, and it is vitally important that
we don't give them up now, only because we are frightened.
  - Eolake Stobblehouse (http://stobblehouse.com/text/battle.html)