|
|||||||
| Forums | Search Forums | Register | Forum Rules | Man Pages | Albums | FAQ | Members | Calendar | Search | Today's Posts | Mark Forums Read |
| HP-UX HP-UX (Hewlett Packard UniX) is Hewlett-Packard's proprietary implementation of the Unix operating system, based on System V. |
|
|
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
How to find processor frequency
Hello ,
Please tell me how to find processor frequency in HP UNIX . |
| Sponsored Links | ||
|
|
#2
|
||||
|
||||
|
This bit of perl magic should do it (answer in Mhz): Code:
#!/usr/contrib/bin/perl
local($PSTAT, $PSTAT_PROCESSOR) = (239, 10); # pstat_getprocessor
local($struct_pst_processor) = ("L30");
local($cpu_info, $cpu_ticks);
$cpu_info = "\0" x 120;
syscall($PSTAT, $PSTAT_PROCESSOR, $cpu_info, length($cpu_info), 1, 0);
($cpu_ticks) = (unpack($struct_pst_processor, $cpu_info))[26];
print $cpu_ticks/10000 . "\n"; |
| Sponsored Links | ||
|
|
#3
|
||||
|
||||
|
Quote:
When I tried that Perl script on my BSD boxes, all I got was a core file. I guess it only works on HP-UX? Code:
FreeBSD:/home/joeuser/procspeed $ chmod +x procspeed.pl FreeBSD:/home/joeuser/procspeed $ ./procspeed.pl Bad system call (core dumped) FreeBSD:/home/joeuser/procspeed $ So I went back to dmesg output and performed a case insensitive search for "MHz": Code:
FreeBSD:/home/joeuser $ dmesg | grep -i "mhz" CPU: AMD Duron(tm) processor (950.04-MHz 686-class CPU) Just out of curiosity, does this work under HP-UX (I don't have access to a HP-UX box, only BSD boxes at the moment). |
|
#4
|
||||
|
||||
|
Quote:
|
| Sponsored Links | |
|
|
#5
|
||||
|
||||
|
As perderabo mentioned, this is hp-ux specific. HP's boot messages generally do not provide the Mhz information, so dmesg cannot be used. The provided perl code should work on any hp-ux machine.
|
| Sponsored Links | |
|
|
#6
|
||||
|
||||
|
Quote:
Thanks |
| Sponsored Links | |
|
|
#7
|
|||
|
|||
|
Just do it in SH
Hi all,
There's a easier way to get CPU frequency on HP-UX 11 : echo "itick_per_usec/D" | /usr/bin/adb -k /stand/vmunix /dev/mem Cheers. |
| Sponsored Links | ||
|
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Find the feature code of the installed processor card on my p550 | balaji_prk | AIX | 2 | 07-16-2009 03:01 PM |
| Processor and processor core | balaji_prk | AIX | 1 | 02-12-2009 04:31 PM |
| LPAR processor/virtual processor settings | guttew | AIX | 1 | 02-01-2007 12:52 PM |
| Where can I find a Unix OS that will run on a 386 processor? | methudrez | UNIX Desktop for Dummies Questions & Answers | 4 | 08-08-2002 08:02 AM |
| To find processor speed & memory in HP Unix 10.2 | augustinep | UNIX for Dummies Questions & Answers | 4 | 01-30-2002 11:54 AM |
|
|