Entry
How can I modify Performance Manager AOs at runtime?
May 22nd, 2001 11:46
Engineer TCSI,
PM TOM objects such as pmKpiType, pmDataCollector are normally
configured via pmDataLoader.py, which is read at process initialization.
However, you CAN make certain changes to the behavior at run-time.
There is no GUI for this, but you can use PyOsp. (PyCorba should work
also.)
Note that there may be more changes that you can make, but here are some
simple ones. Theoretically, you should also be able to change the code
in pmDataCollector::CollectData() and then reload the tom
($DeployRoot/run reload PerformanceMgr). NOTE WELL: One test using
Catalant 2.2/SQM showed that you could NOT reload the PM TOM; had to
restart the process (run shutdown PerformanceMgr; run PerformanceMgr).
The example will change the data collection interval (short intervals
are great for testing), and change the class list. It was tested on
Cat 2.0 Stable 14.
You should open the following files in an editor:
$DevelopRoot/src/PerFormanceMgr/packages/Sample/PeformanceMgr.mosu
$DevelopRoot/src/PerFormanceMgr/packages/Sample/pmDataLoader.py
$DeployRoot/StartCatalant.csh
$DeployRoot/run pyosp
import Osp
from Osp import PerformanceMgr
from Osp import Topo # Module with source AOs
dclist = Osp.Find(PeformanceMgr.pmDataCollector)
# check len(dclist), in our case there is only one
dc = dclist[0]
dc.Get() # view all attributes
# This will display all attributes of the data collector.
# It is probably enabled at this point. I bet unpredictable
# things can happen if you modify the collector while it is
# collecting data, so stop it.
dc.StopDataCollection(0) # 0 means stop, don't pause, I think
dc.dataCollectionInterval=60
dc.classNameList=('SUNWorkStation',)
dc.attrNameList=('cmbsRelatable::name', 'SUNWorkStation::ipAddress')
dc.Get() # view all attributes
dc.StartDataCollection()
In Cat 2.2, You can add pmDataSourceType and pmKpiType objects,
and the PM TOM will
automatically create the table and add the column, respectively.
NOTE
that sometimes it takes time for PM to respond to client requests.