Proccontrol: Difference between revisions

From University of Washington - Ubicomp Research Page
Jump to navigationJump to search
Line 19: Line 19:
#lsb-server lsb 1 0  /msp/lsb-server.loop
#lsb-server lsb 1 0  /msp/lsb-server.loop
#gps-server gps 1 0 /msp/gps-server /dev/ttyS2 38400 /msp/enableDGPS.bin
#gps-server gps 1 0 /msp/gps-server /dev/ttyS2 38400 /msp/enableDGPS.bin
logger logger 1 0  /msp/logger -ini /msp/logger.ini
logger logger 1 0  /msp/logger -ini /msp/logger.ini
#gps-debug gps    1 0  /msp/gps-debug > /dev/null
#gps-debug gps    1 0  /msp/gps-debug > /dev/null
#cam-server camera 1 0  /msp/cam-server.loop
#cam-server camera 1 0  /msp/cam-server.loop

Revision as of 22:55, 17 August 2007

proccontrol

proccontrol is a program which launches and monitors all of the other processes involved in the MSP data collection. proccontrol can be controlled via IPC to start and stop processes. Additionally, it can listen for heartbeat messages over IPC to detect hung processes, and publish a list of process states.

usage

    Typical Usage

      proccontrol process.ini
      

      where process.ini will typically contain:

      msb-server	msb	 1 0  /msp/msb-server -ini /msp/msb.ini
      #lsb-server	lsb	 1 0  /msp/lsb-server.loop
      #gps-server	gps	 1 0	/msp/gps-server /dev/ttyS2 38400 /msp/enableDGPS.bin
      logger		logger 1 0  /msp/logger -ini /msp/logger.ini
      #gps-debug	gps    1 0  /msp/gps-debug > /dev/null
      #cam-server	camera 1 0  /msp/cam-server.loop
      

      The file name is optional. If left unspecified, it will default to process.ini.

    process.ini

      process.ini specifies which processes to run and monitor. Each line of process.ini specifies a process, except for comments, which begin with #. The format of each line is:
      <process name> <process group> <startup state> <heartbeat flag> <command line>

      If the startup state is 1, the process will be started as soon as proccontrol does. Otherwise, the proccontrol will wait to start it until instructed to via IPC. If the heartbeat flag is non-zero, proccontrol will listen for heartbeat IPC messages from the process, and restart the process if a heartbeat hasn't been sent for two seconds.