Extracting Resource Allocation Data for Chargeback in a HP Virtual Server Environment for HP Integrity Servers

</criteria>
<criteria name="SubType" sense="EXCLUDE">
<value>HPVMHost</value>
<value>vParMonitor</value>
<value>nPar</value>
<value>vPar</value>
<value>HPVMGuest</value>
</criteria>
</query>
</query-list>
CMS #
The highlighted “INCLUDE” and “EXCLUDE” flags indicate which kinds of servers match this query.
Notice that this query lists all noncomplex physical servers except those that are also VM Host servers.
A custom query that does not exclude these servers is easy to create. First copy the existing definition
of the “All Standalone Servers” query into a file with a new name. For example:
CMS # mxquery -lf "All Standalone Servers"
> /tmp/physicalservers.mxquery
CMS #
Then edit this definition so that VM Hosts are not excluded:
CMS # vi /tmp/physicalservers.mxquery
<?xml version="1.0" encoding="ISO-8859-1"?>
<query-list>
# (changed the query name from “All Standalone Servers”
# to “All Physical Servers”)
<query id="61" name="All Physical Servers" type="DeviceViews"
category-name="HPVSE" owner="mxadmin">
<criteria name="CriteriaByProductType" sense="INCLUDE">
<value>Server</value>
</criteria>
<criteria name="SubType" sense="INCLUDE">
<value>HP9000</value>
<value>HPIntegrity</value>
</criteria>
<criteria name="SubType" sense="EXCLUDE">
# (deleted “<value>HPVMHOST</value> line)
<value>vParMonitor</value>
<value>nPar</value>
<value>vPar</value>
<value>HPVMGuest</value>
</criteria>
</query>
</query-list>
~
:wq
CMS #
The new query can then be registered using the -a –f flags to the mxquery command:
CMS # mxquery –a –f /tmp/physicalservers.mxquery
CMS #
Finally, the new query can be run and filtered to provide a list of noncomplex physical servers:
CMS # cat listnoncmplx.sh
mxquery -e "All Physical Servers" | \
38