# pmlogger_daily_report

## NAME



           **pmlogger_daily_report** - write Performance Co-Pilot daily summary
           reports
    


## SYNOPSIS



           **$PCP_BINADM_DIR/pmlogger_daily_report**[**-ApV?**]  [**-a** _archivefile_]
           [**-f** _outputfile_] [**-h** _hostname_] [**-l** _logfile_] [**-o** _directory_] [**-t**
           _interval_]
    


## DESCRIPTION



           **pmlogger_daily_report** writes daily performance summary reports,
           much like those produced by **sadc**(1) and the sa2(8) utility.
    
           All of the command line arguments are optional and intended to be
           self explanatory.
    
           By default, the reports are not generated, but if the _pcp-zeroconf_
           package has been installed (there will be files in
           **$PCP_VAR_DIR/config/pmlogconf/zeroconf**) then the necessary metrics
           will have been included in the default pmlogger(1) configuration
           file and the reports will be generated.
    
           The reports are generated (by default) soon after midnight, once
           pmlogger_daily(1) has completed the merging of any partial
           archives to generate one archive for yesterday's activity.
    
           Each performance summary report is named **sar** _XX_ (where _XX_ is
           yesterdays day-of-the-month).  The _outputfile_ may be changed with
           the **-f** option.  The report will be written to the _$PCP_LOG_DIR/sa_
           directory by default, but this may be changed with the **-o** option
           to a different _directory_.
    
           Note that there are sufficiently flexible command line options for
           **pmlogger_daily_report** to be used to read any _archivefile_ and write
           the report to any output directory.
    
           If the **-a** option is not given, the default input _archivefile_ is
           _$PCP_ARCHIVE_DIR/HOSTNAME/YYYYMMDD_ , where _HOSTNAME_ defaults to the
           local hostname (unless changed with the **-h** option) and _YYYYMMDD_ is
           the base name of yesterdays merged archive, as produced by
           pmlogger(1) and pmlogger_daily(1).  If _archivefile_ is a directory,
           then **pmlogger_daily_report** will use all PCP archives found in that
           directory to write the report (this is known as multi-archive
           mode, and may be considerably slower than specifying a single
           archive as the input).
    
           The reports themselves are created by the pmrep(1) utility using
           its default configuration file, see pmrep.conf(5).  The pmrep(1)
           configuration entries used to write the reports is currently
           hardwired into the **pmlogger_daily_report** script.
    
           Finally, the input archives must contain sufficient metrics as
           needed by pmrep(1) to write the report.  On platforms that support
           it, the _pcp-zeroconf_ package configures PCP logging as required
           for this - hence **pmlogger_daily_report** should be used with the
           pmlogger(1) configuration that is set up by **pcp-zeroconf**.  As the
           name suggests, **pcp-zeroconf** requires no additional configuration
           after installation in order to capture the required archives
           needed by **pmlogger_daily_report**.
    


## OPTIONS



           The available command line options are:
    
           **-a** _archive_
                Specifies an alternate input _archive_ file basename or
                directory path.
    
           **-A** Use the start and end times of input archive for the report,
                as opposed to the default behaviour of 24 hours from midnight
                yesterday.
    
           **-f** _filename_
                Specifies an alternate output _filename_.  **-h** _hostname_
                Specifies an alternate _hostname_ to use within the default
                input archive file path.
    
           **-l** _file_ , **--logfile** =_file_
                In order to ensure that mail is not unintentionally sent when
                this script is run from pmlogger_daily(1) diagnostics are
                always sent to a log _file_.  By default, this file is
                _$PCP_LOG_DIR/pmlogger/pmlogger_daily_report.log_ but this can
                be changed using the **-l** option.  If this log file already
                exists when the script starts, it will be renamed with a
                _.prev_ suffix (overwriting any log file saved earlier) before
                diagnostics are generated to the log file.
    
           **-p** If this option is specified then the status of the daily
                processing is polled and if the report has not been done in
                the last 24 hours then it is done now.  With this option,
                **pmlogger_daily_report** simply exits if the previous day's
                processing has already been done.
    
                This option is no longer required as the polling of
                pmlogger_daily(1) will ensure the report will be generated,
                however the option is retained for backwards compatibility.
    
           **-t** _interval_
                Specifies the sampling _interval_ used when generating the
                report, in the format described in PCPIntro(1).  The default
                is every 10 minutes.
    
           **-V** , **--verbose**
                The output from the execution of the script may be extended
                using this option which enables verbose tracing of activity.
                By default the script generates no log output unless some
                error or warning condition is encountered.
    
           **-?** , **--help**
                Display usage message and exit.
    


## PCP ENVIRONMENT



           Environment variables with the prefix **PCP_** are used to
           parameterize the file and directory names used by PCP.  On each
           installation, the file _/etc/pcp.conf_ contains the local values for
           these variables.  The **$PCP_CONF** variable may be used to specify an
           alternative configuration file, as described in pcp.conf(5).
    


* * *