Skip Menu |

This queue is for tickets about the Unix-Processors CPAN distribution.

Report information
The Basics
Id: 54077
Status: open
Priority: 0/
Queue: Unix-Processors

People
Owner: Nobody in particular
Requestors: Sean.Iffland.CTR [...] dcpds.cpms.osd.mil
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: ia64 processors on HP-UX show the incorrect speed
Date: Thu, 28 Jan 2010 15:37:00 -0600
To: <bug-Unix-Processors [...] rt.cpan.org>
From: "Iffland, Sean CTR DoD/CPMS" <Sean.Iffland.CTR [...] dcpds.cpms.osd.mil>
Module Version: 2.042 This is perl, v5.8.8 built for IA64.ARCHREV_0-thread-multi HP-UX servername B.11.23 U ia64 2366879983 unlimited-user license I am using the following line in my script: $speed = (Unix::Processors->max_clock); printf("$speed MHZ\n"); This works great on the Redhat Linux system, but all HP-UX system on the ia64 architecture report the incorrect speed. This particular server the actual Clock speed is 1598MHz. But the module reports it as 400Mhz. Below is the sample script and the output: servername:/tmp# cat speed.pl #!/usr/bin/perl use Unix::Processors; $speed = (Unix::Processors->max_clock); printf("$speed MHZ\n"); beast:/tmp# ./speed.pl 400 MHZ servername:/tmp# This happens on all our HP-UX ia64 servers regardless of the model. I really like this module and would be willing to test any updates to make it display the correct speed. Thanks, Sean Iffland UNIX System Administrator STG Inc/Lockheed Martin Email: sean.iffland.ctr@dcpds.cpms.osd.mil Phone: (210)581-6083
HPUX info comes from the pstat_getprocessor call; psp_iticksperclktick structure element. Probably there's some change to the tick speed or this structure since it was last working. Since I don't have a HPUX system please grab the source (perl Makefile.PL ; make ; make test), and see if you can patch up Processors.pm, I'll happily release the patch once you have it. Looking at some other code on the web, try changing the psp_iticksperclktick line to this: value = psp.psp_iticksperclktick * sysconf(_SC_CLK_TCK) / 1000000;