Licensing a virtual server
If your program is installed on a virtual machine or virtual cloud server, you must pay for the number of virtual processor cores.
The number of virtual cores is equivalent to the number of VPCs used by the program. You can determine the number of virtual cores in four ways:
- IBM License Metric Tool
- db2pd –osinfo command
- db2diag command
- Db2® Env_Get_System_Resources environment variable
Using the IBM License Metric Tool to determine the number of VPCs to license
The IBM License Metric Tool reports the CPU core subcapacity count for each virtual server. This count defines the number of VPCs you must license.
Using the db2pd command to determine the number of VPCs to license
- Run the db2pd –osinfo command to return the server’s environment variables. If you have multiple servers, you must run the command on each server.
- If you have an HMTDegree value of ‘1’, the OnlineCPU value is equivalent to the number of VPCs you must license. Virtual machines always have an HMTDegree value of ‘1’.
Using the db2diag command to determine the number of VPCs to license
- If you are on Windows, run the following command: db2diag -g data:=“System Info”. If you are on Linux/Unix, run the following command: db2diag -g data:='System Info'
- Similar to the db2pd command, this command returns the number of online CPUs and the HMT degree, displayed as “Threading degree per core”. The number of online CPUs is equivalent to the number of VPCs you must license.
Using the Db2 Env_Get_System_Resources Monitor to determine the number of VPCs to license
The Db2 Env_Get_System_Resources Monitor is a table function that you can run on SQL. If you want to find the resources for each member in Standard Db2 or PureScale Cluster, complete the following steps:
- Enter the
query:
Select MEMBER, varchar(HOST_NAME,12) as HOST_NAME, CPU_TOTAL,CPU_online, CPU_HMT_Degree from table(SYSPROC.ENV_GET_SYSTEM_RESOURCES()) order by MEMBER
- Use the CPU_Online and CPU_HMT_Degree values to determine the number of VPCs you must license.
Example
You purchase a virtual cloud server on a private cloud or a managed service provider such as SoftLayer, and an eight-core virtual CPU. Take the following steps to find the number of VPCs:
- Run the db2pd-osinfo command. An HMTDegree of 1 and an OnlineCPU of 8 are returned.
- License eight VPCs for this environment.