[ofa-general] madrpc_init and reseting performance counters
weiny2 at llnl.gov
Fri Apr 11 15:32:03 PDT 2008
On Fri, 11 Apr 2008 17:14:25 -0400
Dan Noe <dpn at isomerica.net> wrote:
> On 4/11/2008 17:08, Ralph Campbell wrote:
> > Also, be aware that opensm now tries to poll the performance
> > counters and keep a total. If you have more than one thing
> > in the system trying to keep track of the total, they will
> > conflict and each only see part of the total counts.
> Yeah, this has been noted as a caveat. The need to reset the counters
> is a real pain.
> Is there a way to access the counters maintained by OpenSM without some
> fork/exec/parse mess?
Yes, assuming you have the perfmgr enabled; OpenSM has 2 ways of getting the
counters out of the Performance Manager.
a) use the console to dump the data to a file.
b) write your own "plugin" to OpenSM and every time the perfmgr gets new
data it will call your plugin. What you do from there is entirely up to
Specify a dump file in the opensm.opts config file.
# Event DB Options
# Dump file to dump the events to
Log into the console and use the command "perfmgr dump_counters" command:
OpenSM $ perfmgr dump_counters
Your data will be in "/var/log/opensm_port_counters.log". This file will be
overwritten each time you run dump_counters.
Look in the header opensm/osm_event_plugin.h for details on the interface.
Once you have a plugin compiled it can be loaded by the event_plugin_name
# Event Plugin Options
The interface will be called each time there is new data available. We are
using a plugin called opensmskummeeplugin[*] which puts all the data into a
MySQL DB ready for the cluster monitoring tool Skummee[#] to put it on a web
page for our operators.
Also to get you started there is a sample plugin in OpenSM "osmeventplugin".
Hope this helps,
[*] I hope to get this on a web page very soon. It has been approved for
opensource by the lab... ;-) I don't know if it is appropriate to put in OFED
due to its dependence on MySQL and Skummee.
More information about the general