- auth 설정

vi /etc/mail/sendmail.mc

 

DAEMON_OPTIONS(`Family=inet,  Name=MTA-v4, Port=smtp, Addr=0.0.0.0')dnl

DAEMON_OPTIONS(`Family=inet,  Name=MSP-v4, Port=submission, M=Ea, Addr=0.0.0.0')dnl

TRUST_AUTH_MECH(`EXTERNAL DIGEST-MD5 CRAM-MD5 LOGIN PLAIN')dnl
define(`confAUTH_MECHANISMS', `EXTERNAL GSSAPI DIGEST-MD5 CRAM-MD5 LOGIN PLAIN')dnl

 

m4 /etc/mail/sendmail.mc > /etc/mail/sendmail.cf

 

apt-get install sasl2-bin

 

saslauthd -a pam

 

vi /etc/default/saslauthd

START=yes

 

useradd 아이디

passwd 아이디

 

- relay 설정

vi /etc/mail/access

makemap -v hash /etc/mail/access.db < /etc/mail/access

service sendmail restart

 

relay 설정이 auth설정 보다 우선해 relay 설정되어있는 client는 auth 없이 접속 가능

'OS > LINUX' 카테고리의 다른 글

Ethernet Bandwidth Limit 걸기 (속도 제한/QOS)  (0) 2013.01.02
Traffic Control with Linux Command Line tool, "tc"  (0) 2013.01.02
우분투 서버 한글 설정  (0) 2012.07.10
apt & dpkg 사용법  (0) 2012.07.10
vmstat 과 sar 명령  (0) 2012.06.01
리눅스의 사실상 기본 패키지인 iproute안에는 tc(Traffic Control)이라는 명령어가 포함되어 있습니다.

이 명령어를 사용하여 네트워크 스위치의 도움 없이도 자체적으로 자신의 이더넷 속도를 제한 할 수 있습니다.

이는 보통 네트워크에서 말하는 QOS(Quality Of Service)와 비슷한 기능을 제공합니다.

하지만 저비용으로 고효율을 낼 수 있다는 점에서 매우 괜찮은 방법인듯 합니다.

1) 요구 사항
- iproute RPM 패키지가 설치되어있어야 함
- 리눅스 커널의 iproute 파트의 Traffic Control 옵션(Netlink포함)이 활성화 되어있어야 함.
- 리눅스 커널 2.4버젼 이후의 경우 기본적으로 대부분의 Traffic Control 옵션이 활성화 되어있음.

2) 시스템 명령어 추가
- shaping이라는 명령을 추가합니다.
$ vi /etc/init.d/shaping

- 다음의 소스코드를 입력합니다.
#!/bin/bash
# tc uses the following units when passed as a parameter.
# kbps: Kilobytes per second
# mbps: Megabytes per second
# kbit: Kilobits per second
# mbit: Megabits per second
# bps: Bytes per second
# Amounts of data can be specified in:
# kb or k: Kilobytes
# mb or m: Megabytes
# mbit: Megabits
# kbit: Kilobits
# To get the byte figure from bits, divide the number by 8 bit
#

# tc명령어의 위치를 입력합니다.
TC
=/sbin/tc

# 대역폭을 제한하기 위한 이더넷 인터페이스를 지정합니다.
IF
=eth0

# 다운로드 속도 제한
DNLD
=15mbit

# 업로드 속도 제한
UPLD
=15mbit

# 속도 제한을 적용할 호스트의 IP 주소
IP
=123.123.123.123

# Filter options for limiting the intended interface.
U32
="$TC filter add dev $IF protocol ip parent 1:0 prio 1 u32"

start
() {
# We'll use Hierarchical Token Bucket (HTB) to shape bandwidth.
# For detailed configuration options, please consult Linux man
# page.
$TC qdisc add dev $IF root handle
1: htb default 30
$TC
class add dev $IF parent 1: classid 1:1 htb rate $DNLD
$TC
class add dev $IF parent 1: classid 1:2 htb rate $UPLD
$U32 match ip dst $IP
/32 flowid 1:1
$U32 match ip src $IP
/32 flowid 1:2
# The first line creates the root qdisc, and the next two lines
# create two child qdisc that are to be used to shape download
# and upload bandwidth.
#
# The 4th and 5th line creates the filter to match the interface.
# The 'dst' IP address is used to limit download speed, and the
# 'src' IP address is used to limit upload speed.
}

stop
() {
# Stop the bandwidth shaping.
$TC qdisc
del dev $IF root
}

restart
() {
# Self-explanatory.
stop
sleep
1
start
}

show
() {
# Display status of traffic control status.
$TC
-s qdisc ls dev $IF
}

case "$1" in
start
)
echo
-n "Starting bandwidth shaping: "
start
echo
"done"
;;
stop
)
echo
-n "Stopping bandwidth shaping: "
stop
echo
"done"
;;
restart
)
echo
-n "Restarting bandwidth shaping: "
restart
echo
"done"
;;
show
)
echo
"Bandwidth shaping status for $IF:"
show
echo
""
;;
*)
pwd
=$(pwd)
echo
"Usage: tc.bash {start|stop|restart|show}"
;;
esac

exit 0

- 실행 권한을 주고 실행해 봅니다.
$ chmod 755 /etc/init.d/shaping
$
/etc/init.d/shaping start

3) 결과 확인
사용자 삽입 이미지

- 빨간선을 기준으로 왼쪽이 기존의 상황이고 오른쪽이 트래픽 제한을 한 이후 입니다.
- 기존의 경우 엄청나게 들쭉 날쭉한 것을 알 수 있습니다.
- 오른쪽의 경우 강제로 제한이 걸리면서 둥글게 트래픽이 뭉개지는 것을 볼 수 있습니다.
- 제한을 건 속도에 정확하게 제한이 걸리는것으로 보이지는 않습니다.
- 테스트를 거치면서 IDC상황에 맞게 설정하시면 될것 같습니다.

 

출처 : http://theeye.pe.kr

'OS > LINUX' 카테고리의 다른 글

sendmail auth / relay 설정  (0) 2013.08.23
Traffic Control with Linux Command Line tool, "tc"  (0) 2013.01.02
우분투 서버 한글 설정  (0) 2012.07.10
apt & dpkg 사용법  (0) 2012.07.10
vmstat 과 sar 명령  (0) 2012.06.01

Traffic Control with Linux Command Line tool, "tc"


By Scott Seong

Denial of service attacks are major nuisance for web hosts, and as a web host you'll have to take every measure to protect your resources from DoS attacks. Our APF, BFD, DDoS and RootKit article describes Linux utilities available to protect from DDoS attack, and also explains installation procedures. This article supplements above article by providing means to control traffic (bandwidth shaping) with Linux "tc" command so that no single machine can waste the entire network bandwidth.

What is Traffic Shaping?

Traffic Shaping (a.k.a Bandwidth Shaping or Packet Shaping) is an attempt to control network traffic by prioritizing network resources and guarantee certain bandwidth based on predefined policy rules. Traffic shaping uses concepts of traffic classification, policy rules, queue disciplines and quality of service (QoS).

Why implement Traffic Shaping?

Network bandwidth is an expensive resource that is being shared among many parties of an organization, and some applications require guaranteed bandwidth and priority. Traffic shaping lets you (1) control network services, (2) limit bandwidths and (3) guarantee Quality Of Service (QoS). Intelligently managed traffic shaping improves network latency, service availablity and bandwidth utilization.

What is Queue Discipline?

A queue discipline (qdisc) is rules that determine the order in which arrivals are serviced. Immagine standing in a restraurant to be seated, and waiting in an emergency room to be serviced by a physician. They both have people waiting in a queue that needs to be serviced, but have different strategies for clearing them.

Restaurants typically use first-in-first-out (FIFO) strategy with an exception when tables with number of seats do not exist for large number of customers. Customers are generally serviced in the order that they've arrived in the queue, or when the table with number of seats available. On the other hand, emergency queue requires different strategy. Regardless of order in which patients arrive, someone in a critical condition requires most attention and then someone with urgent condition. This is just examples of how queues are handled in the real life scenarios, but traffic shaping requires a lot more disciplines (rules) for clearing traffic queues.

Software Requirements

  • Linux RPM package called 'iproute' is required.
  • Traffic control options (including netlink support) have to enabled on the kernel build in order for certain parts of 'iproute' to function.
  • Linux kernels version 2.4 (and above) have most traffic control options turned on as a default. To explore your configuration, try running the following commands. If you can see the command responses below, you have a basic configuration setup.
# ip link list
1: lo:  mtu 16436 qdisc noqueue 
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: eth0:  mtu 1500 qdisc pfifo_fast qlen 1000
    link/ether 00:06:5b:8d:13:a0 brd ff:ff:ff:ff:ff:ff
# ip address show
1: lo:  mtu 16436 qdisc noqueue 
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 brd 127.255.255.255 scope host lo
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: eth0:  mtu 1500 qdisc pfifo_fast qlen 1000
    link/ether 00:06:5b:8d:13:a0 brd ff:ff:ff:ff:ff:ff
    inet 216.3.128.12/24 brd 216.3.128.255 scope global eth0
    inet6 fe80::206:5bff:fe8d:13a0/64 scope link 
       valid_lft forever preferred_lft forever
# ip route show
216.3.128.0/24 dev eth0  proto kernel  scope link  src 
216.3.128.12 default via 216.3.128.1 dev eth0 

    Bandwidth Management (Traffic Control)

    Linux kernel 2.2 (and above) provides bandwidth management functionality compatible to high-end (dedicated) hardware solution. Linux does offer bandwidth management capability with tc command-line utility, with iptables and iproute2 packages.

    We've written a small bash shell script to automate bandwidth shaping function on a linux machine. The downloadable source code is used to limit bandwidth of an interface, both inbound and outbound to 1mbit each. You may modify this script how ever you desire to customize your bandwidth shaping requirements.

    #!/bin/bash
    #
    #  tc uses the following units when passed as a parameter.
    #  kbps: Kilobytes per second 
    #  mbps: Megabytes per second
    #  kbit: Kilobits per second
    #  mbit: Megabits per second
    #  bps: Bytes per second 
    #       Amounts of data can be specified in:
    #       kb or k: Kilobytes
    #       mb or m: Megabytes
    #       mbit: Megabits
    #       kbit: Kilobits
    #  To get the byte figure from bits, divide the number by 8 bit
    #
    
    #
    # Name of the traffic control command.
    TC=/sbin/tc
    
    # The network interface we're planning on limiting bandwidth.
    IF=eth0             # Interface
    
    # Download limit (in mega bits)
    DNLD=1mbit          # DOWNLOAD Limit
    
    # Upload limit (in mega bits)
    UPLD=1mbit          # UPLOAD Limit
    
    # IP address of the machine we are controlling
    IP=216.3.128.12     # Host IP
    
    # Filter options for limiting the intended interface.
    U32="$TC filter add dev $IF protocol ip parent 1:0 prio 1 u32"
    
    start() {
    
    # We'll use Hierarchical Token Bucket (HTB) to shape bandwidth.
    # For detailed configuration options, please consult Linux man
    # page.
    
        $TC qdisc add dev $IF root handle 1: htb default 30
        $TC class add dev $IF parent 1: classid 1:1 htb rate $DNLD
        $TC class add dev $IF parent 1: classid 1:2 htb rate $UPLD
        $U32 match ip dst $IP/32 flowid 1:1
        $U32 match ip src $IP/32 flowid 1:2
    
    # The first line creates the root qdisc, and the next two lines
    # create two child qdisc that are to be used to shape download 
    # and upload bandwidth.
    #
    # The 4th and 5th line creates the filter to match the interface.
    # The 'dst' IP address is used to limit download speed, and the 
    # 'src' IP address is used to limit upload speed.
    
    }
    
    stop() {
    
    # Stop the bandwidth shaping.
        $TC qdisc del dev $IF root
    
    }
    
    restart() {
    
    # Self-explanatory.
        stop
        sleep 1
        start
    
    }
    
    show() {
    
    # Display status of traffic control status.
        $TC -s qdisc ls dev $IF
    
    }
    
    case "$1" in
    
      start)
    
        echo -n "Starting bandwidth shaping: "
        start
        echo "done"
        ;;
    
      stop)
    
        echo -n "Stopping bandwidth shaping: "
        stop
        echo "done"
        ;;
    
      restart)
    
        echo -n "Restarting bandwidth shaping: "
        restart
        echo "done"
        ;;
    
      show)
    
        echo "Bandwidth shaping status for $IF:"
        show
        echo ""
        ;;
    
      *)
    
        pwd=$(pwd)
        echo "Usage: tc.bash {start|stop|restart|show}"
        ;;
    
    esac
    
    exit 0
    

    The above script has been tested on Centos 4.x system and (Linux AS 2.x) versions. There is also another utility called tcng, which supposely simplify the arcane tc configuration. If you have comments or suggestions on the above script, please contact feedback@topwebhosts.org.

    For detailed explanation of Linux Advanced Routing & Traffic Control HOWTO, please visit http://www.lartc.org website. The above HOWTO also describes method for preventing SYN Floods and ICMP DDoS.

     

    출처 : http://www.topwebhosts.org/tools/traffic-control.php

     

    'OS > LINUX' 카테고리의 다른 글

    sendmail auth / relay 설정  (0) 2013.08.23
    Ethernet Bandwidth Limit 걸기 (속도 제한/QOS)  (0) 2013.01.02
    우분투 서버 한글 설정  (0) 2012.07.10
    apt & dpkg 사용법  (0) 2012.07.10
    vmstat 과 sar 명령  (0) 2012.06.01

    1. UTF-8 서버 설정
    출처 : http://www.cyworld.com/gon0121/2698385

    1) /etc/environment
    LANG="ko_KR.UTF-8"
    LANGUAGE="ko_KR:ko:en_GB:en"
    PATH 앞에 추가

    2) /etc/default/locale

    LANGUAGE="ko_KR.UTF-8"
    LANG_ALL="ko_KR.UTF-8"

    LANG="ko_KR.UTF-8" 뒤에 추가

    2. euc_kr Locale 추가
    출처 : http://leoric99.tistory.com/entry/Ubuntueuckr-%EB%A1%9C%EC%BC%80%EC%9D%BC-%EC%B6%94%EA%B0%80

    1) sudo locale-gen ko_KR.EUC-KR

    2) /etc/environment에 바로 추가하는 방법


    PATH="/usr/local/sbin;/usr/local/bin;/usr/bin;/....."
    LANG="ko_KR.UTF-8"
    LANGUAGE="ko_KR:ko:en_GB:en"

    이런것에 아래 한줄 추가

    PATH="/usr/local/sbin;/usr/local/bin;/usr/bin;/....."
    LANG="ko_KR.UTF-8"
    LANG="ko_KR.EUC-KR"
    LANGUAGE="ko_KR:ko:en_GB:en"

    3. Locale 확인하기


    root@buy-0431:~# locale
    locale: Cannot set LC_CTYPE to default locale: No such file or directory
    locale: Cannot set LC_MESSAGES to default locale: No such file or directory
    locale: Cannot set LC_ALL to default locale: No such file or directory
    LANG=ko_KR.eucKR
    LANGUAGE=ko_KR.UTF-8
    LC_CTYPE="ko_KR.eucKR"
    LC_NUMERIC="ko_KR.eucKR"
    LC_TIME="ko_KR.eucKR"
    LC_COLLATE="ko_KR.eucKR"
    LC_MONETARY="ko_KR.eucKR"
    LC_MESSAGES="ko_KR.eucKR"
    LC_PAPER="ko_KR.eucKR"
    LC_NAME="ko_KR.eucKR"
    LC_ADDRESS="ko_KR.eucKR"
    LC_TELEPHONE="ko_KR.eucKR"
    LC_MEASUREMENT="ko_KR.eucKR"
    LC_IDENTIFICATION="ko_KR.eucKR"
    LC_ALL=
    root@buy-0431:~#

     

    출처 : http://blog.daum.net/linuxvoyager/

    'OS > LINUX' 카테고리의 다른 글

    Ethernet Bandwidth Limit 걸기 (속도 제한/QOS)  (0) 2013.01.02
    Traffic Control with Linux Command Line tool, "tc"  (0) 2013.01.02
    apt & dpkg 사용법  (0) 2012.07.10
    vmstat 과 sar 명령  (0) 2012.06.01
    iostat  (0) 2012.06.01

    << apt >>

    패키지 설치 : apt-get install <package name>
    패키지 제거 : apt-get --purge remove <package name
    패키지 검색 : apt-cache search <package name>
    패키지 정보보기 : apt-cache show <package name>
    소스리스트 업데이트 : apt-get update
    설치된 패키지 업데이트 : apt-get upgrade

    << dpkg >>

    deb 파일 설치 : dpkg -i <file name.deb>
    패키지 제거 : dpkg -P <package name>
    설치된 패키지 리스트 : dpkg -l
    설치된 패키지에 포함된 파일 보기 : dpkg -L <package name>
    deb파일 포함된 파일들 보기 : dpkg -c <file name.deb>
    deb파일의 정보보기 : dpkg -I <file name.deb>
    파일의 패키지명 알아내기 : dpkg -S <file name>

    'OS > LINUX' 카테고리의 다른 글

    Traffic Control with Linux Command Line tool, "tc"  (0) 2013.01.02
    우분투 서버 한글 설정  (0) 2012.07.10
    vmstat 과 sar 명령  (0) 2012.06.01
    iostat  (0) 2012.06.01
    리눅스 사양 확인  (0) 2012.05.29

    리눅스의 메모리, CPU, IO 등을 확인할 수 있는 유용한 명령어로 vmstat과 sar가 있다.

    1. vmstat 5 와 같이 하면 5초 간격으로 모니터링 정보를 갱신하며 보여준다. 해당 항목들의 의미와 점검점은 다음과 같다.

    구분
    설명
    proc r CPU에서 대기 중인 프로세스의 수를 의미한다. 이 값이 증가하거나 r 개수/cpu 개수의 값이 항상 2 이상 나온다면 CPU의 성능을 높여주어야 한다.
    b 동작하는 블럭 프로세스의 수
    이 값이 높다면 블럭 디바이스의 속도를 높여야 한다.
    w swap out되는 프로세서의 수이다.w에 값이 증가하면 메모리가 매우 부족하다는 의미이므로 메모리를 늘려야 한다.
    memory(KB) swapd 현대 메모리가 부족해 swap을 사용하고 있는 양을 의미한다.평소에 이 값이 높다고 해도 free 메모리의 여유가 있다면 메모리가 부족한 것이 아니다. 한번 swap으로 떨어진 프로레스는 메모리의 여유가 생기더라도 CPU에서 다시 호풀하지 않는 한 메모리로 넘어 오지 않는다.
    free 현재 사용하지 않고 남아 있는 메모리
    buffer 버퍼로 사용되고 있는 메모리 양(퍼포먼스에 관련)
    cache 현재 캐시로 사용되고 있는 메모리 양(퍼포먼스에 관련)
    swap(KB/s) si 디스크에서 메모리로 swap in 되는 양을 의미하며, swap 공간에 있는 데이터를 실제 메모리로호출한다.
    so 메모리에서 디스크로 swap out 되는 양을 의미하며, 이는 곧 메모리가 부족해 실제 메모리에 있는 데이터를 swap 공간으로 보내는 것이다.
    io(blocks/s) bi/bo bi는 초당 블럭 디바이스로 보내는 블럭 수이며 bo는 블럭 디바이스로부터 받은 블럭 수이다. 이 두 값이 높다는 것은 I/O 즉 하드디스크에 읽고 쓴느 값이 많다는 것이다.
    system in 초당 인터럽트되는 양이다. 여기에는 time clock과 이더넷의 패킷도 포함되는데 즉 인터럽트의 수가 많다면 네트워크 쪽을 점검해볼필요가 있다.
    cs 초당 context switch되는 양이다. CPU에사 실행하는 명령들이 자신의 우선순위보다 높은 명령이 오거나 혹은 자신에게 할당된 CPU 점유 시간이 만료되면 우선순위에서 밀리게 되고 이때context switch가 발생하게 된다.
    cpu us 유저 프로세스가 CPU를 사용하는 시간
    sy 시스템 프로세스가 CPU를 사용하는 시간
    id CPU가 아무 일도 하지 않고 여유 있는 시간

    출처 : Tong - 낯선남자님의 Linux통

    스 왑아웃이 지속적으로 발생한다면 메모리가 부족한 것이다. w필드의 값이 증가하면 메모리가 부족하다는 의미이므로 메모리를 늘려야한다. so필드(swap out)는 0에 가까워야 한다. 평소에 swpd필드의 값이 높다고 해도 free 메모리에 여유가 있다면 메모리가 부족한 것이 아니다.

    sy필드의 값이 지나치게 높으면 디스크 I/O에 문제가 있을 가능성이 크다.
    그 리고 시스템 전체의 부하가 높은데 id필드의 값이 일반적으로 10%를 넘는다면 I/O나 메모리에 문제가 있을 가능성이 있다.I/O에 문제점이 있다는 것을 발견하면 iostat 등의 명령어를 추가로 사용하여 세부사항을 분석할 수 있다.

    id필 드의 값이 항상 0이라면 CPU를 100% 사용하고 있다는 것을 의미한다. 그러나 항상 100%로 사용하고 있다면 어떤 작업이 계속 축적되고 있으며 CPU가 과부하를 가진다는 것을 의미한다. 이 때는 top, ps, sar등의 명령어를 사용하여 CPU를 계속 사용하고 있는 프로세스를 찾아 적절하게 대응해야 한다.

    2. sar 명령 : 시스템에서 10분간격으로 성능 모니터링 한 내용을 /var/log/sa 에 저장해 둔 내용을 보여준다.

    그냥 sar를 치면 오늘 현재 내용을 보여주고, sar -f /var/log/sa/sa15 와 같이 하여 특정일의 내용을 볼 수 있다.
    sar명령의 여러 옵션(-b, -B, -d, -n 등)을 통해 세부적인 내용 확인도 가능하다.

    DB서버나 서버단 프로세스가 많은 서버에서 성능개선을 위해 참고하면 좋은 명령어

    'OS > LINUX' 카테고리의 다른 글

    우분투 서버 한글 설정  (0) 2012.07.10
    apt & dpkg 사용법  (0) 2012.07.10
    iostat  (0) 2012.06.01
    리눅스 사양 확인  (0) 2012.05.29
    리눅스 NFS 설정하기  (0) 2012.05.18

    iostat

    disk에 받는 로드 측정, disk 입출력, 활용도, Queue크기, transaction율, 서비스 시간등

    -> disk에 i/o 시 속도 측정가능한데 이 속도를 이용하여 데이터이관시 걸리는시간 측정가능

    사용법

    #iostat -xtc 3 200 : 3초간격, 200번 찍기 -> 가장 기본적이며 많이 사용됨, 속도 측정

     

     

    ssd2 device에서 현재 쓰기가 이루어지고 있다. 속도는 1초당 244410kbyte, 즉 24mbyte/s.

    만약 write 되고 있는 file이 10g라면 걸리는시간은?

    10000 / 24 = 416.66 즉 417초정도 -> 6분 57초

    옵션

    .-x : 추가된 모든 disk들의 상태 표시

    .-c : user mode, system mode, i/o를 위한 waiting, idle등에 사용된 시간의 백분율

    .-t : 초당 터미널에서 사용된 read, write의 character수

    .-D : 초당 disk의 read, write와 utilization에 대한 백분율

    #iostat -D 3

    -> util 값이 65% 이상이면 문제 발생

    [출처] iostat|작성자 modric

    'OS > LINUX' 카테고리의 다른 글

    apt & dpkg 사용법  (0) 2012.07.10
    vmstat 과 sar 명령  (0) 2012.06.01
    리눅스 사양 확인  (0) 2012.05.29
    리눅스 NFS 설정하기  (0) 2012.05.18
    locate 명령어 사용법  (0) 2011.06.29

    리눅스 OS 버전

    cat /proc/sys/kernel/osrelease

    cat /etc/redhat-release

    cat /proc/version

    uname -옵션

    -a : 모든정보

    -m : 하드웨어종류

    -n : 호스트이름

    -p : 소유자 이름

    -r : 현재 버전

    cpu정보

    cat /proc/cpuinfo

    dmesg | grep CPU
    CPU: Intel(R) Xeon(TM) CPU 3.00GHz (2992.51-MHz K8-class CPU)
    Hyperthreading: 2 logical CPUs
    cpu0: <ACPI CPU> on acpi0
    acpi_throttle0: <ACPI CPU Throttling> on cpu0

    메모리 정보

    cat /proc/meminfo

    dmesg | grep memory

    운영체제 확인

    cat /etc/issue.net

    HDD 용량 확인

    df -h

    HDD 확인

    dmesg | grep SCSI

    하드 디스크 정보(scsi)
    cat /proc/scsi/scsi
    ide일 경우(모델보기)
    cat /proc/ide/hda/model (첫번째 하드 hda인경우)
    /proc/ide/ 아래에는 하드 갯수 확인
    /proc/ide/hda/ 아래에는 하드 정보
    raid를 사용시

    cat /proc/mdstat
    네트워크 정보
    cat /proc/net/netlink

    출처 :

    http://sjunious.egloos.com/980953

    http://knight76.tistory.com/1134

    http://the7dayz.tistory.com/2

    'OS > LINUX' 카테고리의 다른 글

    vmstat 과 sar 명령  (0) 2012.06.01
    iostat  (0) 2012.06.01
    리눅스 NFS 설정하기  (0) 2012.05.18
    locate 명령어 사용법  (0) 2011.06.29
    부팅시 자동실행 서비스 관리 ( ntsysv, chkconfig )  (0) 2011.06.21

    + Recent posts