Script to auto restart a service


 
Thread Tools Search this Thread
Operating Systems HP-UX Script to auto restart a service
# 1  
Old 02-19-2010
Script to auto restart a service

Hi All,
May i please know if it is possible to write a script to check the log messages and automatically restart a service if it is failed or it is stopped.

Appreciate your suggestions.

Thanks in advance.


regards,
Eajaz
# 2  
Old 02-19-2010
Yes, it is possible.
# 3  
Old 02-19-2010
Thanks fpmurphy...i will try to find out such scripts..iam very new to the Linux admin role.Smilie
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Script to auto restart java for 100 percent

I want the tomcat to restart when java goes 100% cpu utilize and remain on this , Get pid kill and start tomcat . top | grep java We can get pid and cpu utilize , But how can we do on run time. Please use code tags as required by forum rules! (1 Reply)
Discussion started by: kaushik02018
1 Replies

2. Red Hat

Restart service xinit.d or init.d ?

Hello How do I restart init.d ?? (centos 6.5) Thanks (2 Replies)
Discussion started by: mnnn
2 Replies

3. SuSE

Service restart daily

Hi, Beside using crontab, what is other application we can set it? Normally I check using command crontab -l. Any other path I need to check? Please guide me. Thanks. (2 Replies)
Discussion started by: mzainal
2 Replies

4. Shell Programming and Scripting

script to restart a service in secondary server.

Can any one help me with a script to restart secondary server and sync data in it.. smsc101-0:ssh smsc101-1 "invoke-rc.d smsc restart" pwd:*** smsc101-0:rsync -avz /usr/local/smsc/data smsc101-1:/usr/local/npac/data (1 Reply)
Discussion started by: chinuku
1 Replies

5. Shell Programming and Scripting

Need to Restart Service with Password

Hi All, Requirement : I need to check for some services in my environment and restart the service if its not running. I have written script to check the script if its running or not. While if its not running i need to restart it using ./start command. But it will ask for password prompt and i... (4 Replies)
Discussion started by: pradeepbaliga
4 Replies

6. UNIX for Advanced & Expert Users

Opinion on auto-restart of failed apps/services

I'm becoming a dying breed where I work. More and more sys admins are advocating automatically restarting failed services such as tomcat, jboss, etc. I've always been against doing this except with buggy apps that can't be fixed or avoided. My main argument is that I feel it's a trick used by... (9 Replies)
Discussion started by: mglenney
9 Replies

7. Shell Programming and Scripting

Auto restart script does not work

I have a service that are not 100% stable and stops from time to time. So I have a script that do restart the service if it does not run. This script works win on Ubuntu 9.04 but will not start the service in Ubuntu 10.10 If I run the part that do starts the service from CLI, it starts... (2 Replies)
Discussion started by: Jotne
2 Replies

8. Shell Programming and Scripting

Restart a Service!!

Hello, I am trying to write a script which will monitor few processes(winbind) for cpu utilization, If the process consumes more than say 99% cpu for 3 minutes, I want to run a script to restart the service which forks the process. ---------- Post updated at 11:21 AM ---------- Previous update... (5 Replies)
Discussion started by: linuxaddict7
5 Replies

9. UNIX for Dummies Questions & Answers

Service Restart Netbackup

For vertitas netbackup 6.0 I have media server :Solaris Client server: Windows I want to restart the netbackup service on the media server . plz suggest ASAP. (1 Reply)
Discussion started by: saurabh84g
1 Replies

10. Shell Programming and Scripting

Auto Detection/Restart of Sybase Deadlocks

Does anyone have an example of a ksh script that executes a Sybase stored procedure, via the ISQL command, and can detect a deadlock and loop until the process completes successfully? I'm a little confused on where to start. Thanks in advance for any assistance you can provide. (0 Replies)
Discussion started by: BCarlson
0 Replies
Login or Register to Ask a Question