이럴수가 asdf 마구 치다가 우연히 찾은 명령어다.

아직 자세하게 뭔지는 모르기에 man page 가져다 붙여두고

좀 봐야겠다. 


SADF(1)                       Linux User's Manual                      SADF(1)


NAME

       sadf - Display data collected by sar in multiple formats.


SYNOPSIS

       sadf [ -d | -D | -H | -p | -x ] [ -t ] [ -V ] [ -P { cpu | ALL } ] [ -s

       [ hh:mm:ss ] ] [ -e [ hh:mm:ss ] ] [ -- sar_options...  ] [ interval  [

       count ] ] [ datafile ]


DESCRIPTION

       The sadf command is used for displaying the contents of data files cre-

       ated by the sar(1) command. But unlike sar, sadf can write its data  in

       many  different  formats.  The default format is one that can easily be

       handled by pattern processing commands like awk (see option -p).


       The sadf command extracts and writes to standard output  records  saved

       in  the datafile file. This file must have been created by a version of

       sar which is compatible with that of sadf.   If  datafile  is  omitted,

       sadf uses the standard system activity file, the /var/log/sa/sadd file,

       where the dd parameter indicates the current day.


       The interval and count parameters are used to tell sadf to select count

       records  at  interval  second  intervals. If the count parameter is not

       set, then all the records saved in the data file will be displayed.


       All the activity flags of sar may be entered on  the  command  line  to

       indicate  which  activities are to be reported. Before specifying them,

       put a pair of dashes (--) on the command line in order not  to  confuse

       the  flags  with  those of sadf.  Not specifying any flags selects only

       CPU activity.



실행 결과

------------------------------------------


$ sadf
TEST    604 1343229001  all %user   0.50
TEST    604 1343229001  all %nice   0.00
TEST    604 1343229001  all %system 1.75
TEST    604 1343229001  all %iowait 0.01
TEST    604 1343229001  all %steal  0.00
TEST    604 1343229001  all %idle   97.74
TEST    604 1343229601  all %user   0.46
TEST    604 1343229601  all %nice   0.04
TEST    604 1343229601  all %system 1.72
TEST    604 1343229601  all %iowait 0.00
TEST    604 1343229601  all %steal  0.00
TEST    604 1343229601  all %idle   97.77
TEST    603 1343230201  all %user   0.48
TEST    603 1343230201  all %nice   0.00
TEST    603 1343230201  all %system 1.74
TEST    603 1343230201  all %iowait 0.00
TEST    603 1343230201  all %steal  0.00
TEST    603 1343230201  all %idle   97.79
TEST    604 1343230801  all %user   0.47
TEST    604 1343230801  all %nice   0.00
TEST    604 1343230801  all %system 1.72
TEST    604 1343230801  all %iowait 0.00
TEST    604 1343230801  all %steal  0.00
TEST    604 1343230801  all %idle   97.80
TEST    605 1343231401  all %user   0.47
TEST    605 1343231401  all %nice   0.00
TEST    605 1343231401  all %system 1.73
TEST    605 1343231401  all %iowait 0.00
TEST    605 1343231401  all %steal  0.00
TEST    605 1343231401  all %idle   97.79
TEST    604 1343232001  all %user   0.47
TEST    604 1343232001  all %nice   0.00
TEST    604 1343232001  all %system 1.74
TEST    604 1343232001  all %iowait 0.01
TEST    604 1343232001  all %steal  0.00
TEST    604 1343232001  all %idle   97.78


------------------------------------------

반응형

Server측에서 poll 함수를 가지고 주기적으로 돌고 있고

Client측에서 포트번호를 자동적으로 증가시켜가면서 붙는데

도대체 이 포트번호의 범위가 어딘지 모르겠다.

 

그래서 찾아봤다.

 

sysctl이라고 시스템 커널과 관련하여 다양한

설정값을 확인할 수 있다. (루트권한)

 

 

# sysctl -a |grep port
sunrpc.max_resvport = 1023
sunrpc.min_resvport = 665
dev.parport.default.spintime = 500
dev.parport.default.timeslice = 200
net.ipv4.ip_local_port_range = 32768 61000
fs.nfs.nlm_tcpport = 0
fs.nfs.nlm_udpport = 0

 

따라서 요렇게 수행하면 범위가 나온다.

# sysctl -a |grep net.ipv4.ip_local_port_range
net.ipv4.ip_local_port_range = 32768 61000

 

생각보다 간단하게 찾아진다..

반응형

출처 : http://liverpooh.tistory.com/1

   

  • 디스크 사용량 확인하기

    #df -mh

    Filesystem            Size  Used Avail Use% Mounted on
    /dev/mapper/VolGroup00-LogVol00
                           73G  7.0G   62G  11% /
    /dev/hda1              99M   12M   82M  13% /boot
    none                  251M     0  251M   0% /dev/shm
  • CPU 정보 확인하기

    # more /proc/cpuinfo

    processor       : 0
    vendor_id       : GenuineIntel
    cpu family      : 15
    model           : 2
    model name      : Intel(R) Pentium(R) 4 CPU 3.20GHz
    stepping        : 9
    cpu MHz         : 3208.132
    cache size      : 512 KB
    physical id     : 0
    siblings        : 2
    fdiv_bug        : no
    hlt_bug         : no
    f00f_bug        : no
    coma_bug        : no
    fpu             : yes
    fpu_exception   : yes
    cpuid level     : 2
    wp              : yes
    flags           : fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pat
    pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe cid xtpr
    bogomips        : 6340.60
    ...
  • 디렉토리 크기 확인하기

    # du -sh ./foo
    80M     ./foo
반응형

OS별로 자주 쓰이는 CPU, Memory등의 정보확인 방법에 대한 비교이다.

일부 command는 Root 권한으로 수행되어야 한다.

   

1. CPU 정보

AIX            lsdev -Cc processor HP-UX       ioscan -fnC processor

SOLARIS    psrinfo -v

Tru64         psrinfo -v

LINUX        cat /proc/cpuinfo


2. Physical RAM

AIX            bootinfo -r

HP-UX       grep -i Physical /var/adm/syslog/syslog.log

SOLARIS    Prtconf

Tru64         uerf | grep memory

LINUX        free 


3. Kernel Bits

AIX            bootinfo -K

HP-UX       getconf KERNEL_BITS

SOLARIS    isainfo -kv

Tru64        64

LINUX       getconf WORD_BIT  


4. Service Switch

AIX           /etc/netsvc.conf

HP-UX      /etc/nsswitch.conf

SOLARIS   /etc/nsswitch.conf

Tru64       /etc/svc.conf

LINUX      /etc/nsswitch.conf  


5. NIC

AIX            ifconfig -a

HP-UX       lanscan -v

SOLARIS    ifconfig -a

Tru64         ifconfig -a

LINUX        ifconfig -a 


6. Administrator

AIX            smit

HP-UX       sam

SOLARIS    admintool

Tru64      

LINUX        linuxconf 
   

 

출처

http://javagosu.tistory.com/12

반응형

'Linux' 카테고리의 다른 글

Unix Domain Socket UDP  (304) 2011.08.19
[명령어]Message Queue 설정 및 확인  (319) 2011.08.11
RAID  (320) 2011.08.11
SNMP란 무엇인가요?  (308) 2011.08.11
grep  (638) 2011.08.11

+ Recent posts