bhist.1



NAME

     bhist - display the history of batch jobs in the LSF system


JOB BASED SYNOPSIS

     bhist [ -h ] [ -V ] [ -b ] [ -w ] [ -l ] [ -a ] [ -d ]  [  -
     p ][  - s ][  - r ] [ -f logfile_name | -n num_logfiles] [ -
     C time0,time1 ] [ -S time0,time1 ] [ - D time0,time1 ]  [  -
     q queue_name ] [ -m host_name ] [ -u user_name | -u all ] [
     -J job_name ] [ -P project_name ] [ -N host_spec ] [ jobId |
     "jobId[index] "  ...  ] [ jobId  ...  ]


CHRONOLOGY BASED SYNOPSIS

     bhist [ -h ] [ -V ] -t
           [ -f logfile_name ] [ -T  time0,time1 ]


DESCRIPTION

     Display the history of one or more batch jobs  specified  by
     the options.  If no option is specified, then the default is
     to display information (stored in the lsb.events file) about
     all the unfinished (that is, pending, running and suspended)
     jobs submitted by the user who invoked this command.  If the
     -d  or  -a option is specified, then jobs that have finished
     running can be displayed.

     If a jobId is specified, all  event  log  files  lsb.events,
     lsb.events.1  ... are searched to find the matching records.
     only the current events file,  lsb.events,  is  searched  to
     find the matching records.


     If the jobId is associated with a job array, then  all  ele-
     ment  jobs  are  displayed  chronologically.  The index is a
     positive integer and is used to specify  the  index  for  an
     element job.


OPTIONS

     -h   Print command usage to stderr and exit.

     -V   Print LSF release version to stderr and exit.

     -b   Display the job history in a  brief  format.   For  the
          default, see -l.

     -w   Display the job history in  a  wide  format.   For  the
          default, see -l.

     -l   Display the job history in a (long)  multi-line  format
          for  each  job,  which gives detailed information about
          the job.  If neither -l nor -b is present, the  default
          is to display the fields in SUMMARY only (see below).

     -a   Display both finished and unfinished jobs.  This option
          overrides  -d, -p, -s, and -r.  If neither -a nor -d is
          present, then finished jobs are not displayed.

     -d   Display only the finished jobs.

     -p   Display only the pending jobs.

     -s   Display only the suspended jobs, showing the reason why
          each job was suspended (if option -l or -b specified).

     -t   Display job events chronologically.  By default, events
          occurring in the past week are displayed. The -T option
          can be used to specify an arbitry time  range  so  that
          only  the  events  within  the range are considered for
          display.

     -T time0,time1 (used together with -t)
          Consider only those  job  events  within  the  interval
          time0,time1  (see TIME FORMAT below). If this option is
          not given, the default for the multi-line format is  to
          consider  the  job  events  from  the  last  week; this
          default can be changed by setting the environment vari-
          able, LSB_BHIST_HOURS, to an alternate number of hours.

     -r   Display only the running jobs.

     -f logfile_name
          Specify the file name of the event log file.  Either an
          absolute or a relative path name may be specified.  The
          default is to use the event log file currently used  by
          the                     LSF                     system:
          $LSB_SHAREDIR/<clustername>/logdir/lsb.events      (see
          lsb.events(5)).   Option  -f  is  useful  for  off-line
          analysis.

     -n num_logfiles
          Specify the  number  of  event  log  files  that  bhist
          searches.   The  most recent num_logfiles log files are
          searched.  The default is 1; i.e.,  the  current  event
          log  file  $LSB_SHAREDIR<clustername>/logdir/lsb.events
          (see lsb.events(5)) is searched. If num_logfiles is  2,
          bhist   searches   event   log   files  lsb.events  and
          lsb.events.1; If  num_logfiles  is  3,  bhist  searches
          lsb.events,  lsb.events.1, and lsb.events.2; and so on.
          If num_logfiles is  0,  all  the  event  log  files  in
          $(LSB_SHAREDIR)/<clustername>/logdir are searched.

     -N host_spec
          Display the CPU time by a normalized value.   host_spec
          is  either a host name, or a host model name defined in
          LSF, or a CPU factor (use lsinfo(1) to get  host  model
          and  CPU  factor  information).   If  bhist is used off
          line, i.e., without  LIM,  the  only  legal  usage  for
          host_spec is a CPU factor.  The appropriate CPU scaling
          factor for the specified host_spec is used to normalize
          the actual CPU time consumed by the job.

     -C time0,time1
          Consider only those jobs whose completion or exit times
          were  within  the  time  interval time0,time1 (see TIME
          FORMAT below).

     -S time0,time1
          Consider only those jobs whose  submission  times  were
          within  the  time interval time0,time1 (see TIME FORMAT
          below).

     -D time0,time1
          Consider only those  jobs  whose  dispatch  times  were
          within  the  time interval time0,time1 (see TIME FORMAT
          below).

     -q queue_name
          Display  jobs  submitted   to   the   specified   queue
          queue_name  only.   The  default  is  to  consider  all
          queues.

     -m host_name
          Display jobs dispatched to the specified host host_name
          only.  The default is to consider all hosts.

     -u user_name | -u all
          Display jobs that  have  been  submitted  by  the  user
          specified  by  user_name,  or  by  all  users  (if  the
          reserved user name all is specified).  The  default  is
          to  display  the jobs submitted by the user who invoked
          this command.

     -J job_name
          Display the jobs that have the specified job_name.

     -P project_name
          Display jobs submitted from project_name.  The  default
          is to display the jobs submitted from all projects.

     jobId ...
          jobId | jobId[index] ... Display the  specified  job(s)
          only.  This  option  overrides all other options except
          -N, -h and -V. When it is used with -J, only those jobs
          listed  here  that  have  the  specified  job_name  are
          displayed.


SUMMARY

     Statistics of the amounts of time  that  job  has  spent  in
     various states:

     PEND The total waiting time excluding  user  suspended  time
          before the job is dispatched

     PSUSP
          The total user suspended time of a pending job

     RUN  The total run time of the job

     USUSP
          The  total  user  suspended  time  after  the  job   is
          dispatched

     SSUSP
          The total  system  suspended  time  after  the  job  is
          dispatched

     UNKWN
          The total unknown time of the job (job  status  becomes
          unknown  if  slave batch daemon (sbatchd) on the execu-
          tion host is temporarily unreachable).

     TOTAL
          The total time that the job has spent  in  all  states;
          for a finished job, it is the turnaround time (that is,
          the time interval from job submission  to  job  comple-
          tion).



TIME FORMAT

     The interval "time0,time1" in options of -C, -S, -D, and  -T
     must conform to the following format:

         time_form = ptime,ptime | ptime, | ,ptime | itime
         ptime     = day | /day | month/ | year/month/day | year/month/day/
               | hour: | month/day | year/month/day/hour:
               | year/month/day/hour:minute | day/hour:
               | month/day/hour: | day/hour:minute | hour:minute
               | month/day/hour:minute | . | .-itime
         itime     = ptime
         day, month, hour, minute = two digits

     where 'ptime' stands for a specific point of  time,  'itime'
     stands  for  a specific interval of time, and '.' stands for
     the current month/day/hour:minute.

     The time specification must follow these rules:

     - year must be 4 digits and followed by a /
     - month must be followed by a /
     - day must be preceded by a /
     - hour must be followed by a :
     - minute must be preceded by a :
     - The / before day can be omitted when day stands alone or
       when day is followed by /hour:
     - The time must be a single string; no spaces are allowed between
       "time0,time1".

     For example, suppose the current time is Mar 9 17:06:30 1998.

     1,8       from Mar 1 00:00:00 1988 to Mar 8 23:59:00 1988;
     ,4 or ,/4 from the time when first job was logged to Mar 4 23:59:00 1998;
     6 or /6   from Mar 6 00:00:00 1998 to Mar 6 23:59:00 1998;
     2/        from Feb 1 00:00:00 1998 to Feb 28 23:59:00 1998;
     12:       from Mar 9 12:00:00 1998 to Mar 9 12:59:00 1998;
     2/1       from Feb 1 00:00:00 1998 to Feb 1 23:59:00 1998;
     2/1,      from Feb 1 00:00:00 to the current time;
     ,. or ,   from the time when first job was logged to the current time;
     ,.-2      from the time when first job was logged to Mar 7 17:06:30 1998;
     ,.-2/     from the time when first job was logged to Jan 9 17:06:30 1998;
     ,2/10:    from the time when first job was logged to Mar 2 10:59:00 1998;
     1997/11/25,1998/1/25   from Nov 25 00:00:00 1997 to Jan 25 23:59:00 1998;



SEE ALSO

     lsb.events(5), bsub(1), bjobs(1), lsinfo(1)