Knowledgebase

The gather-update-logs Script  Print this Article

Overview:

Important:

For more information about the cPanel Analytics data that we gather and how we use it, read our cPanel Analytics documentation and our Server Usage Analysis Data Collection Policy.

The /usr/local/cpanel/scripts/gather-update-logs script gathers your server’s update logs and sends them to cPanel, L.L.C. for analysis. Whenever the /usr/local/cpanel/scripts/upcp script runs, it creates a tarball file to send. This tarball contains all of the update log data that the system stored since your last update.

  • The /var/cpanel/updatelogs directory contains the system’s uncompressed update log files.
  • The /usr/local/cpanel/logs/update_analysis directory stores the .tar.gz files that the system will send.
Note:
  • If you run this script but have not enabled update log gathering, the system won’t have any data to send.
  • For more information about these log files, read our The cPanel Log Files documentation.

Run the script

To run this script on the command line, use the following format:

/usr/local/cpanel/scripts/gather-update-logs --upload 2018-11-07T08:15:06Z.tar.gz

Options

Use the following options with this script:

Options Description Example
--upload Whether to send the specified tarball.
  • A value of 1 sends the tarball, while a value of 0 does not.
  • This option defaults to 1.
  • If you use this option, you must also use the --send option.
--upload 1
--list List the existing tarballs on the server.
  • If you use this option, the script only returns the list of tarballs.
  • If no tarballs exist, the script does not return an error message.
--list
--gather Immediately gather a tarball based on the current system state. --gather
--send Specify an existing tarball to send to cPanel, L.L.C. for analysis. This tarball’s filename must match the following regular expression:
m/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}Z\.tar\.gz$/
--send 2018-11-07T08:15:06Z.tar.gz

Several settings exist in WHM’s Tweak Settings interface (WHM >> Home >> Server Configuration >> Tweak Settings) to enable, disable, or customize this functionality. We disable these settings by default.

  • To set the number of days to retain log files before deletion, use the Update analysis retention interval setting in the Support section.
  • To set whether the system sends anonymized data about your server configuration, use the Send error reports to cPanel for analysis setting in the Support section.
  • To set whether the system sends anonymized data about how you and your users use cPanel & WHM, use the Send information about server usage to cPanel for analysis setting in the Support section.
  • To change the number of days to retain these logs, use the Number of days to retain upcp logs before purging them setting in the Stats and Logs section.

Was this answer helpful?

Related Articles

WHM Scripts
Overview: The cPanel & WHM installation process adds important scripts to your server’s...
The dbmaptool Script
Overview: You can use the /usr/local/cpanel/bin/dbmaptool script to grant ownership of databases...
The servers_queue Script
Overview: This script allows you to manage the task queue system. The task queue system allows...
The auto-adjust-mysql-limits Script
Overview: The /usr/local/cpanel/scripts/auto-adjust-mysql-limits script updates MySQL®...
The autossl_check Script
Overview: The /usr/local/cpanel/bin/autossl_check script allows you to manually check the SSL...