cfengine/core — pull request #186 by mvpel (2012-09-29 21:00:41+00:00)
Title: HP-UX Implementation of $(sys.cpus) for Mantis #1069

Uses the HP-UX mpctl() function to query the number of processors
available system-wide (as opposed to within a processor set) in order
to populate the $(sys.cpus) variable.

In HP-UX running on Intel Itanium Hyper-Thread Technology processors,
where each CPU core has two virtual cores, the total number of virtual
- rather than physical - cores is provided, which corresponds to the
behavior of the Linux scan of the /proc/stat file with HTT is enabled
on x86 platforms.

On a PA-RISC system, the total number of physical cores is set. The
PA-8900 processor has two physical cores per CPU socket, so an rp8420
with 16 PA-8900 processors will set $(sys.cpus) to 32, as expected.

It may be worthwhile to implement a $(sys.cpusockets) variable too,
in light of things like Oracle and Red Hat licensing.

The mpctl() function is documented at this page:
http://h20000.www2.hp.com/bc/docs/support/SupportManual/c02264569/c02264569.pdf