본문 바로가기
IT/System Engineering

LINUX 시스템 정보 확인 스크립트? 명령어?

by Jany 2012. 3. 20.
반응형

# Network Inbound / Outbound

cat /proc/net/dev | grep $ETH_TYPE | cut -f2 -d: | awk '{print $1, $9}'`

 

# CPU value

cat /proc/stat | grep -e '^cpu ' | grep -v grep | awk '{print $0}' > cpudata

 

# Load Average

cat /proc/loadavg  | awk '{print $1}'

 

# IO read / write

df . | grep '/' | awk '{print $1}' | cut -d'/' -f3-

iostat $home -d 1 1 | grep $home | awk '{print $3, $4}'

 

# Free / Swap memory

totalMemory=`cat /proc/meminfo | grep MemFree | awk '{print $2$3}'`

swapMemory=`cat /proc/meminfo | grep SwapFree | awk '{print $2$3}'`

 

# Linux Version

cat /proc/version

 

# Redhat Version

redhatVersion=`cat /etc/redhat-release`

echo $redhatVersion


#CentOS Version
cat /etc/issue
 

# Memory Total Size

cat /proc/meminfo | grep MemTotal | awk '{print $2$3}'

 

# CPU model

cat /proc/cpuinfo | grep 'model name' | head -n 1

 

# CPU Number

cat /proc/cpuinfo | grep processor | wc -l

 

# Disk Information

df=`df -h |  grep -v grep `

echo -n "$df"

# Hardware Device
dmidecode | grep Name

반응형

댓글