Jump to contentJump to page navigation: previous page [access key p]/next page [access key n]
documentation.suse.com / SUSE Linux Enterprise Server Documentation / SMT Guide / SMT Reports
Applies to SUSE Linux Enterprise Server 12 SP5

7 SMT Reports

This chapter explains how to generate reports using the data from the SMT and SUSE Customer Center. These reports contain statistics of all the registered machines, products used and all active, expiring or missing subscriptions.

Note
Note: Assignment of Reports

If you are using more than one SMT server, generated reports may not include all SMT servers or machines in your environment. For the complete statistics of all your registered machines, refer to the information in the SUSE Customer Center.

7.1 Report Schedule and Recipients

Generated SMT reports can be periodically sent to a list of specified e-mail addresses. To create or edit this list and to set the frequency of the reports, use the YaST SMT Configuration module. How to configure this list is described in Section 3.4, “Setting E-mail Addresses to Receive Reports with YaST”. Configuration of the report schedule is covered in Section 3.5, “Setting the SMT Job Schedule with YaST”.

The list can also be edited manually in the reportEmail part of the /etc/smt.conf configuration file. For more information about manually editing the list of addresses, see Section 8.2.1.6, “[REPORT] Section of /etc/smt.conf”. To set the frequency of reports manually, you can edit the smt-gen-report lines of the crontab in /etc/cron.d/novell.com-smt. For more information about the crontab format, see man 5 crontab.

Reports, including those generated as a scheduled SMT job, are created by the smt-report command. This command supports various parameters. To edit parameters used with scheduled commands, edit the /etc/smt.d/smt-cron.conf configuration file. For more information, see Section 8.2.2, “/etc/smt.d/smt-cron.conf”.

7.2 Report Output Formats and Targets

SMT reports can be printed to the standard output, exported to one or multiple files (in the CSV format), and mailed to a specified list of e-mail addresses. The following parameters can be used with the smt-report command:

--quiet or -q

Suppress output to STDOUT and run smt-report in quiet mode.

--file or -F

Export the report to one or several files. By default, the report is written to a single file, with the results formatted as tables. Optionally, the file name or whole path may be specified after the parameter: --file FILENAME. If no file name is specified, the default file name containing a time stamp is used. However, SMT will not check if the file or files already exist.

In the CSV (Comma-Separated Value) mode, the report is written to multiple files, therefore the specified file name expands to [PATH/]FILENAME-reportname.extension for every report.

--csv or -c

The report is exported to multiple files in the CSV format. The first line of each *.csv file consists of the column names. It is recommended to use the --csv parameter together with the --file parameter. If the specified file name contains a .csv extension, the report format will be CSV (as if the --csv parameter was used).

--mail or -m

Send the report to the addresses configured using the YaST SMT Configuration module and stored in /etc/smt.conf. The report is rendered as tables.

--attach or -a

Attach the report to the mails in the CSV format. This option should only be used in combination with the --mail option.

--pdf

The report is exported to multiple files in the PDF format.

--xml

The report is exported to multiple files in the XML format.

Note
Note: Disabling Sending Attachments

To disable sending CSV attachments with report mails, edit the /etc/smt.d/smt-cron.conf configuration file as follows: remove the --attach option from the REPORT_PARAMS value. The default line reads: REPORT_PARAMS="--mail --attach -L /var/log/smt-report.log". To disable CSV attachments, change it to: REPORT_PARAMS="--mail -L /var/log/smt-report.log".

If you have disabled CSV attachments but need them occasionally, you can send them manually with the smt-report --mail --attach -L /var/log/smt-report.log command.