diff options
author | Nathaniel Clark <Nathaniel.Clark@misrule.us> | 2017-07-12 16:35:54 -0400 |
---|---|---|
committer | Bryn M. Reeves <bmr@redhat.com> | 2018-03-27 16:02:35 +0100 |
commit | 9e698dc3546288b831046f062d7f40c3c705d704 (patch) | |
tree | 808da6dd2a9e01b4ce4a9be5a1b75c8610ccc502 | |
parent | f91d9e5a1b8b0a6e2b3088b1b735f71c03b6aeb7 (diff) | |
download | sos-9e698dc3546288b831046f062d7f40c3c705d704.tar.gz |
[lustre] Add Lustre filesystem plugin
This collects some basic information about the configuration
of Lustre on either a client or a server, including:
* Interal ring buffer log
* Basic configuration information
* Quota information
* Configuration of LNet
* JobID info
* LDLM connection states
Fixes: #1058
Signed-off-by: Nathaniel Clark <Nathaniel.Clark@misrule.us>
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
-rw-r--r-- | sos/plugins/lustre.py | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/sos/plugins/lustre.py b/sos/plugins/lustre.py new file mode 100644 index 00000000..06dba019 --- /dev/null +++ b/sos/plugins/lustre.py @@ -0,0 +1,57 @@ +# 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. + +from sos.plugins import Plugin, RedHatPlugin +from string import join + + +class Lustre(Plugin, RedHatPlugin): + '''Lustre filesystem''' + + plugin_name = 'lustre' + profiles = ('storage', 'network', 'cluster', ) + packages = ('lustre', 'lustre-client', ) + + def get_params(self, name, param_list): + '''Use lctl get_param to collect a selection of parameters into a + file. + + ''' + self.add_cmd_output("lctl get_param %s" % join(param_list, " "), + suggest_filename="params-%s" % name, + stderr=False) + + def setup(self): + self.add_cmd_output([ + "lctl debug_kernel", + "lctl device_list", + "lctl list_nids", + "lctl route_list", + "lnetctl net show -v" + ]) + + self.get_params("basic", ["version", "health_check", "debug"]) + self.get_params("lnet", ["peers", "routes", "routers", "nis"]) + self.get_params("ldlm-states", ["*.*.state"]) + self.get_params("jobid", ["jobid_name", "jobid_var"]) + + # Client Specific + self.add_cmd_output([ + "lfs df", + "lfs df -i" + ]) + + # Server Specific + self.get_params("osd", ["osd-*.*.{mntdev,files*," + + "kbytes*,blocksize,brw_stats}"]) + self.get_params("quota", ["osd-*.*.quota_slave." + + "{info,limit_*,acct_*}"]) + +# vim: set et ts=4 sw=4 : |