On Wed, Mar 26, 2003 at 01:36:41PM -0800, Chris wrote:
> Cool, thanks!
> 
> Now, is it possible to kill a process, based on it's name (not PID) when
> such message is triggered and an email is dispatched to my cell phone?  The

Yes it is possible.  Lets see you come up with some ideas and we'll help
you refine them.  You already got a free gimme. :-)

> reason I'm asking is because I have a client running FrontPage extensions on
> her site and she LOVES to issue the "recalculate links" feature 10 times a
> day for no reason at all.  I asked her why she's doing it, as there is no
> reason at all for her to run it to begin with, especially that frequently,
> but she is just stuck on doing it as a "preventitive maintenance."  <sigh>
> Needless to say, her site is HUGE and every time she runs this, the server
> is running at 10+ load for 30 minutes at a time.  I'd love to just kill the
> "Author.exe" process sucking up all the CPU cycles when the load gets to 5+

How about replacing the Author.exe with a script that sees if it is necessary
to actually recalculate the links at that time and only does so if it is
actually needed.  

Its hard to re-program people's "faith" based ideas.  Sometimes you need to
work around them.  It does sound like this person needs a 'Lart though.

> level (for example), to automatically stop her unnecessary imact on the
> server.  Since the PID changes all the time, it would need to kill the
> process by name (Author.exe) or look up the PID dynamically.  That's the
> only process that ever gets the server above 2.00 CPU levels so it's pretty
> safe to assume that's what's sucking up the cycles.
> 
> Thanks,
> 
> Chris
> 
> 
> 
> 
> ----- Original Message -----
> From: "Anthony E. Greene" <[EMAIL PROTECTED]>
> Sent: Wednesday, March 26, 2003 1:07 PM
> Subject: Re: CPU monitoring service => even more Correct
> 
> 
> > Chris wrote:
> > The problem is that $load actually contains a string representation of a
> > floating point number, complete with decimal point. Bash only supports
> > integer math. It will handle a string representation of an interger as an
> > integer in the correct context (similar to perl) but it will balk at
> > attempting to handle strings that look like floating point numbers.
> >
> > Try this:
> >
> > # Get the real load.
> > trueload=$(cat /proc/loadavg | awk '{print $1}')
> >
> > # Multiply the load by 100 to create an integer,
> > # then keep only the stuff in front of the decimal point.
> > load=$(echo "$trueload * 100" | bc | cut -f 1 -d .)
> >
> > # See if the load is too high.
> > if [ $load -gt $MY_THRESHOLD ] ; then
> > ... do stuff
> >
> >
> >
> > Tony
> 
> 
> 
> 
> -- 
> redhat-list mailing list
> unsubscribe mailto:[EMAIL PROTECTED]
> https://listman.redhat.com/mailman/listinfo/redhat-list
> 

-- 
Jeff Kinz, Open-PC, Emergent Research,  Hudson, MA.  [EMAIL PROTECTED]
copyright 2003.  Use is restricted. Any use is an 
acceptance of the offer at http://www.kinz.org/policy.html.



-- 
redhat-list mailing list
unsubscribe mailto:[EMAIL PROTECTED]
https://listman.redhat.com/mailman/listinfo/redhat-list

Reply via email to