Bug 487434 - A sosplugin to gather the details on logrotate such as its status, its debug information and the configuration files.
A sosplugin to gather the details on logrotate such as its status, its debug ...
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: sos (Show other bugs)
5.4
All Linux
low Severity medium
: rc
: ---
Assigned To: Adam Stokes
BaseOS QE
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2009-02-25 18:05 EST by Vimal Kumar
Modified: 2009-09-02 03:31 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-09-02 03:31:48 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
logrotate.py (501 bytes, application/octet-stream)
2009-02-25 18:05 EST, Vimal Kumar
no flags Details

  None (edit)
Description Vimal Kumar 2009-02-25 18:05:44 EST
Created attachment 333255 [details]
logrotate.py

Steps to Reproduce:
-----------------------

a) Create a new file named 'logrotate.py' in the sos plugins directory '/usr/lib/python2.4/site-packages/sos/plugins/'.

b) Add the following content in the file 'logrotate.py' :

<snip>
import sos.plugintools

class logrotate(sos.plugintools.PluginBase):
    """logrotate configuration files and debug info
    """
    
    def setup(self):
        self.collectExtOutput("/usr/sbin/logrotate --debug /etc/logrotate.conf",\
                              suggest_filename = "logrotate_debug")
        self.collectExtOutput("/bin/cat /var/lib/logrotate.status",\
                              suggest_filename = "logrotate_status")
        self.addCopySpec("/etc/logrotate*")
        return
</snip>

c) The above steps will create the sos plugin named 'logrotate'. This plugin can be run individually using the command 'sosreport --only-plugins=logrotate'. 

d) The collected details are :

 (i) The output of logrotate run in debug mode, this will not actually execute logrotate but will parse the configurations and will output a test run. Useful to detect what the application is going to do in the actual run. This is saved as 'logrotate_debug' under 'sos_commands/logrotate'.

 (ii) The current status of logrotate saved under sos_commands/logrotate under with the name 'logrotate_status'

 (iii) The configuration files of logrotate under /etc/
Comment 6 errata-xmlrpc 2009-09-02 03:31:48 EDT
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2009-1418.html

Note You need to log in before you can comment on or make changes to this bug.