Return ‘Not running' return code to enterprise manager or 0
Else
Return running return code to enterprise manager or 1
I think it the start is pretty straight forward
After the sleep part I am not 100% sure on how to get it too check again and if it is wrong return not running for example.
Thanks In Advance
Last edited by rbatte1; 08-14-2017 at 01:15 PM..
Reason: Removed gratuitous FONT formatting and added formatted lists and ICODE tags for the logic description to make it clear
Hi all,
I like to know how can I get currenlty running process start time and date , I know only porcess id in solaris and hp-ux
and
what is command to get same using ps with switch.
Thanks
Naeem (1 Reply)
Hi !
I want to start and stop a process... on different machines(HOSTS)
example :
I have machine1..machine2..machine3
And I have a NFS file system. (Wlsuite/myfile/)
I'm writing a script that will start processes in machine1.... machine2....
Preferably.. I dont want to log... (1 Reply)
Hi all,
I'm doing automation task for my team and I just started to learn unix scripting so please shed some light on how to do this:
1) I have 2 sets of datafiles - datafile A and B. These datafiles must be loaded subsequently and cannot be loaded concurrently.
2) So I loaded datafile A... (10 Replies)
Hi all,
after reading the post:
* https://www.unix.com/solaris/101653-how-get-process-start-date-time-solaris.html
I wrote my perl script and it worked like a charm.
This script is called every 5 minutes by the monitoring server crontab and is executed on the remote network elements via ssh (the... (6 Replies)
What I need to learn is how to use a script that launches background processes, and then kills those processes as needed.
The script successfully launches the script. But how do I check to see if the job exists before I kill it?
I know my problem is mostly failure to understand parameter... (4 Replies)
Hello, i'm absolutely new to the whole Operating Systems thing. I am pretty much level 0.
My assignment is to "simulate the execution of a stream of processes by a computer system, one CPU, many terminals 12 disk drives, 30 public mailboxes.
The professor runs a series of inputs which is a... (1 Reply)
Discussion started by: JaneSkylar
1 Replies
LEARN ABOUT HPUX
cmrunserv
cmrunserv(1m)cmrunserv(1m)NAME
cmrunserv - run a service from the high availability package run script
SYNOPSIS
cmrunserv [-v] service_name service_command_string
cmrunserv [-v] [-r restarts] service_name service_command_string
cmrunserv [-v] [-R] service_name service_command_string
DESCRIPTION
cmrunserv is used in the high availability package run script to run a service.
To start package's service, a user must either be superuser(UID=0), or have an access policy of FULL_ADMIN allowed in the cluster configu-
ration file. See access policy in cmquerycl(1m) or cmmakepkg(1m).
If the service process dies, cmrunserv updates the status of the service to down. The cluster software will recognize the change in status
and execute the normal package recovery sequence. This includes executing the package halt script, determining if the package can be run
on a different node, and, if so, executing the package run script on the new node.
Should the service_command be halted by the cmhaltserv command, a SIGTERM signal will be sent to the process. This executable or shell
script should be able to handle a SIGTERM signal and execute a graceful shutdown performing any cleanup necessary. If the process ignores
the SIGTERM, a SIGKILL will be sent to the process. If a SIGKILL is sent, the process will die immediately and will be unable to perform
any cleanup.
Options
cmrunserv supports the following options.
-v Verbose output will be displayed.
-r restarts
Indicates that the service should be automatically restarted by the cluster software if it fails, without halting the
package. restarts indicates how many times the service may fail before the package should be halted.
-R Indicates the service should be restarted an unlimited number of times if it fails.
service_name
Name of the service as it exists in the package configuration information.
service_command_string
Process string to be started. This includes the process name and any arguments necessary for the process to run. The
process name must be a full path, may be either a command name or a shell script, and must be executable.
RETURN VALUE
cmrunserv returns the following values:
0 Successful completion.
1 Command failed.
EXAMPLES
To run the service command string /var/opt/db/database1 under the service name db1, do the following:
# Run the process /var/opt/db/database1
cmrunserv db1 /var/opt/db/database1
This line should only be executed within a package run script.
AUTHOR
cmrunserv was developed by HP.
SEE ALSO cmhaltserv(1m), cmquerycl(1m), cmmakepkg(1m), cmmodnet(1m).
Requires Optional Serviceguard Software cmrunserv(1m)