From: Sajjad Lateef Date: Thu, 13 Jan 2011 01:07:58 +0000 (-0800) Subject: debian: Modify ovs-bugtool to include collectd rrd logs X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e05924baf0c757b579eef2b3743130ade4b1a93c;p=openvswitch debian: Modify ovs-bugtool to include collectd rrd logs collectd is a utility that stores rrd logs in the directory /var/lib/collectd/rrd/ by default. rrd logs are created when collectd is configured to output logs in Round Robin Database format. With this change, ovs-bugtool will include collectd logs in the output bundle from /var/lib/collectd/rrd. The output bundle will include all sub-directories of the specified collectd directory. ovs-bugtool checks if a directory exists before it attempts to include the directory contents in the output bundle. So, running ovs-bugtool on a system that does not have collectd logs should not negatively affect the behavior of ovs-bugtool. --- diff --git a/AUTHORS b/AUTHORS index c57d43b1..183a8b3b 100644 --- a/AUTHORS +++ b/AUTHORS @@ -23,6 +23,7 @@ Neil McKee neil.mckee@inmon.com Paul Fazzone pfazzone@nicira.com Reid Price reid@nicira.com Romain Lenglet romain.lenglet@berabera.info +Sajjad Lateef slateef@nicira.com Simon Horman horms@verge.net.au Tetsuo NAKAGAWA nakagawa@mxc.nes.nec.co.jp Thomas Lacroix thomas.lacroix@citrix.com @@ -64,7 +65,6 @@ Peter Balland peter@nicira.com Ram Jothikumar rjothikumar@nicira.com Rob Hoes rob.hoes@citrix.com Roger Leigh rleigh@codelibre.net -Sajjad Lateef slateef@nicira.com Sean Brady sbrady@gtfservices.com Sebastian Andrzej Siewior sebastian@breakpoint.cc Srini Seetharaman seethara@stanford.edu diff --git a/debian/ovs-bugtool b/debian/ovs-bugtool index 11d3acbc..6a435e60 100755 --- a/debian/ovs-bugtool +++ b/debian/ovs-bugtool @@ -98,6 +98,7 @@ OPENVSWITCH_DEFAULT_SWITCH = '/etc/default/openvswitch-switch' OPENVSWITCH_DEFAULT_CONTROLLER = '/etc/default/openvswitch-controller' OPENVSWITCH_CONF_DB = '/etc/openvswitch/conf.db' OPENVSWITCH_VSWITCHD_PID = '/var/run/openvswitch/ovs-vswitchd.pid' +COLLECTD_LOGS_DIR = '/var/lib/collectd/rrd' VAR_LOG_DIR = '/var/log/' X11_LOGS_DIR = VAR_LOG_DIR X11_LOGS_RE = re.compile(r'.*/Xorg\..*$') @@ -181,6 +182,7 @@ CAP_XML_ELEMENT = 'capability' CAP_BLOBS = 'blobs' CAP_BOOT_LOADER = 'boot-loader' +CAP_COLLECTD_LOGS = 'collectd-logs' CAP_DISK_INFO = 'disk-info' CAP_FIRSTBOOT = 'firstboot' CAP_HARDWARE_INFO = 'hardware-info' @@ -220,6 +222,8 @@ def cap(key, pii=PII_MAYBE, min_size=-1, max_size=-1, min_time=-1, cap(CAP_BLOBS, PII_NO, max_size=5*MB) cap(CAP_BOOT_LOADER, PII_NO, max_size=3*KB, max_time=5) +cap(CAP_COLLECTD_LOGS, PII_MAYBE, max_size=50*MB, + max_time=5) cap(CAP_DISK_INFO, PII_MAYBE, max_size=25*KB, max_time=20) cap(CAP_FIRSTBOOT, PII_YES, min_size=60*KB, max_size=80*KB) @@ -448,6 +452,7 @@ exclude those logs from the archive. cmd_output(CAP_BOOT_LOADER, [LS, '-lR', '/boot']) cmd_output(CAP_BOOT_LOADER, [MD5SUM, BOOT_KERNEL, BOOT_INITRD], label='vmlinuz-initrd.md5sum') + tree_output(CAP_COLLECTD_LOGS, COLLECTD_LOGS_DIR) cmd_output(CAP_DISK_INFO, [FDISK, '-l']) file_output(CAP_DISK_INFO, [PROC_PARTITIONS, PROC_MOUNTS]) file_output(CAP_DISK_INFO, [FSTAB])