Farm Spy Daemon


The farm spy daemon acts as a bridge between the circular buffer created by the farm builder and one or more remote spy processes.

It accepts requests via TCP/IP sockets and replies by sending the corresponding data to the same socket.


Index


Program syntax

farmspydaemon [-n processname]


Commands

init
Initialize the process. Must be called at startup and after any error.

Puts the process in the INIT_STATE.

start
Starts serving. Can be used only when the process is in the INIT_STATE.

Puts the process in the RUNNING_STATE.

Can be used only if the farm builder is runnung.

pause
Pauses serving. Can be used only when the process is in the RUNNING_STATE.

Puts the process in the PAUSE_STATE.

resume
Resume serving (if in PAUSE_STATE).

Puts the process in the RUNNING_STATE.

update
Update shared variables. Can be used only when the process is in the RUNNING_STATE.
end
End serving. Can be used only when the process is in the RUNNING_STATE.

Puts the process in the INIT_STATE.

Must be called before the farm builder ends.

exit
End recording and kill the process.

Call the end command before using exit.


Shared variables

Name Type Access Description Default value
eventnr INTEGER R 1
runnr INTEGER R 0
runstate INTEGER R Status of the process.

Can be on of the following:

  • UNDEFINED_STATE
  • INIT_STATE
  • RUNNING_STATE
  • PAUSE_STATE
UNDEFINED_STATE
timeout_us INTEGER R Timeout time in microseconds 10000
timeouts INTEGER R Number of timeouts from the start of receiving. 0

Reset after the start or resume command.

bcname STRING R/W Name of the circular buffer. /tmp/BUILD
port INTEGER R/W Port address on which the process listens. 2115
rcvbuf INTEGER R/W Receive buffer. (TCP/IP) 32768
sndbuf INTEGER R/W Send buffer. (TCP/IP) 32768
reuseaddr INTEGER R/W Reuse address. (TCP/IP) 1
upfreq INTEGER R/W Long term status update frequency. (Expressed in number of loops)

If ==0, updated at short term update only.

100
upfreq_l INTEGER R/W Short term status update frequency. (Expressed in number of loops)
It also updates long term status.

If ==0, the automatic update is disabled.

1000
sg_msecs INTEGER R Miliseconds from the last start or resume. 0

Updated every upfreq cycles.

sg_events INTEGER R Number of events received from the last start or resume. 0

Updated every upfreq cycles.

sg_cpu INTEGER R CPU used from the last start or resume. (Expressed in 10-9) 0

Updated every upfreq cycles.

sg_gbytes INTEGER R GBytes received (230) from the last start or resume. 0

Updated every upfreq cycles.

sg_bytes INTEGER R Bytes received (mod GB) from the last start or resume. 0

Updated every upfreq cycles.

sg_uptime INTEGER R The time at the last long term status update. (As reported by time)

Set to 0 if no update yet.

0

Updated every upfreq cycles.

sl_msecs INTEGER R Miliseconds from the last update. 0

Updated every upfreq_l cycles.

sl_events INTEGER R Number of events received from the last update. 0

Updated every upfreq_l cycles.

sl_cpu INTEGER R CPU used from the last update. (Expressed in 10-9) 0

Updated every upfreq_l cycles.

sl_bytes INTEGER R Bytes received from the last update. 0

Updated every upfreq_l cycles.

sl_uptime INTEGER R The time at the last short term status update. (As reported by time)

Set to 0 if no update yet.

0

Updated every upfreq_l cycles.

s_circcont INTEGER R Actual content of the circular buffer. 0

Updated every upfreq_l cycles.

s_cons INTEGER R Actual connections served. 0


Top of the page. Farm documentation
Send comments to: Igor Sfiligoi

Created:8.10.1997
Last modified:28.10.1997