parsing ps -ax output and killing processes
From: Rob (rob_at_nospam.com)
Date: 02/15/05
- Next message: Rob: "Re: parsing ps -ax output and killing processes"
- Previous message: rakesh sharma: "Re: ksh parsing question"
- Next in thread: Rob: "Re: parsing ps -ax output and killing processes"
- Reply: Rob: "Re: parsing ps -ax output and killing processes"
- Reply: Icarus Sparry: "Re: parsing ps -ax output and killing processes"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Tue, 15 Feb 2005 11:58:00 GMT
After the success of writing my first script yesterday (thanks guys!) I'm
motivated to move on to something more complex today.
How would I go about doing something like a
ps -ax | grep xxxx
and then killing any processes listed (except for the one running the
command of course). There may not be any processes, I
was thinking to detect that I could write out to a file and check the file
size, but I guess that doesn't really help me if there are
any processes listed. Basically I run a shutdown script which doesn't
always work, then need to verify that the script did work
by seeing if processes are still running and manually killing them if they
arent.
- Next message: Rob: "Re: parsing ps -ax output and killing processes"
- Previous message: rakesh sharma: "Re: ksh parsing question"
- Next in thread: Rob: "Re: parsing ps -ax output and killing processes"
- Reply: Rob: "Re: parsing ps -ax output and killing processes"
- Reply: Icarus Sparry: "Re: parsing ps -ax output and killing processes"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|