Sponsored Content
Full Discussion: keeping a process alive ?
Operating Systems Solaris keeping a process alive ? Post 302474464 by cerioni on Wednesday 24th of November 2010 09:57:50 AM
Old 11-24-2010
keeping a process alive ?

Hello guys, I have one script running that I need to keep it running 24x7 so I'd like to know how can I implement a sort of monitoring process I mean if for some reason this process dies somehow it gets automatically started again.

Thanks.
 

8 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

how to kill process while keeping the submitted job running

:confused: I have a process which was schedule to run from 8am - 6pm daily. The scripts will search & run the commands that i was predefined in the database. Ususally, there were about 6-7 jobs for each submission and each job takes about 1-2 hrs and running one by one. And, I have a cron job... (3 Replies)
Discussion started by: hk_newbie
3 Replies

2. UNIX for Dummies Questions & Answers

Keeping cron jobs alive...?

Hi, I'm very new to Unix so please bear with me... :) Here is my requirement: I need to create a cron job to run two different scripts at 1 a.m. every day. Here's what I did: I used the "crontab -e" command and created a crontab file using the vi editor. When I exit the editor using... (3 Replies)
Discussion started by: yogiB
3 Replies

3. UNIX for Dummies Questions & Answers

Check whether a process is alive or not

Hi Everybody I have small requirement that needs to be implemented in shell script. Currently i have shell script which invokes a java process say "Process A" which runs in background. If some one tries to invoke again the same shell script , then there should be some mechanism inside the... (23 Replies)
Discussion started by: appleforme1415
23 Replies

4. Shell Programming and Scripting

keeping 10 process running at the same time

Hi guys, I neet to run sqlldr to charge about 50,000 files every day to my DWH, so I need to make an script to keep about 100 processes of sqlldr running at the same time. So, the issue is that i've been trying for a few days to make an script which can keep that amount of processes running, so... (2 Replies)
Discussion started by: razziel
2 Replies

5. Shell Programming and Scripting

Keeping std & err outputs alive and feed one log file in a one-shot way

Bonjour, I have a large script with a lot of print statements and misc commands. Standard and error outputs are redirected like into the following code : #!/usr/bin/ksh LOG=/<some dir>/log > $LOG exec >>${LOG} 2>>${LOG} print aaaaa print bbbbb print ccccc ... some_cmd That way,... (5 Replies)
Discussion started by: Fundix
5 Replies

6. Tips and Tutorials

My "Bread and Butter" Process Keep Alive Perl Script....

For the newbies, I should have posted this years ago.... Here is the standard (tiny) "bread and butter" perl script (on Linux) I use in my crontab files to insure key processes are alive ( just in case ! ) like httpd, named, sshd, etc. The example below if for named...... ... (1 Reply)
Discussion started by: Neo
1 Replies

7. What is on Your Mind?

Is this forum alive?

Odd thing. I posted in the Solaris forum, new user, just asking for a bit of advice. Nothing too complicated. As of this post there have been 140 views and zero replies. So that got me thinking, is this normal? I had a look around, and I see the same thing on many other threads, and in other... (2 Replies)
Discussion started by: _JonB_
2 Replies

8. Programming

Socket Keep-Alive

Hi I'm adding http 1.1 GET to my project and trying to use “Keep-Alive” HTTP connections to the host, The problem is when I recv() the first page, it succeeds. However, the 2nd consecutive recv() will receive zero bytes, for which I really have no idea. As per HTTP 1.1 I have Connection: ... (6 Replies)
Discussion started by: Projecteer
6 Replies
inittab(4)						     Kernel Interfaces Manual							inittab(4)

NAME
inittab - script for the boot process DESCRIPTION
The file supplies the script to the boot daemon in its role as a general process dispatcher (see init(1M)). The process that constitutes the majority of boot process dispatching activities is the line process that initiates individual terminal lines. Other processes typi- cally dispatched by boot are daemons and shells. The file is composed of entries that are position-dependent and have the following format: Each entry is delimited by a newline; however, a backslash preceding a newline indicates a continuation of the entry. Up to 1024 charac- ters per entry are permitted. Comments can be inserted in the process field by starting a "word" with a (see sh(1)). Comments for lines that spawn are displayed by the command (see who(1)). It is expected that they will contain some information about the line such as the location. There are no limits (other than maximum entry size) imposed on the number of entries within the file. The entry fields are: id A one- to four-character value used to uniquely identify an entry. Duplicate entries cause an error message to be issued, but are otherwise ignored. The use of a four-character value to identify an entry is strongly recommended (see WARNINGS below). rstate Defines the run level in which this entry is to be processed. Run levels correspond to a configuration of processes in the system where each process spawned by boot is assigned one or more run levels in which it is allowed to exist. Run levels are represented by a number in the range through For example, if the system is in run level only those entries hav- ing a in their rstate field are processed. When boot is requested to change run levels, all processes that do not have an entry in the rstate field for the target run level are sent the warning signal and allowed a 20-second grace period before being forcibly terminated by a kill sig- nal You can specify multiple run levels for a process by entering more than one run level value in any combination. If no run level is specified, the process is assumed to be valid for all run levels, through Three other values, and can also appear in the rstate field, even though they are not true run levels. Entries having these characters in the rstate field are processed only when a user process requests them to be run (regardless of the current system run level). They differ from run levels in that boot can never enter "run level" or Also, a request for the execution of any of these processes does not change the current numeric run level. Furthermore, a process started by an or option is not killed when boot changes levels. A process is killed only if its line in is marked in the action field, its line is deleted entirely from or boot goes into the single-user state. action A keyword in this field tells boot how to treat the process specified in the process field. The following actions can be specified: Process the entry only at boot boot-time read of the file. Boot starts the process, does not wait for its termination, and when it dies, does not restart the process. In order for this instruction to be meaningful, the rstate should be the default or it must match boot run level at boot time. This action is useful for an initializa- tion function following a hardware boot of the system. Process the entry only at boot boot-time read of the file. Boot starts the process, waits for its termination, and, when it dies, does not restart the process. An entry with this action is only scanned when boot is initially invoked. Boot uses this entry, if it exists, to determine which run level to enter initially. It does this by taking the highest run level specified in the field and using that as its initial state. If the rstate field is empty, boot enters run level The entry cannot specify that boot start in the single-user state. Additionally, if boot does not find an entry in it requests an initial run level from the user at boot time. If the process associated with this entry is currently running, send the warning signal and wait 20 seconds before forcibly terminating the process via the kill signal If the process is nonexistent, ignore the entry. When boot enters a run level that matches the entry's rstate, start the process and do not wait for its termina- tion. When it dies, do not restart the process. If boot enters a new run level but the process is still running from a previous run level change, the process is not restarted. This instruction is really a synonym for the action. It is functionally identical to but is given a different keyword in order to divorce its asso- ciation with run levels. This is used only with the or values described in the rstate field. Execute the process associated with this entry only when boot receives a power-fail signal see signal(5)). Execute the process associated with this entry only when boot receives a power-fail signal and wait until it terminates before continuing any processing of If the process does not exist, start the process; do not wait for its termination (continue scanning the file). When it dies, restart the process. If the process currently exists, do nothing and continue scanning the file. Entries of this type are executed before boot tries to access the console. It is expected that this entry will be only used to initialize devices on which boot might attempt to obtain run level information. These entries are executed and waited for before continuing. When boot enters the run level that matches the entry's rstate, start the process and wait for its termination. Any subsequent reads of the file while boot is in the same run level cause boot to ignore this entry. process This is a command to be executed. The entire field is prefixed with and passed to a forked as "". For this reason, any syntax that can legally follow can appear in the process field. Comments can be inserted by using the syntax. WARNINGS
The use of a four-character id is strongly recommended. Many pty servers use the last two characters of the pty name as an id. If an id chosen by a pty server collides with one used in the file, the file can become corrupted. A corrupt file can cause commands such as to report inaccurate information. FILES
File of processes dispatched by boot SEE ALSO
sh(1), getty(1M), exec(2), open(2), signal(5). inittab(4)
All times are GMT -4. The time now is 08:40 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy