2016년 6월 9일 목요일

[Unix] OS별 시스템 정보보기




구분
AIX
Solaris
HP-UX
OS
OS 명
# uname -s
OS 버전
# oslevel
# uname -r
# uname -r
모델 명
# lsattr -E -l sys0 | awk '/modelname/ {print $2}'
# uname -i
# uname -m
CPU
CPU 수
# lsdev -Cc processor | wc -l
# psrinfo | wc -l
# ioscan -fknC processor | grep processor | wc -l
CPU 속도
# value=`lscfg -vp | grep "PS=" | head -1 | awk -F"PS=" '{print $2}' | awk -F"," '{print $1}'`
# value="0x$value"
# value=`printf "%dn" $value`
# expr $value / 1000000
# psrinfo -v `psrinfo | awk '{print $1}' | head -1` | awk '/operates/ {print $6}'
# echo itick_per_user/D | adb -k /stand/vmunix /dev/mem | tail -1 | awk '{print $2}'
Memory
메모리 수
# lsdev -C | grep -i memory | wc -l


메모리 용량
# lsattr -E -l mem0 -a size | awk '{print $2}'
# prtconf | awk '/Memory size/ {print $3}'
# value=`dmesg | grep Physical | grep Kbytes | awk '{print $2}'`
# expr $value / 1024
# expr $value / 1024
Disk
디스크 수
# lsdev -Cc disk | wc -l
# format <<-! > /tmp/format.dat
> 0
> q
> !
# cat /tmp/format.dat | grep cyl | wc -l
# ioscan -fknC disk | grep disk | grep -v "CD-ROM" | grep -v "DVD-ROM" | wc -l
디스크 용량
# lspv hdisk0 | grep "TOTAL PPs" | awk -F"(" '{print $2}' | awk '{print $1}'
# bps=`prtvtoc /dev/dsk/c0t0d0s0 | grep "bytes/sector" | awk '{print $2}'`
# sectors=`prtvtoc /dev/dsk/c0t0d0s0 | grep -v "*" | grep "^ *2" | awk '{print $5}'`
# bc -l << !
> scale=0
> $sectors * $bps / 1024 / 1024
> !
# hwpath=`ioscan -fknC disk | grep disk | grep -v "CD-ROM" | grep -v "DVD-ROM" | head -1`
# name=`ioscan -fkn -H $hwpath | grep "/rdsk/" | awk '{print $2}'`
# value=`diskinfo $name | awk '/size:/ {print $2}'`
# expr $value / 1024

댓글 없음:

댓글 쓰기