|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
How to read my hardware?
Hi all.
i would like to ask if there is a command in HP-UX 11.00 system that gives me information about the memory, the number and the speed of the processors and finally the number of the disks and the disk space. Thanx |
|
#2
|
|||
|
|||
|
swapinfo [options] gives memory information and/or disks
bdf will show you disks |
|
#3
|
||||
|
||||
|
There are ways and means of doing this: the memory and processor speeds need an adb command to find. To get number of disks use ioscan. To find how much disk space I would suggest diskinfo as you may not have all disks attached to a volume group.
|
|
#4
|
||||
|
||||
|
The following should be good for HP-UX from 10.20 to 11.23 on PA-RISC:
#!/usr/bin/ksh HPUXReleaseelease=`uname -r` case $HPUXRelease in "B.10.20") KERNELSYMBOL=physmem NUMERICRELEASE=1020 ;; "B.11.00") KERNELSYMBOL=phys_mem_pages NUMERICRELEASE=1100 ;; "B.11.11") KERNELSYMBOL=phys_mem_pages NUMERICRELEASE=1111 ;; "B.11.23") NUMERICRELEASE=1123 ;; *) echo "Unknown version of OS - assuming 11.00" KERNELSYMBOL=phys_mem_pages NUMERICRELEASE=1100 ;; esac if [ $NUMERICRELEASE -lt 1100 ] then OS_BITS=32 else OS_BITS=`getconf KERNEL_BITS` fi echo "You are running HP-UX ${HPUXRelease} in $(OS_BITS} mode" if [ $NUMERICRELEASE -ge 1123 ] then CPU_FOUND=$(echo 'processor_count/D' | adb $(/usr/sbin/kcpath -x) /dev/kmem | tail -1 | awk -F: '{gsub("[\t]+","", $2); print $2}') else CPU_FOUND=$(echo 'processor_count/D' | /usr/bin/adb /stand/vmunix /dev/kmem | grep 'processor_count' |tail -n 1 | awk '{print $2}') fi echo "You have ${CPU_FOUND} \c" CPU_VERSION=$(/usr/bin/getconf CPU_VERSION) case $CPU_VERSION in 523) echo "PA-RISC 1.0\c" ;; 528) echo "PA-RISC 1.1\c" ;; 529) echo "PA-RISC 1.2\c" ;; 532) echo "PA-RISC 2.0\c" ;; *) if [ $CPU_VERSION -ge 523 -a $CPU_VERSION -le 640 ] then echo "PA-RISC version not known\c" else echo "$CPU_VERSION unknown\c" fi ;; esac echo " running at $(echo 'itick_per_tick/D' | /usr/bin/adb /stand/vmunix /dev/kmem |grep itick_per_tick | tail -1 | awk '{print $2 / 10000}') MHz" if [ $NUMERICRELEASE -lt 1123 ] then REAL_MEMORY=$(echo "$KERNELSYMBOL/D" | /usr/bin/adb /stand/vmunix /dev/kmem | grep "$KERNELSYMBOL" | tail -n 1 | awk '{print $2}') else HEXVAL=$(echo "phys_mem_pages/A" | /usr/bin/adb $(/usr/sbin/kcpath -x) /dev/kmem | tail +2| awk '{print $2}') REAL_MEMORY=$(echo ${HEXVAL}=D| /usr/bin/adb) fi MEMORY=$(expr ${REAL_MEMORY} / 256) echo "You have ${MEMORY}MB memory" exit |
|
#5
|
||||
|
||||
|
istr the 'monitor' command in HP-UX is a nice neat alternative to 'top' which will tell you a fair bit about your system status.
christo
__________________
. Spiration channels: Free scripts, programming tutorials and articles Dotcut alerts: Online Press cuttings / news alerts Clearprop: UK microlight school, wiltshire Uk dating: UK safe dating with Topdates About Christo . . |
![]() |
| Viewing: Dev Shed Forums > Operating Systems > UNIX Help > How to read my hardware? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|