1834269 Members
91412 Online
110066 Solutions
New Discussion

Re: Hardware Information

 
Nicky Power
Occasional Contributor

Hardware Information

What Commands to get the following

Processor type and speed, no. of processors, no of NICs
4 REPLIES 4
Pete Randall
Outstanding Contributor

Re: Hardware Information

This question gets asked so frequently that I saved the full answer in a text file:


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
mavrick
Regular Advisor

Re: Hardware Information

Hi,

You will get all the details from STM and
also ioscan be used
spex
Honored Contributor

Re: Hardware Information

Processor type:
$ [ "$(uname -m)" = "ia64" ] && echo Itantium || echo PA-RISC

Number of processors:
$ ioscan -FkC processor | wc -l

Number of network interfaces:
$ ioscan -FkC lan | wc -l
Redhat
Trusted Contributor

Re: Hardware Information

Speed of the CPU in MHz:-
echo "itick_per_usec/D"|adb /stand/vmunix /dev/mem|tail -1 \
|awk '{print $2}'

Processor count :-
echo processor_count/D | adb /stand/vmunix /dev/mem | tail -1 \
| awk '{print $2}'

Type of processor can be understood by
file :- file /stand/vmunix

No. of lan card can be found by:-
lanscan|grep -v -e ^Hardware -e ^Path |awk '{print $3}'|wc -l

expect your point please