aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBryan Quigley <bryan.quigley@canonical.com>2016-04-01 16:10:31 -0400
committerBryn M. Reeves <bmr@redhat.com>2016-05-25 17:07:03 +0100
commit062c2563d74e4a8a7aa377c5fe2341da6a4ccf22 (patch)
treed526e85710d5a4206213adfce7ab8d89e889bdfe
parent1cbe9f52c9fc63724bd6e1bebbf536e19072c545 (diff)
downloadsos-062c2563d74e4a8a7aa377c5fe2341da6a4ccf22.tar.gz
[x11|opengl|opencl|vulkan] Create seperate plugin for each gpu api
This takes glxinfo out of x11 and moves it to opengl. It also provides clinfo and vulkaninfo in their own plugin. Signed-off-by: Bryan Quigley <bryan.quigley@canonical.com>
-rw-r--r--sos/plugins/opencl.py31
-rw-r--r--sos/plugins/opengl.py31
-rw-r--r--sos/plugins/vulkan.py31
-rw-r--r--sos/plugins/x11.py1
4 files changed, 93 insertions, 1 deletions
diff --git a/sos/plugins/opencl.py b/sos/plugins/opencl.py
new file mode 100644
index 00000000..4c363e54
--- /dev/null
+++ b/sos/plugins/opencl.py
@@ -0,0 +1,31 @@
+# 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 OpenCL(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin):
+ """OpenCL
+ """
+
+ plugin_name = 'opencl'
+ profiles = ('hardware', 'desktop', 'gpu')
+ files = ('/usr/bin/clinfo',)
+
+ def setup(self):
+ self.add_cmd_output([
+ "clinfo",
+ ])
+
+# vim: set et ts=4 sw=4 :
diff --git a/sos/plugins/opengl.py b/sos/plugins/opengl.py
new file mode 100644
index 00000000..c0927adf
--- /dev/null
+++ b/sos/plugins/opengl.py
@@ -0,0 +1,31 @@
+# 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 OpenGL(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin):
+ """OpenGL
+ """
+
+ plugin_name = 'opengl'
+ profiles = ('hardware', 'desktop', 'gpu')
+ files = ('/usr/bin/glxinfo',)
+
+ def setup(self):
+ self.add_cmd_output([
+ "glxinfo",
+ ])
+
+# vim: set et ts=4 sw=4 :
diff --git a/sos/plugins/vulkan.py b/sos/plugins/vulkan.py
new file mode 100644
index 00000000..722ae46e
--- /dev/null
+++ b/sos/plugins/vulkan.py
@@ -0,0 +1,31 @@
+# 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 Vulkan(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin):
+ """Vulkan
+ """
+
+ plugin_name = 'vulkan'
+ profiles = ('hardware', 'desktop', 'gpu')
+ files = ('/usr/bin/vulkaninfo',)
+
+ def setup(self):
+ self.add_cmd_output([
+ "vulkaninfo",
+ ])
+
+# vim: set et ts=4 sw=4 :
diff --git a/sos/plugins/x11.py b/sos/plugins/x11.py
index 97b50610..34380da1 100644
--- a/sos/plugins/x11.py
+++ b/sos/plugins/x11.py
@@ -33,7 +33,6 @@ class X11(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin):
self.add_forbidden_path("/etc/X11/X")
self.add_forbidden_path("/etc/X11/fontpath.d")
self.add_cmd_output([
- "glxinfo",
"xrandr --verbose"
])