
264 Chapter 11
Utilities
Event processing
event_logger should never terminate, but must be killed. If a second
copy of event_logger is started it attempts to kill the existing copy of
the event_logger. There should only be one copy of event_logger
running at any one time.
The following return code indicates a fatal error occurred.
-1 unknown option
log_event
log_event logs its STDIN to the event log as a single event.
log_event has the following format:
log_event [-c] [event number] -n NODE_ID
where:
• [event number]—Specifies is the event code to use in one of three
ways:
• Command line
• First line of the input
• Default
• [-c]—Specifies that event is displayed to the console in addition to
logging it to the event_log
• -n NODE_ID—Specifies the node this event is being logged against
The default event code is used if one is not specified using one of the
other methods. The command line method is used by specifying a
decimal or hex (leading 0x) as the only number on the command line (the
-c option optionally may be present). The input mode is used if a number
is the first thing on the first line read from STDIN. The input mode
overrides the command line. In the last case, the entire first line is not
logged.
When entering text for an event, you may terminate and send the
event with a ctrl-D. You may cancel the event with ctrl-C.
log_event always returns 0.
log_event is used by scripts such as the interrogators and extractors to
put information into the event log as follows:
log_event [-c] [number] -n NODE_ID