![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| script to monitor process running on server and posting a mail if any process is dead | pradeepmacha | Shell Programming and Scripting | 12 | 10-17-2008 12:08 AM |
| Event-Driven Business Process Management and the Example of the Deutsche Post AG | iBot | Complex Event Processing RSS News | 0 | 03-07-2008 10:30 PM |
| Business process management: Avoiding the pitfalls | iBot | Complex Event Processing RSS News | 0 | 02-13-2008 05:30 AM |
| how to start a process and make it sleep for 5 mins and then kill that process | shrao | Shell Programming and Scripting | 6 | 03-27-2007 09:54 AM |
| "Process management" question | alan | UNIX for Dummies Questions & Answers | 1 | 01-12-2004 08:11 PM |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Hi!
I desperately need some help here... I need to write a shellscript that lists all running processes (as in ps -ef), search the list it gets for occurances of a certain process, if found do nothing if not found start it again. Anyone feel up to it? /G |
| Forum Sponsor | ||
|
|
|
#2
|
||||
|
||||
|
Try something like:
Code:
#!/bin/ksh ps -ef | grep [f]oo if [ $? -eq 1 ] then echo Process not running. # Restart process here fi Replace 'foo' with whatever your process name is. The [ ] brackets around the first letter will stop grep from matching on itself. HTH |
||||
| Google The UNIX and Linux Forums |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|