aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBryn M. Reeves <bmr@redhat.com>2014-09-17 07:45:38 +0100
committerBryn M. Reeves <bmr@redhat.com>2014-09-17 07:51:42 +0100
commit5d25a440c8c98b4c4ada284b91c85977264e2a0e (patch)
treecc5c1ad575727e2679c7aead49104b524b2cbd1f
parenta75101bf3278c40b01a6a7cc934b5c9b12927b98 (diff)
downloadsos-5d25a440c8c98b4c4ada284b91c85977264e2a0e.tar.gz
[numa] new plugin for NUMA information
And define a new 'memory' profile to group related plugins together. Fixes #226. Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
-rw-r--r--sos/plugins/numa.py45
1 files changed, 45 insertions, 0 deletions
diff --git a/sos/plugins/numa.py b/sos/plugins/numa.py
new file mode 100644
index 00000000..f526ba7d
--- /dev/null
+++ b/sos/plugins/numa.py
@@ -0,0 +1,45 @@
+# Copyright (C) 2014 Red Hat, Inc. Bryn M. Reeves <bmr@redhat.com>
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+from sos.plugins import Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin
+
+
+class Numa(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin):
+ """NUMA state and configuration
+ """
+
+ plugin_name = 'numa'
+ profiles = ('hardware', 'system', 'memory', 'performance')
+
+ packages = ('numad', 'numactl')
+
+ def setup(self):
+ self.add_copy_specs([
+ "/etc/numad.conf",
+ "/etc/logrotate.d/numad"
+ ])
+ self.add_copy_spec_limit(
+ "/var/log/numad.log*",
+ sizelimit=self.get_option("log_size")
+ )
+ self.add_cmd_outputs([
+ "numastat",
+ "numastat -m",
+ "numastat -n",
+ "numactl --show",
+ "numactl --hardware",
+ ])
+
+# vim: et ts=4 sw=4