Download Contents - Datatek Applications

Transcript
System Administration
4.
The message format, which shows the fields contained in the alarm
message, is in Appendix H. The fields may be accessed by your program
or can be manipulated.
5.
Determine what fields you need from the message you located in Step 4 of
this procedure.
6.
Write a program in the OS shell or C language to perform the function you
selected in Step 1 of this procedure.
NOTE:
In a shell program, to echo any message field using $variable, your
program must have double quotes around the variable. For example, to
echo the MSGCATEGORY field, include a line of the form:
echo "$MSGCATEGORY"
7.
Run the Programmer's Interface with the final working program using the pi
command.
The message application procedure is illustrated in the following example.
Programmer's Interface Application Example
This example follows the steps outlined in Procedure 3-32 to execute a shell
program when any alarm occurs on the node located in Philadelphia called
PHILA1. The program writes one-line message summaries to a file named pilog in
the administrator's $HOME directory. The administrator can monitor the file's
contents, or simply count the number of alarms using the OS wc -l utility. The
program may be run for any length of time needed to determine the nature and
severity of node failure problems. The resulting file should be deleted when it is no
longer needed so that it does not become too large and possibly create problems
on your system.
Determining the Program Function and
Message Type
The function of the program is to log all alarms from the node called PHILA1, to a
text file in the administrator's $HOME directory. The program should run each time
StarKeeper II NMS receives a Report Failure alarm from PHILA1 node located in
Philadelphia.
3-74
StarKeeper II NMS Core System Guide R10.0, Issue 1