This article is deprecated. Please see the following article instead.
The Performance Monitor Python API is implemented in class exdb.Perfmon. To use Perfmon in Python, first specify
UsePerfmon=True
in theexdb.init_runtime()
parameters:exdb.init_runtime(disk=is_disk, tmgr=options.tmgr, shm=is_shm, debug=is_debug, UsePerfmon=True)Then initialize the monitor by passing the database memory segment size to
exdb.Perfmon.init()
; open the eXtremeDB database to monitor and pass its name toexdb.Perfmon.attach()
and perform the database operations for which performance metrics are desired. The HTTP Viewer displays these metrics in a browser. When monitoring is completed, detach the database from the monitor by callingexdb.Perfmon.detach()
, and close the monitor with exdb.Perfmon.close().At any time after initializing the monitor the application can set the following options that control its behavior:
enabled
A flag to allow a temporary pause of monitoring. 0=disable or 1=enable. (default is 1 enabled)
monitor_interval_ms
How often the monitor will read values, in ms (default is 1000ms or 1s)
monitor_length_sec
The duration of data that will be displayed in the HV perfmon GUI (default is 3600s)
ui_update_rate_ms
How often to update graphs on perfmon GUI (default is 5000ms)
store_interval_sec
The amount of time data will be stored in the perfmon database. (default is 3600s). Older data will be removed to save space
To retrieve the current options call
exdb.Perfmon.get_options()
which returns an options strucure. To set an option callexdb.Perfmon.set_options()
with the option name and value. At any time after attaching a database, the name of the database currently being monitored can be obtained by callingexdb.Perfmon.getDbName()
.