##CPU 개수 파악하기 ##
리눅스
cat /proc/cpuinfo|grep processor|wc -l
솔라리스
psrinfo -v|grep "Status of processor"|wc -l
IBM-AIX
lsdev -C|grep Process|wc -l
HP/UX
ioscan -C processor | grep processor | wc -l
하지만 여기서 알아두어야 할사항은 이건 OS에서 인식하는 개수이다.
일단 커널이 무엇인지 파악해야한다 smp커널이면 하이퍼 쓰레드를 지원하기때문에 2배로 나온다 또한 듀얼코어이면 또한 2배로 나온다.
따라서 하이퍼 쓰레드와 듀얼코어인지 파악해야한다
##memory ## 사이즈
linux
#free -m, cat /proc/meminfo
AIX
# lsattr -E -l mem0 -a size | awk '{print $2}'
Solaris
# prtconf | awk '/Memory size/ {print $3}'
HP-UX
# value=`dmesg | grep Physical | grep Kbytes | awk '{print $2}'`
# expr $value / 1024
## 하드디스크 개수 아는법 ##
Linux
#스카시인경우 cat /proc/scsi/scsi
AIX
# lsdev -Cc disk | wc -l
Solaris
# format <<-! > /tmp/format.dat
> 0
> q
> !
# cat /tmp/format.dat | grep cyl | wc -l
HP-UX
# ioscan -fknC disk | grep disk | grep -v "CD-ROM" | grep -v "DVD-ROM" | wc -l
## 디스크 용량 ##
linux
#fdisk -l
AIX
# lspv hdisk0 | grep "TOTAL PPs" | awk -F"(" '{print $2}' | awk '{print $1}'
Solaris
# 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
> !
HP-UX [출처] OS별 CPU MEMORY 하드 개수파악|작성자 박비서
# 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



