Sponsored Content
Top Forums UNIX for Advanced & Expert Users Opinion on auto-restart of failed apps/services Post 302524266 by methyl on Sunday 22nd of May 2011 08:21:25 PM
Old 05-22-2011
The hard bit can be detecting that the application has failed. Just relying on the output from a single "ps" command is not safe because a busy system may give a blank or incomplete response to a "ps" command.

To paraphrase Corona688 there is no harm in installing a workaround while you find and repair the root cause ... or determine that the root cause cannot be repaired.

If for example you have a client-server application running on an unreliable network (like the Internet) there is a good case to configure a client retry mechanism backed with a carefully-designed automatic client restart combined with a matching dead-session cleanup in the server.
 

9 More Discussions You Might Find Interesting

1. 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

2. Linux

file location for GNOME auto startup apps

I know how to add an apps to auto-start in GUI, but I'd like to know how to do it mannualy. So where is the file saved to by GUI ? (1 Reply)
Discussion started by: honglus
1 Replies

3. HP-UX

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 Replies)
Discussion started by: ajazshariff
2 Replies

4. 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

5. AIX

problem to restart services from /etc/inittab in AIX6.1

hello, i have an AIX6.1.7.2 machine that it was upgraded recently from AIX5.3.9.4. when i kill system services that should restart automatically like /usr/sbin/cron it doesnt start. i checked my /etc/inittab file and i confirmed that this service is in respawn status so when i kill this process... (2 Replies)
Discussion started by: omonoiatis9
2 Replies

6. Shell Programming and Scripting

Need script to restart the services

Hi Guys, I need bash script to restart the service. 1. Disable the service called SASM svcadm disable sasm 2. if service went to maintenance mode then it shuld clear it with below command svcadm clear sasm 3.or else it should restart the mysql service /etc/init.d/mysql stop... (1 Reply)
Discussion started by: bapu1981
1 Replies

7. Red Hat

Restart of services if port no is changed in /etc/services in RHEL

I had a doubt if any services need to be restarted if port no in /etc/services in an RHEL setup is changed. For eg, the port no of 443 for SSL may need to be changed. I hope my query is clear whether any services need to be restarted if port no in /etc/services is changed. Please revert with... (10 Replies)
Discussion started by: RHCE
10 Replies

8. 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

9. Debian

How do i correct restart network-services in Debian?

Hello, I would like to do follow steps. Set a static IP-Adress on eth0 (For Testing) Set DHCP on eth0 All steps should be done without a single reboot. /etc/network/interfaces iface eth0 inet static address 192.0.2.7/24 gateway 192.0.2.254How do i perform... (3 Replies)
Discussion started by: int3g3r
3 Replies
SYNERGYC(1)						      General Commands Manual						       SYNERGYC(1)

NAME
synergyc -- synergy client SYNOPSIS
synergyc [-d level | --debug level ] [--display display ] [--daemon | { --no-daemon | -f } ] [-n name | --name name ] [--restart | { --no-restart | -1 } ] address synergyc { --help | -h } synergyc --version DESCRIPTION
Starts the synergyc mouse/keyboard sharing client. This manual page was written for the Debian distribution because the original program does not have a manual page. Slightly old documenta- tion exists in /usr/share/doc/synergy/obsolete/index.html; it is the most up-to-date information available, despite the pathname. OPTIONS
-d level --debug level use debugging level level. Debug levels are from highest to lowest: FATAL, ERROR, WARNING, NOTE, INFO, DEBUG, DEBUG1, and DEBUG2. Only messages at or above the given level are logged. Messages are logged to a terminal window when running in the foreground, and to syslog when running as a daemon. --display display connect to the X server at display --daemon run the client as a daemon. -f --no-daemon run in client the foreground. -n screen-name --name screen-name use screen-name instead of the hostname. This option lets the client use a name other than its hostname for its screen. This name is used when checking the configuration. --restart restart the client automatically if it fails. -1 --no-restart do not try to restart the client if it fails for some reason. -h --help display help and exit. --version display version information and exit. address address of server. address has one of the following forms: o hostname o hostname:port hostname is a hostname or address of a network interface on the server system. port is a port number from 1 to 65535. port defaults to 24800. RUNNING THE CLIENT
Run the client on all computers that aren't the server using the following command line: synergyc -f server-hostname Replace server-hostname with the hostname or address of the server system. The `-f' option causes synergy to run in the foreground. This option is recommended until you've verified that the configuration works. If you didn't include the system's hostname in the configuration file (either as a screen name or an alias) then you'll have to add `--name screen-name' to the command line, where screen-name is a name in the configuration file. The client should quickly report `connected to server'. If it does not but doesn't print an error and exit immediately then it's trying to connect to the server but cannot. It will time out in 30 seconds and exit (use ctrl+c to exit earlier). You should check that the server is running and is reachable over the network and try again. If the client fails and exits it should print an error describing the problem. Here are typical problems and possible solutions: o failed to open screen: check permission to open the X display check that the DISPLAY environment variable is set o already connected: check that the synergy client isn't already running o refused client: add client to the server's configuration file o connection failed: check server-hostname the server cannot open the desired port, stop the program using that port (24800) and restart the server Once all the clients are running, try moving the mouse to each screen. Be sure to check all the configured links. STARTING AUTOMATICALLY
Synergy requires an X server. That means a server must be running and synergy must be authorized to connect to that server. I recommend to start the synergy client from a start script of your desktop environment or window manager. The commands should look something like this: pkill synergyc synergyc [options] server-hostname If you are using GNOME, you can add the synergy client to the list of the non-session-managed startup programs. For doing this, start the control center, choose `Session Properties & Startup' and then `Startup Programs'. Add a new entry with `/usr/bin/synergyc server-hostname' as the startup command. options must not include `-f' or `--no-daemon'. It's important to make sure no old copies of synergy are running so they can't interfere with the new one. SEE ALSO
synergys(1) AUTHOR
This manual page was written by Daniel Lutz <danlutz@debian.org> for the Debian system. Edited by Titus Barik <barik@ieee.org>. SYNERGYC(1)
All times are GMT -4. The time now is 03:53 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy