Sponsored Content
Full Discussion: Restarting a Crashed Process
Top Forums Shell Programming and Scripting Restarting a Crashed Process Post 70634 by google on Monday 2nd of May 2005 04:44:55 PM
Old 05-02-2005
Why did you choose to exit your script? I probably would try something like this:

For each process
Check to see if a process is running based upon your script name
if no process is found
Submit the process in the background
Create a lock file containing the PID value
Determine an appropriate wait interval then poll each process based on the
value contained in the lock file. If the process is no longer running, restart it, otherwise check the next process.

Run the script from a crontab but make sure you only have 1 instance running at a time (again use a lock file for the main script).

Last edited by google; 05-02-2005 at 09:24 PM..
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

old server crashed

Hello We had an old system designed in fortran that ran on a IBM RS6000 AIX 3.2 system. The person who designed is long gone. It was replaced with a completely different (non unix) system 6 years ago. We still used it for historical lookups of older information. Well yesterday it died. The... (5 Replies)
Discussion started by: billfaith
5 Replies

2. AIX

AIX Crashed..

My AIX 5.3 Machine Carshed Can any one tell some way to find out what went wrong.. I mean debug why it got creahed... (3 Replies)
Discussion started by: pbsrinivas
3 Replies

3. Linux

system getting crashed

Hello, Iam a running a apache webserver in CentOS and i get a heavy traffic about 2.5 lac pageviews daily and my db size is about 2GB. Now the problem is after serving some lacs of requests by apache....Both apache and mysql hangouts and the system gets hanged up...using all resources in the... (2 Replies)
Discussion started by: dheeraj4uuu
2 Replies

4. Linux

Find out process that crashed the server

Hi everybody, I want to find out all the processes that ran before a server crashed. Is that possible? I've looked in /var/log/messages and found out that the system was out of memory. A user probably wrote a script (in Perl or Python) that used up all available memory and crashed the... (11 Replies)
Discussion started by: z1dane
11 Replies

5. Red Hat

Process does not dump any core files when crashed even if coredumpsize is unlimited

Hello Im using redhat and try to debug my application , its crashes and in strace I also see it has problems , but I can't see any core dump I configured all the limit ( im using .cshrc ) and it looks like this : cputime unlimited filesize unlimited datasize unlimited... (8 Replies)
Discussion started by: umen
8 Replies

6. Shell Programming and Scripting

Script for to kill the process Ids when restarting the unix server

Hi, I need a script to kill the process Ids for the user ABC. I prepared the following script after that while logging with user therough script i am not sure how to pass the user name and password.Can ou modify the script and help me out. #!/bin/bash for filesize in $(ls -ltr | grep... (4 Replies)
Discussion started by: victory
4 Replies

7. UNIX for Dummies Questions & Answers

Restarting a process

Hi, How is it possible to restart only your process. I can get the process killed but I am not able to start it. For eg : i first did this ps -ef|grep _out --displays all the process with _out in the name then I killed kill -15 36044 -- process id. Now how can i start the same... (1 Reply)
Discussion started by: TH3M0Nk
1 Replies

8. Solaris

System got crashed.

Hi Admins, In my local Vmware system i have installed solaris but while getting my root disk mirrored in svm I changed the vfstab entries and rebooted the server , the server got crashed, and now the root file systems and other filesystems are crashed. Please help me in recovering this. (2 Replies)
Discussion started by: Laxxi
2 Replies

9. Shell Programming and Scripting

Need help in restarting process

Hi friends, I have one unix command which is used to check the network status manually. followig is the command check_Network this command give follwoing status Network 1 is ok Network 2 is ok network 3 is ok network 4 is ok . . . . Network 10 is... (8 Replies)
Discussion started by: Nakul_sh
8 Replies

10. Red Hat

Process with S state(Interruptable) in RHEL and gives Advertise error after restarting/Killing the p

Hello, In our Production system one process is in S state(interruptible)and after killing and restarting the process gives 'advertise error'. This error goes after rebooting the Server. I have RHEL 5.9 (tikanga) OS in our server. We tried debugging the issue with the help of 'strace' command... (9 Replies)
Discussion started by: Rohits
9 Replies
apport-cli(1)						      General Commands Manual						     apport-cli(1)

NAME
apport-cli, apport-gtk, apport-kde - Apport user interfaces for reporting problems SYNOPSIS
apport-cli apport-cli [ --save file ] symptom | pid | package | program path | .apport/.crash file apport-cli -f apport-cli -f -p package -P pid apport-cli -u report-number Same options/arguments for apport-gtk and apport-kde. DESCRIPTION
apport automatically collects data from crashed processes and compiles a problem report in /var/crash/. This is a command line frontend for reporting those crashes to the developers. It can also be used to report bugs about packages or running processes. If symptom scripts are available, it can also be given the name of a symptom, or be called with just -f to display a list of known symp- toms. When being called without any options, it processes the pending crash reports and offers to report them one by one. You can also display the entire report to see what is sent to the software developers. When being called with exactly one argument and no option, apport-cli uses some heuristics to find out "what you mean" and reports a bug against the given symptom name, package name, program path, or PID. If the argument is a .crash or .apport file, it uploads the stored problem report to the bug tracking system. For desktop systems with a graphical user interface, you should consider installing the GTK or KDE user interface (apport-gtk or apport- kde). They accept the very same options and arguments. apport-cli is mainly intended to be used on servers. OPTIONS
-f, --file-bug Report a (non-crash) problem. If neither --package, --symptom, or --pid are specified, then it displays a list of available symp- toms. If none are available, it aborts with an error. This will automatically attach information about your operating system and the package version etc. to the bug report, so that the developers have some important context. -s symptom, --symptom=symptom When being used in --file-bug mode, specify the symptom to report the problem about. -p package, --package=package When being used in --file-bug mode, specify the package to report the problem against. -P pid, --pid=pid When being used in --file-bug mode, specify the PID (process ID) of a running program to report the problem against. This can be determined with e. g. ps -ux. -c report, --crash-file=report Upload a previously processed stored report in an arbitrary file location. This is useful for copying a crash report to a machine with internet connection and reporting it from there. Files must end in .crash or .apport. -u report-number, --update-report report-number Run apport information collection on an already existing problem report. The affected package is taken from the report by default, but you can explicitly specify one with --package to collect information for a different package (this is useful if the report is assigned to the wrong package). --save filename In --file-bug mode, save the collected information into a file instead of reporting it. This file can then be reported with --crash- file later on. -w, --window Point and click at the application window against which you wish to report the bug. Apport will automatically find the package name and generate a report for you. This option can be specially useful in situations when you do not know the name of the package, or if the application window has stopped responding and you cannot report the problem from the "Help" menu of the application. ENVIRONMENT
APPORT_IGNORE_OBSOLETE_PACKAGES Apport refuses to create bug reports if the package or any dependency is not current. If this environment variable is set, this check is waived. Experts who will thoroughly check the situation before filing a bug report can define this in their ~/.bashrc or temporarily when calling the apport frontend (-cli, -gtk, or -kde). FILES
/usr/share/apport/symptoms/*.py Symptom scripts. These ask a set of interactive questions to determine the package which is responsible for a particular problem. (For some problems like sound or storage device related bugs there are many places where things can go wrong, and it's not immedi- ately obvious for a bug reporter where the problem is.) AUTHOR
apport and the accompanying tools are developed by Martin Pitt <martin.pitt@ubuntu.com>. Martin Pitt August 01, 2007 apport-cli(1)
All times are GMT -4. The time now is 02:11 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy