Operating System - HP-UX
1837962 Members
2596 Online
110124 Solutions
New Discussion

Re: Processor - Model - Clock - Total

 
SOLVED
Go to solution
cfeitosa
Frequent Advisor

Processor - Model - Clock - Total

Hello!

How can I identify the things below in relation a processor by command line:

-Model:
-Clock: (Mhz or GHz)
-Total:

By SAM I can see it by System Properties but I would like to know if is possible by command line...

Please, could someone give me a help?

Thanks,
clefeitosa
5 REPLIES 5
Oviwan
Honored Contributor
Solution

Re: Processor - Model - Clock - Total

Hey

On >=11.23 you can use "machinfo".

Regards
Robert-Jan Goossens_1
Honored Contributor

Re: Processor - Model - Clock - Total

Hi,

Have a look at Merijn's faqs on this link.

http://mirrors.develooper.com/hpux/faq.html

Regards,
Robert-Jan
Pete Randall
Outstanding Contributor

Re: Processor - Model - Clock - Total

If you have Ignite installed, you can use the print_manifest command.

You can also use SAM to display system properties (Sam -> Performance
Monitors -> System Properties).

There are also utilities like "cfg2html" ( http://come.to/cfg2html ),
"nickel" ( ftp://ftp.hp.com/pub/catia/Utils/nickel.shar ) and "sysinfo"
( http://hpux.cs.utah.edu/hppd/hpux/Sysadmin/sysinfo-3.3.1/ ).

Finally, you can also obtain this information from the command line with a
series of little scripts like these:

CPU

HPUX=/stand/vmunix

MODEL=$(grep -i $(model | tr "/" " " \
| awk '{print $NF}') \
/usr/sam/lib/mo/sched.models \
| awk '{print $NF}')

#Note: for 11.23 RISC, use
MHZ=$(echo itick_per_tick/D \ # echo "itick_per_usec/d" \
| adb -k $HPUX /dev/kmem \ # | adb $HPUX /dev/kmem
| tail -1 \ #For Itanium, use machinfo
| awk '{print $2/10000}')
echo `hostname` has `ioscan -k |grep -n processor \
|wc -l` $MODEL $MHZ "Mhz processor(s)"


Number of CPUs

ioscan -k |grep -n processor |wc -l




RAM

HPUX=/stand/vmunix
MAJORREV=$(uname -r | cut -f2 -d .)
if [ $MAJORREV -ge "11.0" ]
then
MYSYMBOL="phys_mem_pages"
else
MYSYMBOL="physmem"
fi

MYMEM=$(echo "${MYSYMBOL}/D" \
| adb $HPUX /dev/kmem \
| grep "${MYSYMBOL}: *." \
| awk '{printf "%.0f MB\n",$2/256}')
echo $MYMEM



And, even more finally, you can obtain CPU speed and RAM without CSTM or root ac
cess as described by Tom Ferony (under Nancy Rippey's login) here:
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=851889


Pete

Pete
Pete Randall
Outstanding Contributor

Re: Processor - Model - Clock - Total

The spacing got pretty messed up on that attempt. Here's another try at it:

CPU

HPUX=/stand/vmunix

MODEL=$(grep -i $(model | tr "/" " " \
| awk '{print $NF}') \
/usr/sam/lib/mo/sched.models \
| awk '{print $NF}')

#Note: for 11.23 RISC, use
MHZ=$(echo itick_per_tick/D \ # echo "itick_per_usec/d" \
| adb -k $HPUX /dev/kmem \ # | adb $HPUX /dev/kmem
| tail -1 \ #For Itanium, use machinfo
| awk '{print $2/10000}')
echo `hostname` has `ioscan -k |grep -n processor \
|wc -l` $MODEL $MHZ "Mhz processor(s)"


Pete

Pete
cfeitosa
Frequent Advisor

Re: Processor - Model - Clock - Total

Hello!

Thanks for all answers.

Regards,
clefeitosa