Unix administration - How can I get the information about the cpu speed.

This is Interesting: Free IT Magazines  
Home > Archive > Unix administration > January 2004 > How can I get the information about the cpu speed.





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author How can I get the information about the cpu speed.
Fred Jiang

2004-01-23, 4:50 pm

Hello, Friends,
I get confused how to get cpu speed on alpha /sun/HP/IBM box. Please advise
it. Thanks in advance.
Regards,
Fred


Dave Hinz

2004-01-23, 4:50 pm

On Tue, 14 Oct 2003 12:04:13 +0800, Fred Jiang <fred.jiang@tianjin.mot.com> wrote:
quote:

> Hello, Friends,
> I get confused how to get cpu speed on alpha /sun/HP/IBM box. Please advise
> it. Thanks in advance.



It depends. What OS? Or, you can always open up the box and look,
I suppose. Can you give an example of a system you want to know this
for, as the answer varies by OS?



Marcin Dobrucki

2004-01-23, 4:50 pm


Fred Jiang wrote:
quote:

> Hello, Friends,
> I get confused how to get cpu speed on alpha /sun/HP/IBM box. Please advise
> it. Thanks in advance.



For modern Sun machines, this info is available via
/usr/platform/sun4u/sbin/prtdiag

With HPUX, you should get that via ioscan for "processor" class.

Dunno about alpha and ibm.

/Marcin

Andy

2004-01-23, 4:50 pm

Fred Jiang wrote:
quote:

> Hello, Friends,
> I get confused how to get cpu speed on alpha /sun/HP/IBM box. Please advise
> it. Thanks in advance.
> Regards,
> Fred
>
>



Try /usr/sbin/psrinfo -v. Works for me on Tru64 and Solaris.

I haven't got any IBMs or HPs to test this on so their milage may vary.

-Andy-

Fred Jiang

2004-01-23, 4:50 pm

Marcin, and Andy
Thanks for your great help on this.
for HP_UX, I thought command "$model" is enough.

"Marcin Dobrucki" <Marcin.Dobrucki@FAKE.nokia.com> wrote in message
news:TcVib.255$k4.5722@news1.nokia.com...
quote:

>
> Fred Jiang wrote:
advise[QUOTE][color=darkred]
>
> For modern Sun machines, this info is available via
> /usr/platform/sun4u/sbin/prtdiag
>
> With HPUX, you should get that via ioscan for "processor" class.
>
> Dunno about alpha and ibm.
>
> /Marcin
>




Ulrich Herbst

2004-01-23, 4:50 pm

Fred Jiang wrote:
quote:

> Hello, Friends,
> I get confused how to get cpu speed on alpha /sun/HP/IBM box. Please
> advise it. Thanks in advance.
> Regards,
> Fred



AIX:
lsattr -E -l proc0
(if you haven't got a proc0 device, because you're on a regatta lpar, take
just another procx device)

Linux:
cat /proc/cpuinfo

HP/UX:
echo itick_per_tick/D|adb /stand/vmunix /dev/kmem |\
sed -n 's/.*tick:.\\([0-9]*\\).*/\\1/p'| \
"awk '$1 > 0 {print int($1/10000) \"MHz\"}'

Solaris:
psrinfo -v | grep MHz

Or just use ServDoc (http://servdoc.sourceforge.net) :-)

Uli

Imran

2004-01-23, 4:50 pm

"Fred Jiang" <fred.jiang@tianjin.mot.com> wrote in message news:<bmfsm9$nfs$1@newshost.mot.com>...
quote:

> Hello, Friends,
> I get confused how to get cpu speed on alpha /sun/HP/IBM box. Please advise
> it. Thanks in advance.
> Regards,
> Fred



you can simply cat i.e;

cd /proc
cat cpuinfo

and thats all
Finnbarr P. Murphy

2004-01-23, 4:51 pm

Ulrich Herbst <ulrich.herbst@gmx.de> wrote:
quote:

> Fred Jiang wrote:
>
.....[QUOTE][color=darkred]
> HP/UX:
> echo itick_per_tick/D|adb /stand/vmunix /dev/kmem |\
> sed -n 's/.*tick:.\\([0-9]*\\).*/\\1/p'| \
> "awk '$1 > 0 {print int($1/10000) \"MHz\"}'
>



On HP-UX/Itanium (11i v1.5 and later) the /usr/contrib/bin/machinfo
utility provides detailed processor information. Programatically, you
can determine the processor clock speed using the pstat_getprocessor(2)
syscall.

- Finnbarr
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2009 webservertalk.com