Nir Soffer has uploaded a new change for review.
Change subject: contrib: Add tool for getting hsm stats ......................................................................
contrib: Add tool for getting hsm stats
This is a very simple tool showing historgam of hsm calls in the given log files.
Example:
$ hsmstat vdsm.log.1 vdsm.log.2 8515 getVolumeSize 2258 repoStats 51 getVolumeInfo 30 getVolumesList 19 teardownImage ...
We can get same output or better using logdb by writing some smart sql.
Change-Id: Ia6013da71ca96535b98edace8577a4d8bb529465 Signed-off-by: Nir Soffer nsoffer@redhat.com --- A contrib/hsmstat 1 file changed, 39 insertions(+), 0 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/48/38748/1
diff --git a/contrib/hsmstat b/contrib/hsmstat new file mode 100755 index 0000000..d3400d2 --- /dev/null +++ b/contrib/hsmstat @@ -0,0 +1,39 @@ +#!/usr/bin/env python +# +# Copyright 2015 Red Hat, Inc. +# +# 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +# +# Refer to the README and COPYING files for full details of the license +# + +from collections import defaultdict +import fileinput +import re + +verb_re = re.compile(r" Run and protect: (?P<name>.+)(") + +verbs = defaultdict(int) + +for line in fileinput.input(): + match = verb_re.search(line) + if match: + name = match.group('name') + verbs[name] += 1 + +histogram = sorted(((count, verb) for verb, count in verbs.iteritems()), + reverse=True) +for count, name in histogram: + print " %6d %s" % (count, name)
automation@ovirt.org has posted comments on this change.
Change subject: contrib: Add tool for getting hsm stats ......................................................................
Patch Set 1:
* Update tracker::IGNORE, no Bug-Url found * Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' and is a valid url. * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.5', 'ovirt-3.4', 'ovirt-3.3'])
automation@ovirt.org has posted comments on this change.
Change subject: contrib: Add tool for getting hsm stats ......................................................................
Patch Set 2:
* Update tracker::IGNORE, no Bug-Url found * Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' and is a valid url. * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.5', 'ovirt-3.4', 'ovirt-3.3'])
oVirt Jenkins CI Server has posted comments on this change.
Change subject: contrib: Add tool for getting hsm stats ......................................................................
Patch Set 1:
Build Successful
http://jenkins.ovirt.org/job/vdsm_master_pep8_gerrit/16680/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_unit-tests_created/16852/ : SUCCESS
oVirt Jenkins CI Server has posted comments on this change.
Change subject: contrib: Add tool for getting hsm stats ......................................................................
Patch Set 2:
Build Successful
http://jenkins.ovirt.org/job/vdsm_master_pep8_gerrit/16683/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_unit-tests_created/16855/ : SUCCESS
Nir Soffer has posted comments on this change.
Change subject: contrib: Add tool for getting hsm stats ......................................................................
Patch Set 2: Verified+1
Jenkins CI RO has abandoned this change.
Change subject: contrib: Add tool for getting hsm stats ......................................................................
Abandoned
Abandoned due to no activity - please restore if still relevant
gerrit-hooks has posted comments on this change.
Change subject: contrib: Add tool for getting hsm stats ......................................................................
Patch Set 2:
* Update tracker: IGNORE, no Bug-Url found
Nir Soffer has restored this change.
Change subject: contrib: Add tool for getting hsm stats ......................................................................
Restored
vdsm-patches@lists.fedorahosted.org