| ||
| ||
Interface with IOMON 3.0by Christopher M. Borys, May 15, 2008There are several ways to interface the I/O monitor engine (IOMON). For simplicity and minimal effort there is ready to use IOMONVIEW utility program providing various ways to show current status and signal values. For more complex yet not too "heavy" there is PHP interface. PHP script interfacing IOMON can be developed without any additional tools or compilation process. PHP also fits well into web interface allowing for nice graphics and interactive user input as well. The PHP interface is free and comes with several sample programs installed on the based system. There is also C/C++ interface allowing for development of customized programs going way beyond capabilities of PHP. The C/C++ interface can be purchased from BORYNET as an add-on development kit for Linux i386 platform only. IOMONVIEWThe most simple to use is the included utility program iomonview. IOMONVIEW communicates with IOMON via shared memory and displays current information to the standard output which is your console. When logged in to DCS, type: $> iomonview -h Usage: iomonview [options] This program shows the content of iomon output saved in shared memory. It is a simple facility to allowing to display current values of signals and alarms. -a, --alarm alarms only -A --all all (-as): analog and alarms -d, --delim ARG delimeter string -f, --file ARG use file as template -h, --help help -n, --count ARG count how many times to loop: ARG=0 means forever. -s, --signal signal values -w, --wait ARG time of waiting (sleep) between reads in seconds. Default 1 To show one time values of signal processed by IOMON just type: $> iomonview To repeat the display 5 times: $> iomonview -n 5 To repeat the display 20 times with 5 seconds intervals: $> iomonview -n 20 -w 5
To indefinitely continue displaying the signals type with 10 seconds inverval.
The iomonview can also be helpful to check the current status of IOMON remotely using ssh.
By default, the signals are separated by the comma and space ", ". This, however, can be modified with an option "-d" which allows for user defined delimiter. The following example demonstrates how to place each singal on a separated line:
Much more powerful, is the option to use template file.
When this option is used, the iomonview reads the template,
replaces the references to signals in the template, and displays it to standard out.
The template may include description text and commands to clear the screen.
The signals are reference using the following convention: ${SIGNAL-NAME}.
Another powerful interface tool is the PHP scripting. The IOMON includes an interface PHP class IOMShMem (iomshmem.php). The class allows to do more complex operations on signals without the need of external tools or compilation process. To best undestand how it works let consider the example below:
A similar PHP code can be incorporated right into a status page at the DCS Web Server. Whether using
CGI shell script and iomonview or PHP IOMShMem class the result is similar: the signal values are displayed and available to the user. This way the signal values would be available to any client on the network using HTTP protocol. To be fancy, one might include automatic refresh request with status page.
| ||
|