psopus.pl
command allows the HST OPUS pipeline user to
check the process status of OPUS processes, including OPUS servers, for
multiple nodes at the same time. The processes can be owned by the current user
or by a different user. In addition, this command will allow the current user
to terminate his/her own processes on these nodes.
The script will utilize the user's setting of OPUS_REMOTE_SHELL and OPUS_HOME_DIR from the opus_login.csh file.
The script was designed to work on Tru64 (no longer supported), Solaris, and Linux machines.
Several presumptions are made, especially in regards to killing OPUS processes, in order to simplify use of the script. For example,
psopus.pl
will warn the user of existing
PSTATs, but it will NOT delete the PSTATs.
pscluster.pl -help
.
pscluster.pl -help
.
So when it comes right down to it, when the user specifies -kill, he must really want to kill all the OPUS processes on all the nodes. The user must correctly specify all nodes which are running processes and servers for the pipelines that need to be killed. If the user does NOT specify all the nodes on which processes are running, some servers may be restarted.
Note:
If the OPUS servers are killed before all the OPUS processes are finished coming
down, OPUS servers may restart automatically. This state can easily occur when
there are so many OPUS processes to terminate that the system has not had enough
time to finish bringing them down before psopus.pl
submits the
command to the operating system to kill the OPUS servers.
It is suggested that the user always verify the state of the servers with
another psopus.pl -t a
before assuming all processes are terminated.
Many scripts must be available through your PATH for psopus.pl to work. All are checked into the OPUS CVS library and should appear in any HST OPUS runtime tree.
Usage:
For the most current help and examples, use "psopus.pl"
or
"psopus.pl -help"
.
%psopus.pl [-node node1[,node2,...]] [-user user] [-type s|p|a] [-path path] [-kill] [-inspect] [-help]
For the most current help and examples, use "psopus.pl"
or
"psopus.pl -help"
.
Inputs
Most parameters can be abbreviated to one letter. All arguments are optional but providing none or [-help] gets you MORE usage information. [-user user] and [-kill] are mutually exclusive. [-type s or -type a] and [-path pathname] are mutually exclusive. [-kill] and [-type server or all] or [-path pathname] are mutually exclusive. (See "pscluster.pl -help" instead). -node node1,... List of nodes (separated by commas, not spaces) on which to look for processes. Default is current node. -user user Name of user for whose processes to search. Defaults to current user. -type a|p|s a(ll) Implies processes in all paths and the servers. Automatically used (default/only choice) with -kill. p(ath) Implies OPUS processes running in any path, unless -path p is used. s(ervers) Default. -path pathname Look only for processes in specified path. Extension ".path" is unnecessary. No default. Implies "-type p". Ignored if used with "-type a" or "-type s", etc. -linesize N Limit the output of unix ps command to N-characters. N < 80 is not useful. More characters give more information. Defaults to 115 characters. -kill Indicates that OPUS processes and servers should be killed. Only works for the current user. "-type a" (default) is only choice. Also implies a desire to clean up opus_corba_objs and opus_iors and be reminded to remove PSTATs. Please NOTE that ALL processes (including servers) will be killed. If you really think it is safe to kill ONLY processes running in a path, but NOT the servers, please see "pscluster.pl -help".
Otherwise, the script will print the pscluster.pl
command
it has created and the output of that command, which consists of a
banner telling the user the name of the machine on which the processes
are running, the output from a Unix ps
command about
those processes, followed by another banner.
If the -kill option is specified, then the script will also list the
PIDs of the processes being killed, the output from
alter_server_files.pl
, and any PSTATs it may have found in
$OPUS_HOME_DIR.
%psopus.pl -kill pscluster.pl -kill -t p pscluster.pl -kill -t s --- drummer (local) ------------------------------------------------------------- PID %CPU %MEM VSZ STIME COMMAND No PIDs to kill. -------------------------------------------------------------------------------- --- drummer (local) ------------------------------------------------------------- PID %CPU %MEM VSZ STIME COMMAND 19938 0.0 0.1 23216 17:18:42 opus_env_server -ORBStdProfileComponents 0 & 20106 0.0 0.1 23344 17:20:03 opus_bb_server -t OSF -i /drummer/data/user/osfs/path01/ -ORBStdProfileCompone 20064 0.0 0.1 23344 17:19:56 opus_bb_server -t OSF -i /drummer/data/user/osfs/path02/ -ORBStdProfileCompon 20269 0.0 0.1 23344 17:20:23 opus_bb_server -t OSF -i /drummer/data/user/osfs/path03/ -ORBStdProfileCom 19939 0.0 0.1 23608 17:18:44 opus_bb_server -t PSTAT -i /drummer/data/user/opus_home/ -ORBStdProfileComp 20187 0.0 0.1 23344 17:20:11 opus_bb_server -t OSF -i /drummer/data/user/osfs/path04/ -ORBStdProfileCompon 19940 0.0 0.1 23072 17:18:49 opus_event_service -i /drummer/data/user/opus_home/event/ -ORBStdProfileCom 20226 0.0 0.1 23344 17:20:16 opus_bb_server -t OSF -i /drummer/data/user/osfs/path05/ -ORBStdProfileComp 20105 0.0 0.1 23392 17:20:01 opus_bb_server -t FILE -i /Files_bb/ -ORBStdProfileComponents 0 & *** killing 19938 20106 20064 20269 19939 20187 19940 20226 20105 Sending to drummer: /bin/kill 19938 20106 20064 20269 19939 20187 19940 20226 20105 -------------------------------------------------------------------------------- Sterilizing blackboard files and looking for PSTATs user may want to remove. 2004280163843-I-**********Begin Script alter_server_files.pl********** 2004280163843-I-/drummer/data/user/opus_home/opus_iors exists, size: 0 bytes. Expect 0. 2004280163843-I-/drummer/data/user/opus_home/resource.locks exists, size: 0 bytes. Expect 0. 2004280163843-I-/drummer/data/user/opus_home/lock directory was empty. 2004280163845-I-Finished rewriting /home/user/defs/opus_corba_objs without STARTING line 2004280163845-I-**********End Script alter_server_files.pl********** Found 5 PSTATs in /drummer/data/user/opus_home/: 00004eed-proc01-absent_________.4162d7cc-path01___-drummer______________-____ 00004e4c-proc02-absent_________.4162d7b8-path02___-drummer______________-____ 00004e32-proc03-absent_________.4162d7b2-path03___-drummer______________-____ 00004ea2-proc04-absent_________.4162d7c5-path04___-drummer______________-____ 00004e65-proc05-absent_________.4162d7bf-path05___-drummer______________-____