Extracting Resource Allocation Data for Chargeback in a HP Virtual Server Environment for HP Integrity Servers
  For a complex (cell-based) physical server 
o  Device type: complex 
  For a all other (noncomplex/non-cell-based) physical servers 
o  Device type: Server 
o  Device subtype: HP Integrity  or Device subtype: HP9000 
o  None of the following entries 
  Device subtype: nPar 
  Device subtype: vPar 
  Device subtype: HPVMGuest 
The following is a simple shell loop that extracts all node records from the mxnode output and looks 
for physical servers: 
CMS # cat ./listphys.sh 
for i in `mxnode -ln`; do 
 printf "\n%s\n" $i 
 mxnode -ld $i | grep "^Device" | grep "type" 
 done | awk -v RS="" '{ \ 
 if (match($0,"Complex")) {printf "%s Complex\n", $1} \ 
 if (match($0,"Integrity|HP9000")) 
 { if (!match($0,"vPar|nPar|HPVMGuest")){printf "%s Non-
Complex\n", $1}} 
 }' 
CMS # 
This script produces the following output: 
CMS # ./listphys.sh 
va01sv Non-Complex 
legacy01 Non-Complex 
va00-cplx_USE4452HL6 Complex 
va02cm Non-Complex 
legacy03 Non-Complex 
legacy02 Non-Complex 
CMS # 
As an alternative to mxnode command, you can use the HP SIM mxquery command. The mxquery 
command presents a number of more sophisticated queries to HP SIM that include access to the same 
collections that are presented in the graphical tool. This command also allows the user to create new 
queries. Running mxquery with no arguments gives a list of built-in queries that are available, as 
shown in the following example: 
CMS # mxquery 
All Clusters 
MSCS Clusters 
OpenVMS Clusters 
… 
All Systems 
All Servers 
… 
All HP Service Events 
All nPartition Servers 
All HP Integrity Virtual Machines 
All Virtual Partition Servers 
All Resource PartitionsAll Shared Resource Domains 
All HP Serviceguard Clusters 
All Standalone Servers 
All p-Class Racks 
All e-Class Enclosures 
36 










