aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBryn M. Reeves <bmr@redhat.com>2013-05-01 18:18:15 +0100
committerBryn M. Reeves <bmr@redhat.com>2013-05-01 18:18:15 +0100
commit13b9c3c0e696a19dc0a1a733749af541455cc6b6 (patch)
tree833475bb66394b5082bba662e14726c98383405d
parentb3ae26a01eb12f2ac2d6df11f169a37ba65a5595 (diff)
downloadsos-13b9c3c0e696a19dc0a1a733749af541455cc6b6.tar.gz
Move java data collection to separate plug-in
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
-rw-r--r--sos/plugins/general.py5
-rw-r--r--sos/plugins/java.py29
2 files changed, 30 insertions, 4 deletions
diff --git a/sos/plugins/general.py b/sos/plugins/general.py
index cebbbbee..fbf39917 100644
--- a/sos/plugins/general.py
+++ b/sos/plugins/general.py
@@ -40,9 +40,6 @@ class General(Plugin):
self.add_cmd_output("hostname", root_symlink="hostname")
self.add_cmd_output("date", root_symlink="date")
self.add_cmd_output("uptime", root_symlink="uptime")
- self.add_cmd_output("alternatives --display java",
- root_symlink="java")
- self.add_cmd_output("readlink -f /usr/bin/java")
self.add_cmd_output("tree /var/lib")
self.add_cmd_output("ls -lR /var/lib")
@@ -81,4 +78,4 @@ class UbuntuGeneral(DebianGeneral):
def setup(self):
super(UbuntuGeneral, self).setup()
- self.add_copy_spec("/etc/os-release")
+ self.add_copy_spec("/etc/os-release")
diff --git a/sos/plugins/java.py b/sos/plugins/java.py
new file mode 100644
index 00000000..bad726ca
--- /dev/null
+++ b/sos/plugins/java.py
@@ -0,0 +1,29 @@
+### 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.
+
+import os
+from sos.plugins import Plugin, RedHatPlugin, UbuntuPlugin, DebianPlugin
+
+class Java(Plugin, RedHatPlugin, UbuntuPlugin, DebianPlugin):
+ """basic java information"""
+
+ plugin_name = "java"
+
+ def setup(self):
+ self.add_copy_spec("/etc/java")
+ self.add_forbidden_path("/etc/java/security")
+ self.add_cmd_output("alternatives --display java",
+ root_symlink="java")
+ self.add_cmd_output("readlink -f /usr/bin/java")
+