HP-UX 11i Release Notes (December 2000)
HP-UX 11i Operating Environments
HP-UX 11i Operating Environment (new)
Chapter 4 79
management system calls related to deallocation and allocation of iCOD
processors have been made. These changes affect the system calls
pstat_getdynamic and mpctl.
pstat_getdynamic returns the number of active processors in
pst_dynamic.psd_proc_cnt. Previously, it was always the same as
pst_dynamic.psd_max_proc_cnt. The pst_dynamic.psd_proc_cnt
field now excludes deactivated processors.
In the past, a call to pstat_getdynamic returned fields psd_proc_cnt
(number of active processors) and psd_max_proc_cnt (max active =
processors), and they usually had the same value. This is because all
processors in the system are usually active. Consequently, these fields
could be used interchangeably even though they had different meanings.
With iCOD these fields are no longer interchangeable. Care must be
taken to use the proper field for the intended use.
The pstat system call has changed such that a call to
pstat_getdynamic() returns with the pst_dynamic.psd_proc_cnt
field containing the number of active processors. This value is less than
pst_dynamic.psd_max_proc_cnt when iCOD CPUs are present in the
system.
Four other fields are adjusted in pst_dynamic structure. They are
psd_avg_1_min, psd_avg_5_min, psd_avg_15_min, and
psd_cpu_time[]. psd_avg_1_min is calculated by summing up the
corresponding entries in psd_mp_avg_1_min[] and dividing by
psd_max_proc_cnt. In effect, psd_avg_1_min reflects the average
values of psd_mp_avg_1_min[]. The change is made to exclude the
values of the deactivated processors when summing up entries in
psd_mp_avg_1_min[]. The sum is then divided by psd_proc_cnt. This
eliminates taking values of deactivated processors into account.
psd_avg_5_mim and psd_avg_15_min is adjusted in a similar way.
Similarly, psd_cpu_time[i] reflects the average values in
psd_mp_cpu_time[][i]. The adjustment is again to exclude the values
of deactivated processors in psd_mp_cpu_time[][i] and dividing by
psd_proc_cnt. This eliminates taking values of deactivated processors
into account for each load average value.
Notice that even though these average fields are adjusted, no
information is lostbecause psd_mp_avg_*_min and psd_mp_cpu_time[]
still contain deactivated processor values.
The mpctl() changes include: