\begin{ManPage}{\label{man-condor-history}\Condor{history}}{1}
{View log of HTCondor jobs completed to date}
\Synopsis
\SynProg{\Condor{history}}
\oOpt{-help} 

\SynProg{\Condor{history}}
\oOpt{-backwards}
\oOpt{-forwards}
\oOptArg{-constraint}{expr}
\oOptArg{-file}{filename}
\oOptArg{-userlog}{filename}
\oOptArg{-format}{formatString AttributeName}
\oOpt{-l \Bar -long \Bar -xml} 
\oOptArg{-match}{number}
\oOpt{cluster \Bar cluster.process \Bar owner}

\index{HTCondor commands!condor\_history}
\index{condor\_history command}
\Description
\Condor{history} displays a summary of all HTCondor jobs listed in the
specified history files.
If no history files are specified with the \Opt{-file} option, 
the local history file as specified in HTCondor's configuration file
(\File{\MacroUNI{SPOOL}/history} by default) is read.  
The default listing summarizes in reverse chronological order
each job on a single line, and  contains the following items:


\begin{description}
\item[ID] The cluster/process id of the job. 
\item[OWNER] The owner of the job. 
\item[SUBMITTED] The month, day, hour, and minute the job was submitted to the queue. 
\item[RUN\_TIME] Remote wall clock time accumulated by the job to date in days, hours, minutes, and seconds.  See the definition of
\AdAttr{RemoteWallClockTime} on page~\pageref{RemoteWallClockTime}.
\item[ST] Completion status of the job (C = completed and X = removed).
\item[COMPLETED] The time the job was completed.
\item[CMD] The name of the executable. 
\end{description}

If a job ID (in the form of \Argnm{cluster\_id} or \Argnm{cluster\_id.proc\_id}) or an
\Argnm{owner} is provided, output will be restricted to jobs with the
specified IDs and/or submitted by the specified owner.  
The \Argnm{-constraint} option can be used to display jobs that satisfy a
specified boolean expression.

The history file is kept in chronological order,
implying that new entries are appended at the end of the
file.

\begin{Options}
  \OptItem{\Opt{-help}}{Display usage information and exit.}
  \OptItem{\Opt{-backwards}}{List jobs in reverse chronological
    order. The job most recently added to the history file is first.
    This is the default ordering.}
  \OptItem{\Opt{-forwards}}{List jobs in chronological
    order. The job most recently added to the history file is last.
    At least 4 characters must be given to distinguish this option
    from the \Opt{-file} and \Opt{-format} options. }
  \OptItem{\OptArg{-constraint}{expr}}{Display jobs that satisfy the
    expression.}
  \OptItem{\OptArg{-file}{filename}}{Use the specified file instead of the
    default history file.  }
  \OptItem{\OptArg{-userlog}{filename}}{Display jobs, with job information
    coming from a user log,
    instead of from the default history file.
    A user log does not contain all of the job information, so some fields in
    the normal output of \Condor{history} will be blank.}
  \OptItem{\OptArg{-format}{formatString}{AttributeName}}{Display jobs
    with a custom format. See the \Condor{q} man page \Opt{-format} option
    for details.}
  \OptItem{\Opt{-l} or \Opt{-long}}{Display job ClassAds in long format.}
  \OptItem{\OptArg{-match}{number}}{Limit the number of jobs displayed
    to \Arg{number}.}
  \OptItem{\Opt{-xml}}{Display job ClassAds in XML format.
      The XML format is fully defined at
      \URL{http://www.cs.wisc.edu/condor/classad/refman/}.}
\end{Options}

\ExitStatus

\Condor{history} will exit with a status value of 0 (zero) upon success,
and it will exit with the value 1 (one) upon failure.

\end{ManPage}
