Home| general |src.bin|tcpip| rtpoll Index

rtpoll

Syntax
rtpoll --help
rtpoll [-L logname][-if pidname] [-d pollsec] [-f name] command
Synopsis

Periodically polls a file to see if it has been modified, and if it has, executes a command.

Options
--helpprint the help message and exit.
--versionprint the RST version number and exit.
-L lognamelog connections and information in the file logname. By default, connections are recorded in log.rt.
-if pidnamerecord the process Identifier (PID) of the server in the file pidname. By default, the PID is recorded in pid.id.
-d pollseclength of time to wait between polling to see if the data file has been modified, to pollsec seconds.
-f namepoll to see if the file name has been modified.
commandcommand to execute if the data file has been modified.
Description

Executes a command whenever a specified file is changed. The program is used as part for real-time data processing when an action is triggered when a file is updated.

The file to test is specified by the "-f" option. The "-d" option sets the delay in seconds between tests of this file.

Examples
rtpoll -L /home/rtproc/log -d 120 -f /data/rt.dat /home/rtproc/script/doanalysis

Test the file "/data/rt.dat" every two minutes for changes. If a change occurs, execute the script "/home/rtproc/script/doanalysis". Actions are logged in the file "/home/rtproc/log.YYYYMMDD", where YYYYMMDD is the date.