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 |
|
--help | print the help message and exit. |
--version | print the RST version number and exit. |
-L logname | log connections and information in the file logname. By default, connections are recorded in log.rt . |
-if pidname | record the process Identifier (PID) of the server in the file pidname. By default, the PID is recorded in pid.id . |
-d pollsec | length of time to wait between polling to see if the data file has been modified, to pollsec seconds. |
-f name | poll to see if the file name has been modified. |
command | command 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. |