EMS Manual
Example of Retrieving Event Messages
EMS Manual—426909-005
A-33
C Source File
if ( !(error == 0 || error == 70) ) {
printf(" Write returned error: %d.\n",error);
DEBUG();
}
/* We can now close the "standard" interface to
distributor */
CLOSE(distr);
/* Prompt user for the cpu number */
get_cpu_num();
/* prepare to re-open the distributor spi interface */
movmem( zspi_name, distr_qual, 5 );
ccval = OPEN( (int *)distr_proc_name, (int *)&distr );
if (ccval != CCE) {
printf(" Open of %s returned non-zero ccval: %d.\n",
distr_proc_name,ccval);
DEBUG();
}
/* Tell collector to use log files as event-message source */
spi_cmd_set_source();
/* Load filter and filter parameter(s) into the distributor */
spi_cmd_load_filter();
getevent_loop();
CLOSE(distr);
}