Operating System - HP-UX
1826501 Members
1845 Online
109692 Solutions
New Discussion

how to collect system info

 
SOLVED
Go to solution
j773303
Super Advisor

how to collect system info

I know "machinfo" can collect cpu info, memory info,host info and so on. But machinfo only in 11.23. Does anyone knows how to collect cpu info (how many cpus, cpu clock), memory size and so on on 11.11, 11.00 . Thanks in advanced.
Hero
12 REPLIES 12
Mike Shilladay
Esteemed Contributor

Re: how to collect system info

Hi,

Use STM to gather this information. Select memory, tab to tools, select information, select run. The same for CPU.

Hope that helps,

Mike.
Pete Randall
Outstanding Contributor
Solution

Re: how to collect system info

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/ ).

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


Support Tools Manager (STM) CPU info:

echo "selclass qualifier cpu;info;wait;infolog" | cstm




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


Support Tools Manager (STM) RAM info:

echo "selclass qualifier memory;info;wait;infolog" | cstm




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


Pete

Pete
j773303
Super Advisor

Re: how to collect system info

I want to write a script to gather the cpu clock rate, how many cpu, momory size and so on. So, if any command or script sample for me reference in hpux 11.11 , 11.0 ? Thanks.
Hero
MarkSyder
Honored Contributor

Re: how to collect system info

SAM -> Performance Monitors -> System Properties. Firts tab is processor(s).

Mark Syder (like the drink but spelt different)
The triumph of evil requires only that good men do nothing
J. Bravo
Respected Contributor

Re: how to collect system info

Try with cfg2html:

http://www.cfg2html.com/

Regards;

J. Bravo.
Robert-Jan Goossens
Honored Contributor

Re: how to collect system info

AwadheshPandey
Honored Contributor

Re: how to collect system info

Delcho Tuhchiev
Frequent Advisor

Re: how to collect system info

Hi,
For basic HW info you can use command "machinfo"

#machinfo
CPU info:
Number of CPUs = 4
Clock speed = 1600 MHz
Bus speed = 400 MT/s
CPUID registers
vendor information = "GenuineIntel"
processor serial number = 0x0000000000000000
processor version info = 0x0000000020000704
architecture revision: 0
processor family: 32 Intel(R) Itanium 2 9000 series
processor model: 0 Intel(R) Itanium 2 9000 series
processor revision: 7 Stepping C2
largest CPUID reg: 4
processor capabilities = 0x0000000000000005
implements long branch: 1
implements 16-byte atomic operations: 1
Bus features
implemented = 0xbdf0000020000000
selected = 0x0000000000000000

Cache info (per core):
L1 Instruction: size = 16 KB, associativity = 4
L1 Data: size = 16 KB, associativity = 4
L2 Instruction: size = 1024 KB, associativity = 8
L2 Data: size = 256 KB, associativity = 8
L3 Unified: size = 9216 KB, associativity = 9

Memory = 4076 MB (3.980469 GB)

Firmware info:
Firmware revision = 04.10
FP SWA driver revision: 1.18
IPMI is supported on this system.
BMC version: 4.1

Platform info:
model string = "ia64 hp server rx2620"
machine id number = 6837e39d-36ba-11d9-ba80-29284829550a
machine serial number = DE44100174

OS info:
sysname = HP-UX
nodename = mediku2
release = B.11.23
version = U (unlimited-user license)
machine = ia64
idnumber = 1748493213
vmunix _release_version:
@(#) $Revision: vmunix: B11.23_LR FLAVOR=perf Fri Aug 29 22:35:38 PDT 2003 $
Delcho Tuhchiev
Frequent Advisor

Re: how to collect system info

Sorry my mistace :( I've did not read carefully the question.
I think in your case is better to use "cfg2html" tool as it was mentioned above.
Geoff Wild
Honored Contributor

Re: how to collect system info

Attached is a c program (just compile it with the native HP-UX compiler) called memdetail to get info on memory - and this script below called HPMEM:

# cat /usr/local/bin/hpmem
#!/bin/ksh
#
# Taken from the HP/UniGraphics FAQ
# You must be ROOT to execute this since it uses adb to
# examine the running kernel
#
GetKernelSymbol()
{
echo "$1/D" | \
adb $hpux /dev/kmem | \
tr "\012" " " | \
awk -F: '{print $3}'|\
read kval
}
hpux=/hp-ux
rev=$(uname -r | cut -d. -f2)
if ((rev > 9)); then hpux=/stand/vmunix ;fi
/bin/uname -a
# if 11iv2 or higher - get cpu this way
ver=$(uname -r | cut -d. -f3)
if ((ver > 22)); then
kval=`echo "processor_count/D" | adb /stand/vmunix /dev/kmem |tail -1|awk -F: '{print $2}' `
else
GetKernelSymbol "processor_count"
fi
print CPU Count: $kval
GetKernelSymbol "itick_per_tick"
let speed=kval/10000
print CPU Speed: $speed MHz
if ((rev > 10)); then
print CPU HW Support: `getconf HW_CPU_SUPP_BITS`-bit
print Kernel Support: `getconf KERNEL_BITS`-bit
GetKernelSymbol "memory_installed_in_machine"
else
GetKernelSymbol "physmem"
fi
# if 11iv2 or higher - get memory this way
ver=$(uname -r | cut -d. -f3)
if ((ver > 22)); then
kernel=$(/usr/sbin/kcpath -x)
hexval=$(echo "phys_mem_pages/A" | adb $kernel /dev/kmem|tail +2|awk '{print $2}')
REAL_MEM=$(echo ${hexval}=D|adb)
mb=$(expr ${REAL_MEM} / 256)
else
let mb=kval*4/1024 # convert pages to MB
fi
print RAM Size: $mb MB
GetKernelSymbol "bufpages"
let mb=kval*4/1024 # convert pages to MB
print bufpages: $mb MB
GetKernelSymbol "maxuprc"
print maxuprc: $kval
GetKernelSymbol "maxvgs"
print maxvgs: $kval
GetKernelSymbol "maxfiles"
print maxfiles: $kval
GetKernelSymbol "max_thread_proc"
print max_thread_proc: $kval
GetKernelSymbol "nfile"
print nfile: $kval
GetKernelSymbol "nproc"
print nproc: $kval
GetKernelSymbol "ninode"
print ninode: $kval
GetKernelSymbol "vfd_cw"
print shmmax: $kval
GetKernelSymbol "shmmni"
print shmmni: $kval
GetKernelSymbol "dbc_max_pct"
print dbc_max_pct: $kval



Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
SGUX
Valued Contributor

Re: how to collect system info

Free downloadable tool cfg2html can collect lots of system info for you and will create a html-file.

dipesh_2
Regular Advisor

Re: how to collect system info

run nickel.sh script will give you entire output of your systme.

dip