Farm Builder


The farm builder reads the data from the multiple circular buffer created by the farm receiver, formats them and puts them in another circular buffer.

Index


Program syntax

farmbuild [-n processname]


Commands

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

Puts the process in the INIT_STATE.

start
Starts building. 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 receiver is runnung.

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

Puts the process in the PAUSE_STATE.

resume
Resume building (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 building. 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 receiver ends.

exit
End building and kill the process.

Call the end command before using exit.


Shared variables

Name Type Access Description Default value
eventnr INTEGER R 1
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.

circsize INTEGER R/W Output circular buffer size. 4194304
blocksize INTEGER R/W Maximum size of an element in the output circular buffer. 204800
consumers INTEGER R/W If >0, send to circular buffer. 1
rcname STRING R/W Name of the input circular buffer. /tmp/RECEIVE
bcname STRING R/W Name of the output circular buffer. /tmp/BUILD
circnr INTEGER R Number of input circular buffers. 0
circfulls INTEGER R Number of times the circular buffer went full. 0

Reset after the start or resume command.

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 (230) received 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_circcont0 .. s_circcont9 INTEGER R Actual content of the circular buffer [0..9]. 0

Updated every upfreq cycles.


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

Created:8.10.1997
Last modified:13.11.1997