How does ServiceNow handle/show virtual CPU on a form?

Inactive_Use469
Giga Contributor

As per the KB0696858, the "CPU count" in ServiceNow means the number of physical CPUs (sockets). In this case 1 socket.

Ref: https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0696858

It appears ServiceNow doesn’t have a separate field and currently doesn’t support a pattern for picking up virtual CPUs.

As such, the "CPU core count" means the number of cores in one physical CPU (socket). In this case 2 cores. See attached.

The pattern is picking it up the following:

Get partial CPU data from Win32_Processor
2022-02-02 02:14:03: Executing WMI query on host: 10.XXX.XX.XX with namespace: root\CIMV2 and query: SELECT NumberOfLogicalProcessors,NumberOfCores FROM Win32_Processor
2022-02-02 02:14:11: Query result:
internal_namespace=root/cimv2 internal_classname=Win32_Processor __CLASS=Win32_Processor DeviceID=CPU0 NumberOfCores=2 NumberOfLogicalProcessors=4
2022-02-02 02:14:11:
setAttribute(Win32_Processor_Partial,[{NumberOfLogicalProcessors=4,
internal_classname=Win32_Processor, internal_namespace=root/cimv2, DeviceID=CPU0, __CLASS=Win32_Processor, NumberOfCores=2, row_number=1}])
2022-02-02 02:14:11: Execution time: 7253 ms

- Here it shows NumberOfCores=2 and NumberOfLogicalProcessors=4

For the CI both CPU count and core values are correct.

The "socket" number is the number of physical CPUs and it always matches the "CPU count". In this case 1.

However, ServiceNow doesn’t show this as a virtual CPU count. It's only representing the physical CPU.

This also means you could have 8vCPUs and it's still only going to be 1 socket in ServiceNow as they don’t account for virtual sockets.

- The "core per socket" number always matches the "CPU core count"
- And, the final logical CPU number is their multiplication.

Task Manager: Socket =1 which is (CPU count)
From the pattern:
NumberOfCores=2
NumberOfLogicalProcessors=4 (The logical processor is a multiplication of "physical CPUs" (or Socket) x "cores per CPU" (CPU core count).

When hyperthreading as in this case, the number of logical processors is double. Or, the cores (CPU core count) x (CPU core thread) which is 4 Logical Processors. The pattern is correct.

The below snippet is from the Windows Discover Article. Please note the red highlight.

https://docs.servicenow.com/bundle/sandiego-it-operations-management/page/product/discovery/reference/r_DataCollDiscoWindowsComputers.html

Please note the statement: *Core counts and threads per core might not be accurate, due to issues with Microsoft reporting.

Okay, so this is all good technical stuff but our users just want to see how many virtual CPUs are on the CI. So, back to the question.

How does ServiceNow handle/show virtual CPU on a form? Or do they. Hard to believe in today's world of virtual everything there is not an OOB field or easy way to show virtual processors on the CI form(s).

1 ACCEPTED SOLUTION

Jordan Hladish
Tera Expert

Check out the below

KB0855396 - [Discovery - CPU Count/Cores] Understanding how the CPU count and CPU cores for virtual boxes. (Linux/Windows)

https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0855396

 

The above is the extent to which this logic is being performed. If this isn't sufficient for you, I'd recommend creating a new field and populating it via logic you create than changing anything OOB.

View solution in original post

3 REPLIES 3

Rahul Priyadars
Giga Sage
Giga Sage

I am not the Windows Expert but

Which Formula covers most of the cases of vCPU Calculation?

Jordan Hladish
Tera Expert

Check out the below

KB0855396 - [Discovery - CPU Count/Cores] Understanding how the CPU count and CPU cores for virtual boxes. (Linux/Windows)

https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0855396

 

The above is the extent to which this logic is being performed. If this isn't sufficient for you, I'd recommend creating a new field and populating it via logic you create than changing anything OOB.

Inactive_Use469
Giga Contributor

Appreciate the responsiveness and additional guidance.  It certainly sounds like there is no separate field OOB for vCPU so we will likely end up creating one and adding the calculation to populate it.   This way our users do not have to do the math themselves and it's clear with a separate field how many virtual CPUs exist.