IOC Log Message Server (iocLogMsgServer)
The SPEAR iocLogMsgServer is derived from iocLogServer provided with EPICS base (see chapter 10 of the Application Developer's Guide). The iocLogServer process collects ascii messages logged by SPEAR IOCs, alarm handler, and channel watcher using errlogMessage, errlogPrintf, etc, and writes those messages to a file.
Modification made to iocLogServer to create iocLogMsgServer include:
Both the alarm handler and channel watcher EPICS extensions were modified to append applicable tags to the message and to use errlogMessage instead of cmlog.
- In addition to writing messages to file, messages are also reformatted and sent to the MSG_HANDLER process running on the spear1 VMS machine over a TCP connection. MSG_HANDLER puts the messages into a relational database (RDB) which is used by the SPEAR event log web browser ( ops event log description).
- Any tags appended to the front of the message by alh, CW, and errlogSevPrintf are removed from the message before the message is written to file. These tags are only used when the message is sent to MSG_HANDLER. Allowable tags include time (timestamp), stat (EPICS status), sevr (EPICS severity), fac (facility), and host (node name of the message source).
- Logging to a file is optional.
- Timestamps are formatted using strftime instead of ctime.
Details for iocLogMsgServer:
- Runs on connie under the spear account. The EPICS_IOC_LOG_INET environment variable is set to "connie" and is used by iocLogMsgServer clients. The EPICS_IOC_LOG_PORT is not defined and clients use the default of 7004.
- The startup file is $EPICS_APP/iocLog/script/st.iocLogMsgServer. The reboot startup file is /etc/init.d/st.iocLogMsgServer with a sym link /etc/rc5.d/S97iocLogMsgServer.
- The message file is defined by the EPICS_IOC_LOG_FILE_NAME environment variable which is set to $IOC_DATA/iocLog/iocLog.txt. The EPICS_IOC_LOG_FILE_LIMIT environment variable is not defined and the maximum size in characters for the log file (after which it becomes a circular file and writes new messages over old messages at the beginning of the file) defaults to 1000000.
- The stderr file for iocLogMsgServer is $IOC_DATA/iocLog/iocLogMsgServer.log.
- Source resides in $EPICS/extensions/src/iocLogMsgServer.
- The MSG_HANDLER_NODE and MSG_HANDLER_PORT environment variables used by iocLogMsgServer to forward messages on to the MSG_HANDLER process are not defined and default to "spear1" and port 4569.
- To restart iocLogMsgServer:
ssh to connie as spear.
SPEAR EPICS | SLAC Computing | SLAC Networking | SLAC Home
Contact: Stephanie Allison
Last Modified: Nov 13, 2007