EasyManua.ls Logo

Sun Microsystems Netra T2000 - Page 112

Sun Microsystems Netra T2000
122 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
96 Netra T2000 Server Administration Guide September 2006
get_alarmvals();
exit(1);
}
if (strcmp(argv[1], "get") == 0) {
if (argc != 3) {
usage();
exit (1);
}
get_alarm(argv[2]);
}
else
if (strcmp(argv[1], "set") == 0) {
if (argc != 4) {
usage();
exit (1);
}
set_alarm(argv[2], argv[3]);
} else {
usage();
exit (1);
}
}
static void
usage()
{
printf("usage: alarm [get|set] [crit|major|minor|user] [on|off]\n");
}
static void
get_alarm(const char *alarm)
{
ts_aldata_t ald;
int altype = parse_alarm(alarm);
char *val;
if (altype == ALARM_INVALID) {
usage();
exit (1);
}
ald.alarm_no = altype;
ald.alarm_state = ALARM_OFF;
lom_ioctl(LOMIOCALSTATE, (char *)&ald);
CODE EXAMPLE B-1 Example Program to get and set Status of the Alarms (Continued)

Table of Contents

Other manuals for Sun Microsystems Netra T2000

Related product manuals