diff options
author | pcarrier <pcarrier@ef72aa8b-4018-0410-8976-d6e080ef94d8> | 2011-02-04 19:40:26 +0000 |
---|---|---|
committer | pcarrier <pcarrier@ef72aa8b-4018-0410-8976-d6e080ef94d8> | 2011-02-04 19:40:26 +0000 |
commit | 8db5ede5be7b22b3f58fc790618d22e964a804db (patch) | |
tree | 288cee9b0804954bac1b7c141db936e25e5045fb | |
parent | e6200b543060323d46370b7de9070733b6fcb82e (diff) | |
download | sos-8db5ede5be7b22b3f58fc790618d22e964a804db.tar.gz |
[plugins] cluster.py: fix the regexp code
That will teach me not to read APIs.
git-svn-id: svn+ssh://svn.fedorahosted.org/svn/sos/trunk@1069 ef72aa8b-4018-0410-8976-d6e080ef94d8
-rw-r--r-- | sos/plugins/cluster.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sos/plugins/cluster.py b/sos/plugins/cluster.py index 64cab1e3..16ef2b86 100644 --- a/sos/plugins/cluster.py +++ b/sos/plugins/cluster.py @@ -102,20 +102,20 @@ class cluster(sos.plugintools.PluginBase): if rhelver is 4: status, output, time = self.callExtProg("cman_tool services") - for lockspace in self.doRegexFindAll(r'^DLM Lock Space:\s*"([^"]*)".*$', output): + for lockspace in re.compile(r'^DLM Lock Space:\s*"([^"]*)".*$', re.MULTILINE).findall(output): self.callExtProg("echo %s > /proc/cluster/dlm_locks" % lockspace) self.collectOutputNow("cat /proc/cluster/dlm_locks", suggest_filename = "dlm_locks_%s" % lockspace) if rhelver is 5: status, output, time = self.callExtProg("group_tool") - for lockspace in self.doRegexFindAll(r'^dlm\s+[^\s]+\s+([^\s]+)$', output): + for lockspace in re.compile(r'^dlm\s+[^\s]+\s+([^\s]+)$', re.MULTILINE).findall(output): self.collectExtOutput("dlm_tool lockdebug '%s'" % lockspace, suggest_filename = "dlm_locks_%s" % lockspace) else: # RHEL6 or recent Fedora status, output, time = self.callExtProg("dlm_tool ls") - for lockspace in self.doRegexFindAll(r'^name\s+([^\s]+)$', output): + for lockspace in re.compile(r'^name\s+([^\s]+)$', re.MULTILINE).findall(output): self.collectExtOutput("dlm_tool lockdebug -svw '%s'" % lockspace, suggest_filename = "dlm_locks_%s" % lockspace) |