- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- Re: script
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-10-2005 09:19 PM
тАО11-10-2005 09:19 PM
script
how i check status of my process with a script?
ps -ef|grep pippo
how i check if pippo is running and then if not running start them??
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-10-2005 09:51 PM
тАО11-10-2005 09:51 PM
Re: script
Add to the bottom of inittab file the string:
xx::respawn:`
then execute:
telinit q
If script dies, the init process will restart your process automatically.
Regards,
Sergejs
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-10-2005 09:57 PM
тАО11-10-2005 09:57 PM
Re: script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-10-2005 10:32 PM
тАО11-10-2005 10:32 PM
Re: script
RUNNING=`pgrep pipo|wc -l`
if [ $RUNNING -eq 0 ]; then
mail -s "PIPO is not running" root < /dev/null
# Start the application
/path/to/pipo
fi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-10-2005 10:46 PM
тАО11-10-2005 10:46 PM
Re: script
why???
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-14-2005 03:31 AM
тАО11-14-2005 03:31 AM
Re: script
If you kill the process and it does not restart, check your /etc/inittab file. I was just running a test and set up the inittab like this:
7:2345:/home/myid/myscript
and it did not restart. (myscript is just a loop that echoes date > log.file)
However, when I change the inittab to this:
7:2345:/bin/bash /home/myid/myscript
it worked fine. Everytime I killed it, it restarted immediately.
So, check your inittab entry.
Regards,
Mark