07-18-2019
/var/run/ is supposed to be writable and volatile: to be cleaned during system boot, or an in-memory file system (e.g. tmpfs).
The daemon process should create the pidfile, and remove it when it is killed, in an exit handler that captures all kill signals. (Please do not kill -9 the daemon process!)
Further, an init script can check for an existing pidfile, if yes then check for validity and refuse to start a second daemon process. If the daemon-process runs as non-root, the init script creates a subdirectory and chowns it to the daemon user.
AIX generates random and big (7 or 8 digits) pids.
These 2 Users Gave Thanks to MadeInGermany For This Post:
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi Friends :p
I have a little problem please help me out. I have a Unix based OS Sun Server having oracle 8i as database on it. The server has one client with windows OS. The client uses developer 2000 (GUI) to run query and run processes. I want to know how can I know the PID of a process run... (3 Replies)
Discussion started by: vanand420
3 Replies
2. Solaris
hi all,
Is there a simple script anyone could through out to me, to find the pid of a process given the name. I actually need to bind this pid to a processor set. I would probably put these comamns in a shell script which would have.
a) kick start the executable
b) get the pid
c) bind it to a... (10 Replies)
Discussion started by: Naanu
10 Replies
3. UNIX for Dummies Questions & Answers
Hi,
I need to get the pid of a process and have to store the pid in a variable and i want to use this value(pid) of the variable for some process. Please can anyone tell me how to get the pid of a process and store it in a variable. please help me on this.
Thanks in advance,
Amudha (7 Replies)
Discussion started by: samudha
7 Replies
4. Shell Programming and Scripting
Hi
I have written a shell script to find and kill the particular process. Here in shell script i have written the code like
cnt = $(ps -ef | grep Shree)
echo $cnt
I am getting the output
root 2326 2317 0 14:39:46 pts/1 0:28 Shree -f fdc.fbconf FDCapp.fbapp
Here I want to... (2 Replies)
Discussion started by: Shreedhar Naik
2 Replies
5. Shell Programming and Scripting
Hi all,
i was able to redirect pid of process to a file in the following way
ps aux|awk '$11 == "/Applications/ProjectX/DServer" >> /Applications/ProjectX/DServer.pid
it works fine but if one folder name caontains space its not working like below
ps aux|awk '$11 == "/Applications/Project\... (1 Reply)
Discussion started by: kirankumars
1 Replies
6. Programming
Hi
I use linux OS.
I've already written a function that allow me to get the process name by pid. (searching in /proc). Now I'd like to perform the inverse task.I mean get the process pid by its name.
I could write a function that search in every folder in /proc for the process name, but i... (2 Replies)
Discussion started by: Dedalus
2 Replies
7. Shell Programming and Scripting
Good day
I am fairly new to Shell Scripting.
I want a script to check if a process is up by checking the process's PID and then return a value for when it's running which would be 0. If it isn't running it should give any other value that 0.
Any Help is appreciated
Regards (9 Replies)
Discussion started by: 1nsyz1on
9 Replies
8. UNIX for Dummies Questions & Answers
Hello,
is there a way to check who is writing to a file? (pid)
Like someone starts a ftp transfer, is uploading a file and I'd need to know which pid is actually writing to it.
Or is there a way to check which file a process is currently accessing?
Greetings and thanks for all your... (4 Replies)
Discussion started by: TehOne
4 Replies
9. AIX
HI,
i used
ps -ef | grep 3539052 | grep -v grep
and i got a output like ths
root 3539052 3407918 0 May 07 - 709:31 /usr/sbin/syslogd
but what i need is instead of full path /usr/sbin/syslogd i want only the process name that is 'syslogd' here. (3 Replies)
Discussion started by: sumanthupar
3 Replies
10. Shell Programming and Scripting
Hi All, Looking for a quick LINUX shell script which can continuously monitors the flle size, report the process which is creating a file greater than certain limit and also kill that process. Can someone please help me on this? (4 Replies)
Discussion started by: vasavimacherla
4 Replies
esmd(1M) esmd(1M)
NAME
esmd - Essential Services Monitor (ESM) Daemon
SYNOPSIS
retry_seconds]
DESCRIPTION
The Essential Services Monitor (ESM) daemon, maintains the availability of essential system daemons by automatically restarting them if
they terminate. The ESM daemon monitors the Event Manager daemon, The ESM daemon is started by the init process when the system is ini-
tialized to run level 2 and continues to run until the system is shut down or returned to single user mode. Only one instance of can run
at a time.
Configuration information is sent to the ESM daemon by a control program, which is run at key points in the startup and shutdown proce-
dures. As startup or shutdown progresses, the control program updates the ESM state file, The control program then signals the daemon to
reconfigure itself.
On startup, state transitions occur after has started. On shutdown, transitions occur after each of these monitored daemons has termi-
nated. After each transition, the ESM daemon determines which of the monitored daemons should be running and adjusts its monitoring activ-
ities accordingly.
The ESM daemon reports all state change information, including notice of failures and restarts, through the system logging daemon, syslogd.
Messages are displayed on the system console during periods when syslogd is not running. See syslogd(1M) for more information.
If the ESM daemon fails to restart a monitored daemon, it reports the error by posting a high priority message through syslogd, and makes
no further restart attempts. The system administrator should investigate the problem and restart the failed daemon. The ESM daemon peri-
odically attempts to resume monitoring of the daemon, and posts an informational message when it succeeds. If the monitored daemon fails
again once monitoring has resumed, the ESM daemon again attempts to restart it.
The ESM daemon can be forced to restart a failed daemon by sending a SIGHUP signal to the process.
If there is a need to temporarily disable the ESM daemon for test purposes, in order to prevent the monitored daemons from being restarted
automatically, send a SIGSTOP signal to the process. To reactivate the ESM daemon, send a SIGCONT signal to the process. The ESM daemon
should never be disabled on a production system.
If the ESM daemon is terminated unexpectedly, it is restarted automatically by init.
Options
The command recognizes the following options:
Limit the priority of any syslog messages posted by the ESM daemon to "alert."
If this option is not specified, posts an "emergency" message if it cannot restart a failed daemon. A message may be sent to all
users currently logged in to the system. The option should only be used if the system administrator is actively monitoring syslogd
messages.
Specify the interval between attempts to begin monitoring a daemon
that has failed, and which has been unable to restart automatically. The default period is 30 seconds. Specifying a period of zero
disables retrying.
Notes
To use the start options, you must add them to the startup command in the file. The daemon reports any invalid start options with a single
generic message through syslogd.
Restrictions
The daemon terminates with an error message if it is started by any process other than init.
The /sbin/init.d/esm program is intended to be run by the system startup and shutdown process and should not be run from the command line.
Only one instance of can run at a time.
RETURN VALUE
The following exit values are returned:
0 (Zero) Successful completion.
not 0 An error occurred.
FILES
Executable file
Configuration control script
Initialization process control file
dispatched by boot init
Monitoring state file
Receives esmd status messages
AUTHOR
was developed by Hewlett Packard Company.
SEE ALSO
Commands
kill(1), evmd(1M), init(1M), syslogd(1M).
Files
inittab(4).
esmd(1M)