[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference noted::sns

Title:POLYCENTER System Watchdog for VMS OSF/1 ULTRIX HP-UX AIX SunOS
Notice:Wishes:406,FAQ:845,Kits-VMS:1000,UNIX:694 VMS ECO01 FT kit: 521
Moderator:AZUR::HUREZZ
Created:Fri May 15 1992
Last Modified:Fri Jun 06 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:1033
Total number of notes:4584

1013.0. "P1 setting" by 23111::WILLIAMCHAN () Thu Mar 06 1997 02:33

Hello,

	Customer would like to know how to include the Event message
	text within a command file to alert the user in the Watchdog
	Consolidator:

	I've tried the following procedure:

	1. Create the command procedure:
	$ repl/terminal=fta21:/bell    as the REPLY.com
	2. Then add it in the action routine during the process missing:
	   @Reply.com p1 
	3. Then I stop the process e.g. pwrk$monitor but the message didn't
	   prompt out.
	4. I've also tried @reply.com 'p1' or @reply.com "p1" but no help.
	5. The result I've expected when the process missing is getting the
	   message as follows: 
	Reply received on HGOSPS from user WILLIAMCHAN at _HGOSPS$fta21:12:28:04
	Process missing
	
	I've reference the User Programming guide 7-3 Spawn mode operation;
	
	If the first character is @, the command has the following format:
	@DCL_command P1 P2 P3 P4 P5 P6 P7 P8

	Did I overlook something or setting incorrectly?


	Thanks for any help.

Best regards,
William
T.RTitleUserPersonal
Name
DateLines
1013.1Sample broadcast action and configuration instructionsAZUR::HUREZConnectivity & Computing Services @VBE. DTN 828-5159Thu Mar 06 1997 09:23108
$! BROADCAST.COM SNS action routine.
$!------------------------------------------------------------------------------
$! Abstract
$!
$! Broadcasts event details on the specified operator's terminals
$! and/or mails them to the specified mail address.
$!------------------------------------------------------------------------------
$! Configuration
$!
$! o On operator's terminal(s)
$!
$!     $ set broadcast=general
$!     $ set terminal/broadcast
$!
$! o Profile setup
$!
$!     SNS$EDIT> add action_routine_set broadcast/mode=spawn/log_file -
$!                   /command=@sys$login:broadcast.com -
$!                   /output=sys$login:broadcast.log
$!     SNS$EDIT> modify class default/event=all/action_routine_set=broadcast
$!     SNS$EDIT> modify external_message_class default /pos=1 -
$!                   /action_routine_set=broadcast
$!
$! o System mgt. -- the Consolidator needs to spawn the action routine with
$!               -- the OPER privilege, so...
$!
$!     $ instal replace sys$system:sns$consolidator.exe /priv=oper
$!
$! o Mail address / operator to notify - see below...
$!
$!------------------------------------------------------------------------------
$! Edit the following symbols definitions to direct notification to
$! the operator on duty...
$!
$ operator         := hurez
$ operator_vaxmail := ccomca::hurez
$!
$!------------------------------------------------------------------------------
$ w := write sys$output
$!
$!------------------------------------------------------------------------------
$! Trace and decode parameters...
$!
$! i = 1
$! loop:
$!   w "P''i': <" + P'i' + ">"
$!   i = i + 1
$!   if i .le. 8 then goto loop
$!
$!
$ ful = P1                 ! Full event message time stamp + node + text.
$ txt = f$extract(20,112,P1)   ! Extract event text...
$                              ! (20 1rst characters are timestamp & nodename)
$ dat = f$edit(P2,"trim")  ! Date/time stamp
$ evc = f$extract(6,3,P3)  ! Event code (CPU, MEM, DSK, DNF, ...)
$ nod = f$edit(P4,"trim")  ! Nodename
$ clu = f$edit(P5,"trim")  ! Cluster name
$ act = f$edit(P6,"trim")  ! Action routine set name
$ sts = f$extract(6,3,P7)  ! Status code (NEW, UPDate, REMoved...)
$ prm = f$edit(P8,"trim")  ! Event message parameters
$!
$!------------------------------------------------------------------------------
$! Filter out everything but new messages
$! (comment out next line to view event updates & removals as well as news)
$!
$! if sts .nes. "NEW" then goto clean_and_exit
$!
$!------------------------------------------------------------------------------
$! Build message to be displayed to the operator.
$!
$ if ( nod .nes. clu )
$ then loc = f$string(nod+" (cluster "+clu+")")
$ else loc = nod
$ endif
$!
$ msg = "PSW ''sts' ''evc' on ''loc': """"''txt'"""""
$!
$!------------------------------------------------------------------------------
$! Either issue a reply to operator's terminals or mail him with event data.
$! (comment out unnecessary lines)
$!
$! Reply to terminal
$!
$ set process/priv=oper
$ reply/user='operator' "''msg'"
$!
$! Use VAXmail
$!
$! mail nl: 'operator_vaxmail' /subject='f$string(msg)
$!
$!------------------------------------------------------------------------------
$! Now, cleanup and exit
$!
$clean_and_exit:
$!
$! Purge logfiles...
$!
$ if f$mode() .eqs. "BATCH"
$ then
$   logfile = "sys$login:" + f$parse(f$environ("procedure"),,,"name") + ".LOG"
$ else
$   logfile = f$environ("procedure") - ".COM" + ".LOG"
$ endif
$!
$ if f$search(logfile) .nes. "" then purge/nolog/keep=2 'logfile'
$!
$ exit
    
1013.2The ECO04 will provide the .-1 sample action into SNS$EXAMPLESAZUR::HUREZConnectivity &amp; Computing Services @VBE. DTN 828-5159Thu Mar 13 1997 08:231