diff options
-rw-r--r-- | README | 21 | ||||
-rw-r--r-- | openlmi-providers.spec | 8 | ||||
-rw-r--r-- | src/CMakeLists.txt | 4 | ||||
-rw-r--r-- | src/pcp/openlmi-pcp-generate.in (renamed from src/pcp/openlmi-pcp-generate) | 5 |
4 files changed, 28 insertions, 10 deletions
@@ -243,3 +243,24 @@ The trace file is written to: More information about cimserver tracing can be found in the "OpenPegasus Tracing User Guide" PDF. Google the title to get a current URL. + + +******************************************************************************* +* Provider-specific Instructions * +******************************************************************************* + +PCP +~~~ + +Please note the PCP provider needs a different registration procedure since the +PCP metrics classes are being generated automatically according to the PCP +namespace. There is a helper script provided in the openlmi-pcp package that +generates the MOF and REG files according to the installed PCP components and +registers the appropriate classes within the CIMOM. The script requires the pcmd +daemon to be running. + +% openlmi-pcp-generate + +The openlmi-pcp package also installs a daily cronjob that runs the script +automatically to ensure any changes made to the PCP namespace would be reflected +in the system's CIM model. diff --git a/openlmi-providers.spec b/openlmi-providers.spec index 5ac8849..410e89d 100644 --- a/openlmi-providers.spec +++ b/openlmi-providers.spec @@ -775,14 +775,6 @@ if [ "$1" -ge 1 ]; then %{_datadir}/%{name}/90_LMI_Hardware_Profile_DMTF.mof || :; fi >> %logfile 2>&1 -%post -n openlmi-pcp -if [ "$1" -ge 1 ]; then - %{_bindir}/openlmi-mof-register -v %{version} register \ - %{_datadir}/%{name}/60_LMI_PCP.mof \ - %{_localstatedir}/lib/%{name}/60_LMI_PCP_PMNS.mof \ - %{_localstatedir}/lib/%{name}/60_LMI_PCP_PMNS.reg || :; -fi >> %logfile 2>&1 - %post -n openlmi-journald if [ "$1" -ge 1 ]; then %{_bindir}/openlmi-mof-register -v %{version} register \ diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 47d1ed3..4227ccb 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -60,6 +60,10 @@ if (WITH-JOURNALD) add_subdirectory(journald) endif (WITH-JOURNALD) +if (WITH-PCP) + add_subdirectory(pcp) +endif (WITH-PCP) + file(GLOB INIT_SKELS "*/lmi/*/__init__.skel") foreach(SKEL ${INIT_SKELS}) #TODO: find a way how to do it in cmake diff --git a/src/pcp/openlmi-pcp-generate b/src/pcp/openlmi-pcp-generate.in index a99fd67..088242e 100644 --- a/src/pcp/openlmi-pcp-generate +++ b/src/pcp/openlmi-pcp-generate.in @@ -43,6 +43,7 @@ STAMPFILE=$MOFREGDIR/stamp MOFFILE=$MOFREGDIR/60_LMI_PCP_PMNS.mof REGFILE=$MOFREGDIR/60_LMI_PCP_PMNS.reg PROVIDER=$PYTHON2_SITELIB/lmi/pcp/metric.py +VERSION=@OPENLMI_VERSION@ if [ ! -f $PROVIDER ]; then echo "Cannot find $PROVIDER" 1>&2 @@ -61,7 +62,7 @@ if [ -s $PCP_PMNS -a $PCP_PMNS -nt $STAMPFILE ]; then echo Unregistering $BASEMOFFILE echo Unregistering previous $MOFFILE echo Unregistering previous $REGFILE - openlmi-mof-register unregister $BASEMOFFILE $MOFFILE $REGFILE || : + openlmi-mof-register unregister -v $VERSION $BASEMOFFILE $MOFFILE $REGFILE || : fi echo Generating $MOFFILE @@ -81,7 +82,7 @@ if [ -s $PCP_PMNS -a $PCP_PMNS -nt $STAMPFILE ]; then echo Registering $BASEMOFFILE echo Registering new $MOFFILE echo Registering new $REGFILE - openlmi-mof-register register $BASEMOFFILE $MOFFILE $REGFILE 2>&1 | # filter out two noise diagnostics + openlmi-mof-register register -v $VERSION $BASEMOFFILE $MOFFILE $REGFILE 2>&1 | # filter out two noise diagnostics egrep -v 'Warning: the instance already exists.|In this implementation, that means it cannot be changed.' || : touch $STAMPFILE else |