diff options
author | Jon Magrini <jmagrini@redhat.com> | 2014-07-01 17:52:25 -0400 |
---|---|---|
committer | Bryn M. Reeves <bmr@redhat.com> | 2014-07-02 14:25:33 +0100 |
commit | 317806cf250bef47ce335b275c3502a99cc93df6 (patch) | |
tree | 1a068393e29331e69824b5da917094226d34e5f6 | |
parent | 1834e147d1ff3c5e02c085316ec3a465c0288f7b (diff) | |
download | sos-317806cf250bef47ce335b275c3502a99cc93df6.tar.gz |
[megacli] new plugin for LSI MegaRAID based adapters
The MegaCLI utility is a proprietary utility provided by LSI which can
perform reporting and management functions for MegaRAID SAS|SCSI
adapters. If the MegaCLI is detected, the plugin will collect basic
information such as adapter status, firmware rev, battery status, and
raid config.
Signed-off-by: Jon Magrini <jmagrini@redhat.com>
-rw-r--r-- | sos/plugins/megacli.py | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/sos/plugins/megacli.py b/sos/plugins/megacli.py new file mode 100644 index 00000000..a6d42bca --- /dev/null +++ b/sos/plugins/megacli.py @@ -0,0 +1,39 @@ +## megacli.py +## Copyright (C) 2007-2014 Red Hat, Inc., Jon Magrini <jmagrini@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. + +import os +import os.path +from sos.plugins import Plugin, RedHatPlugin + +class MegaCLI(Plugin, RedHatPlugin): + """Information for devices which use the MegaRAID Unified device driver + """ + + plugin_name = 'megacli' + + def setup(self): + if os.path.isfile("/opt/MegaRAID/MegaCli/MegaCli64"): + print "" + self.add_custom_text("LSI MegaCLI is installed.<br>") + self.get_megacli_files() + + def get_megacli_files(self): + """ MegaCLI specific output + """ + self.add_cmd_output("/opt/MegaRAID/MegaCli/MegaCli64 LDPDInfo -aALL") + self.add_cmd_output("/opt/MegaRAID/MegaCli/MegaCli64 -AdpAllInfo -aALL") + self.add_cmd_output("/opt/MegaRAID/MegaCli/MegaCli64 -AdpBbuCmd -GetBbuStatus -aALL") |