Home

Documentation

Project Support

Changes in Version 2 of GraspExtrasOperationsLogging

Author:
isani
Timestamp:
Thu Jan 23 15:16:16 2014

Legend:

Unmodified
Added
Removed
Modified
  • GraspExtrasOperationsLogging

    v1 v2
    1 1  '''[wiki:GraspExtrasOperations Extras: Log System]''' 
    2 2  [[TracNav(GraspExtrasContents)]] 
    3 3  The '''cfhtlog''' service provides a permanent (on-disk) circular buffer of recent log messages.  A tool called '''roll''' allows you to view the log and C API calls from '''libcfht''' allow programs to log messages.  If compiled with the appropriate options, '''director''' will also save all of its log messages to the roll buffer.  Without this, log messages displayed in director are only kept in shared memory. 
    4    == Start the log service == 
      4  === Start the log service === 
    4 4  The first step for setting up a machine to support '''cfhtlog''' is to add the following in rc.local: 
    5 5  {{{ 
    6 6  # rc.local 
    7 7    [ . . . ] 
    8 8  # CFHT LOG SYSTEM 
    9 9  # =============== 
    10 10  export CFHTLOGU= 
    11 11  export CFHTLOGS=/tmp/cfhtlog.np 
    12 12  /gpc/bin/roll -s 500000000 -p $CFHTLOGS /gpc/conf/syslog.@ 
    13 13  /gpc/bin/cfht_log reboot START "logging system started by $0" 
    14 14  }}} 
    15 15  After add those commands to rc.local, run them manually (or reboot.)  '''Warning: The first time you run roll -s to create the buffer on disk, it can take several minutes.''' 
    16    == Rebuild "director" with cfht_log == 
      16  === Rebuild "director" with cfht_log === 
    16 16  In the source tree, edit '''cli/director/Makefile''' and add a section the hostname: 
    17 17  {{{ 
    18 18  ifeq ($(HOSTNAME), insert.your.full.hostname.here) 
    19 19  NO_CFHTLOG:= 
    20 20  endif 
    21 21  }}} 
    22 22  Note that this is setting the NO_CFHTLOG variable to (empty) which turns '''ON''' the logging feature. 
    23 23  {{{ 
    24 24  cd cli/director 
    25 25  make clean ; make install 
    26 26  }}} 
    27 27  Reboot or re-start director. 
    28    == Viewing the Log == 
      28  === Viewing the Log === 
    28 28  This displays the last 5 hours of log messages: 
    29 29  {{{ 
    30 30  /gpc/bin/roll -u -CF -h 5 | less 
    31 31  }}} 
    32 32  For more information, see the man page: 
    33 33  {{{ 
    34 34  man /gpc/man/man1/roll.1 
    35 35  }}}