Bug 487434 - A sosplugin to gather the details on logrotate such as its status, its debug information and the configuration files.
Summary: A sosplugin to gather the details on logrotate such as its status, its debug ...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: sos
Version: 5.4
Hardware: All
OS: Linux
low
medium
Target Milestone: rc
: ---
Assignee: Adam Stokes
QA Contact: BaseOS QE
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-02-25 23:05 UTC by Vimal Kumar
Modified: 2009-09-02 07:31 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-09-02 07:31:48 UTC
Target Upstream Version:
Embargoed:


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


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2009:1418 0 normal SHIPPED_LIVE sos bug fix and enhancement update 2009-09-02 07:29:42 UTC

Description Vimal Kumar 2009-02-25 23:05:44 UTC
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 07:31:48 UTC
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.