I got a simple script working to check if a process is running and then email if it is not running anymore. My scenario is that I need to make sure the process is always running so instead of running the below script via cron I think it is better to a have a looping script to check continually. I'm unsure on this and don't want to bodge it up and create a burden to the system.
I did search but couldn't get a match that helped me. Can anyone point me at a sample I can edit please?
I have this script:
-------------------------------------------------------
#!/bin/ksh
#
if ] ||
]
then
echo "Executing main_load.sh script"
/usr1/psc_load/jobs/cron/main_load.sh "ods"
else
echo "File not found, do nothing"
fi
exit 0
... (4 Replies)
Hi All,
I have a requirement as below.
I supposed to get a file from Source system once in a month. But we dont know when the source system will send the file. My script has to wait for that file in LOOP once it gets the file then it has to FTP the file.
I thought of scheduling the job... (5 Replies)
Hi Gurus,
Could you please help me to create a shell script that will be started by a cron job once every night at 24.00 h (that should bee easy:))
The shell script should control every 30 seconds the name of a process, and when the process doesn't run anymore it should execute a few further... (12 Replies)
Hi ,
I have a csh code below which check the process if it's running.
Can any expert advise me on the following:
1) what does this notationmean ">!" and how is it different from the append ">" notation ?
2) how does "setenv" work in this code ?
# Check whether there is a running... (3 Replies)
Hi
I would like to check if an instance of a script is already running.
I've seen many different examples, but I haven't the slightest idea as to how to do this.
Can you please help.
Thank you. (5 Replies)
How to I check if a process is running in C? I'm trying to use ps aux |grep "process name" but failing in doing that. How do I do that?
Thanks, (1 Reply)
Hi,
I check if the process is running or not using the below.
/usr/ucb/ps auxww | grep 109 |grep rmi | awk '{print $2}'
9718
Thus we see 9718 is the PID.
It return blank if the process is not running.
I need to perform some action if the process is not running and leave it if... (8 Replies)
I have process1 running on one machine and generating some log file. Now another process which can be launched on any machine wants to know if process1 is running or not and also in case it is running it wants to stream the logs file generated by process1 on terminal from which process2 is... (2 Replies)
Hi,
I have a script which triggers an infinite loop.
#!bin/bash
trig=`ls /home/trig.tch |wc -l`
function callj {
some commands...
}
while
do
callj &
done
The number of process after doing a ps -ef |grep Mon.sh returns
processes even after the script is killed by deleting the... (4 Replies)
cd /opt/et/WAS/apps/8.0
find . -name "HostIntegration.properties" -o -name "HostSocket.properties" -o -name "environment.properties" 2> /dev/null | awk -F '' '{print $4}'|awk '!x++' | cat>/home/cbadmin/file1.txt
cd /home/cbadmin/
PS3='Please enter a number from list of applications==>:'
select... (3 Replies)
Discussion started by: bhas85
3 Replies
LEARN ABOUT HPUX
fsdaemon
fsdaemon(1M)fsdaemon(1M)NAME
fsdaemon - pass-through daemon for processing system commands
SYNOPSIS
fork]
DESCRIPTION
The is a user level daemon that provides a mechanism to pass information between applications and common commands and library functional-
ity, allowing certain applications to dynamically add functionality to a system. This is currently only supported for the class of APIs,
such as:
The API are not yet publicly available, but the commands that use the mentioned APIs depend on this daemon to always be running in the HP-
UX environments.
Options
When is started, indicates whether it should fork a child process and exit the parent process or run just as the parent process and
not return. A value of 1 for fork will make fork and exec a child process and then cause the parent process to exit.
Kills the current running instance of
Tests and waits until
is ready to process commands. There is a window where could be started and not yet setup to process commands. The caller should
invoke separately with the option to block until is ready to process commands.
The entries to start are in the file. These entries be present to ensure correct functionality of the system. They should appear as one
of the first entries in placing entries before entries in is dangerous and unsupported.
The following are some of the HP-UX commands that use via the above APIs: and
RETURN VALUE :
0 Successful start of If invoked with the option, 0 is always returned.
>0 Errno of failure that caused to fail to start. This applies only if was started with the option.
ERRORS
If is not running, the errno will be returned by an application that invokes these APIs. If this happens, please see your system adminis-
trator to make sure is properly running.
EXAMPLES
To start such that it can be invoked without permanently blocking the calling process:
To kill the currently running instance of
To check to see if the currently running instance of is ready and able to process requests sent to it:
The following entries for starting should appear in the file:
WARNINGS
The APIs are not yet publicly available, but the commands that use the mentioned family of APIs depend on this daemon to always be running
on HP-UX environments. The administrator is not expected to invoke the command from the shell prompt; it should always be started via an
entry in
This manpage is provided for administrator's trouble shooting purposes, and to allow the system administrator to repair the entries for
this daemon in case of corruption.
The interface/options provided in this manpage are HP-UX release specific, and may be different in future releases.
AUTHOR
was developed by HP.
SEE ALSO fstyp(1M), mkboot(1M), mount(1M), fstatfsdev(3C), fstatvfsdev(3C), statvfsdev(3C), statfsdev(3C), inittab(4).
fsdaemon(1M)