1.243 Execute

This logical device executes a script every time a parameter changes and submits this parameter to the script.

Typical application is to react on the summary fault and trigger a local script or program on the MNC server.

Device window pages

The following table shows which device window pages are available with this individual device type. Tool-bar functions not mentioned here are described at the general description of device windows .

Configuration parameters

parameter description
script The name of the script which should be executed
inputId Enter the message identifier here of the parameter the device shall listen

Security advice and Remarks

The Execute device runs programs and scripts of the Linux operating system which are located in /home/satnms/scripts/.

Using the Execute device may be dangerous, if the executed script does not behave properly and if it does not handle input values in a proper way.

  1. Scripts may be scripts requiring bash, perl etc and Linux executables as well
  2. Scripts and programs must be locates in the /home/satnms/scripts/ subdirectory, they must be readable / executable to the 'satnms' user.
  3. The software reads the output of the program to stdout but ignores the stderr output. This is useful for some Linux programs which send their output to stdout and status reports to stderr. If the stderrr output is required, the program should be enclosed in a bash script performing the appropriate redirection.
  4. There are no timeouts with the Script protocol. If a script or program doesn't terminate, it blocks the device thread containing the driver forever without notice for the operator. When the MNC server terminates, the subprocess is forced to terminate as well.
  5. There is no explicit limitation of the volume of data collected from the script's output. Hence, an endless running program which continuously output e.g. some logging data, will eat up the complete memory of the MNC server process an bring the system down.

Be careful when using the Execute device!

Variables defined by this device driver

name type flags range
info.driver TEXT R/O StringRange R/O
lowLevel.cmd TEXT StringRange
lowLevel.reply TEXT R/O StringRange R/O
faults.99 ALARM R/O AlarmFlagRange R/O (Communication)
faults.commstat TEXT R/O StringRange R/O
info.type TEXT R/O StringRange R/O
info.frame TEXT R/O StringRange R/O
info.lastMessage TEXT R/O StringRange R/O
config.script TEXT SAVE SETUP StringRange
config.inputId TEXT SAVE SETUP StringRange
input TEXT NOPRESET StringRange
run TEXT NOPRESET StringRange
arguments TEXT SAVE NOPRESET StringRange