(SIGAR-196) use pst_processor.psp_cpu_frequency to calculate cpu_info.mhz on HP-UX 11.31+

This commit is contained in:
Doug MacEachern 2010-01-12 10:53:25 -08:00
parent 3e98f20197
commit 392f6325e0
1 changed files with 4 additions and 0 deletions

View File

@ -715,7 +715,11 @@ int sigar_cpu_info_list_get(sigar_t *sigar,
SIGAR_SSTRCPY(info->vendor, "HP"); /*XXX*/ SIGAR_SSTRCPY(info->vendor, "HP"); /*XXX*/
SIGAR_SSTRCPY(info->model, "PA RISC"); /*XXX*/ SIGAR_SSTRCPY(info->model, "PA RISC"); /*XXX*/
#endif #endif
#ifdef PSP_MAX_CACHE_LEVELS /* 11.31+; see SIGAR-196 */
info->mhz = proc.psp_cpu_frequency / 1000000;
#else
info->mhz = sigar->ticks * proc.psp_iticksperclktick / 1000000; info->mhz = sigar->ticks * proc.psp_iticksperclktick / 1000000;
#endif
info->cache_size = SIGAR_FIELD_NOTIMPL; /*XXX*/ info->cache_size = SIGAR_FIELD_NOTIMPL; /*XXX*/
} }