Posted on 2010/07/22 15:00
Filed Under Utilty/Linux

Site Link : http://www.atoptool.nl/index.php

Description

The program atop is an interactive monitor to view the load on a Linux system. It shows the occupation of the most critical hardware resources (from a performance point of view) on system level, i.e. cpu, memory, disk and network.
It also shows which processes are responsible for the indicated load with respect to cpu- and memory load on process level; disk- and network load is only shown per process if a kernel patch has been installed.

Every interval (default: 10 seconds) information is shown about the resource occupation on system level (cpu, memory, disks and network layers), followed by a list of processes which have been active during the last interval (note that all processes that were unchanged during the last interval are not shown, unless the key 'a' has been pressed). If the list of active processes does not entirely fit on the screen, only the top of the list is shown (sorted in order of activity).
The intervals are repeated till the number of samples (specified as command argument) is reached, or till the key 'q' is pressed in interactive mode.

When atop is started, it checks whether the standard output channel is connected to a screen, or to a file/pipe. In the first case it produces screen control codes (via the curses library) and behaves interactively; in the second case it produces flat ASCII-output.

In interactive mode, the output of atop can be controlled by pressing particular keys. However it is also possible to specify such key as flag on the command line. In the latter case atop will switch to the indicated mode on beforehand; this mode can be modified again interactively. Specifying such key as flag is especially useful when running atop with output to a pipe or file (non-interactively). The flags used are the same as the keys which can be pressed in interactive mode (see section INTERACTIVE COMMANDS).
Additional flags are available to support storage of atop-data in raw format (see section RAW DATA STORAGE).


사용자 삽입 이미지

크리에이티브 커먼즈 라이센스
Creative Commons License
이올린에 북마크하기(0) 이올린에 추천하기(0)
2010/07/22 15:00 2010/07/22 15:00


Posted on 2010/06/15 15:49
Filed Under Utilty/Linux

다운로드  : http://pagesperso-orange.fr/sebastien.godard/download.html

리눅스 관련 일을 하다보면 간혹 PID 에 관련하여 cpu, memory, disk IO 에 대한 사용률을 확인해야 할 경우가 있다.
pidstat 은(는) sysstat 에 포함되어져 있으나 RHEL의 sysstat 같은경우 pidstat 를 포함하고 있지 않다.
그러므로 Source 나 SRPM 을 가져다 빌드 해서 써야하는 어려움이 있다.

관련 내용 :
NAME
       pidstat - Report statistics for Linux tasks.

SYNOPSIS
       pidstat  [ -C comm ] [ -d ] [ -h ] [ -I ] [ -l ] [ -p { pid [,...] | SELF | ALL } ] [ -r ] [ -t ] [ -T { TASK | CHILD | ALL } ] [ -u ]
       [ -V ] [ -w ] [ interval [ count ] ]

DESCRIPTION
       The pidstat command is used for monitoring individual tasks currently being managed by the Linux kernel.  It writes to standard output
       activities  for  every  task selected with option -p or for every task managed by the Linux kernel if option -p ALL has been used. Not
       selecting any tasks is equivalent to specifying -p ALL but only active tasks (tasks with non-zero statistics values)  will  appear  in
       the report.

       The pidstat command can also be used for monitoring the child processes of selected tasks.  Read about option -T below.

       The  interval parameter specifies the amount of time in seconds between each report.  A value of 0 (or no parameters at all) indicates
       that tasks statistics are to be reported for the time since system startup (boot).  The count parameter can be specified  in  conjunc-
       tion  with  the  interval  parameter  if this one is not set to zero. The value of count determines the number of reports generated at
       interval seconds apart. If the interval parameter is specified without the count parameter, the pidstat command generates reports con-
       tinuously.

       You can select information about specific task activities using flags.  Not specifying any flags selects only CPU activity.

ex)
추가적으로 옵션은 man 페이지를 참고 하길 바라며, 여기서는 cpu, memory, disk IO 를 확인해 보겠다.

- cpu
# ./pidstat -l -p 7330 2
Linux 2.6.18-194.el5 (backup)   06/15/2010      _x86_64_        (2 CPU)

03:43:34 PM       PID    %usr %system  %guest    %CPU   CPU  Command
03:43:36 PM      7330    0.00    0.00    0.00    0.00     0  sshd: root@pts/0
03:43:38 PM      7330    0.00    0.00    0.00    0.00     0  sshd: root@pts/0
03:43:40 PM      7330    0.00    0.00    0.00    0.00     0  sshd: root@pts/0

- memory
# ../bin/pidstat -r -p 7330 2
Linux 2.6.18-194.el5 (backup)   06/15/2010      _x86_64_        (2 CPU)

03:45:56 PM       PID  minflt/s  majflt/s     VSZ    RSS   %MEM  Command
03:45:58 PM      7330      0.00      0.00   90108   3368   0.16  sshd
03:46:00 PM      7330      0.00      0.00   90108   3368   0.16  sshd
03:46:02 PM      7330      0.00      0.00   90108   3368   0.16  sshd

- disk IO
# ./pidstat -d -p 7330 2
Linux 2.6.18-194.el5 (backup)   06/15/2010      _x86_64_        (2 CPU)

03:44:26 PM       PID   kB_rd/s   kB_wr/s kB_ccwr/s  Command
03:44:28 PM      7330      0.00      0.00      0.00  sshd
03:44:30 PM      7330      0.00      0.00      0.00  sshd
03:44:32 PM      7330      0.00      0.00      0.00  sshd


크리에이티브 커먼즈 라이센스
Creative Commons License
이올린에 북마크하기
2010/06/15 15:49 2010/06/15 15:49


Posted on 2010/03/09 17:59
Filed Under Utilty/Linux

출처 : dstat man page

NAME
       dstat - versatile tool for generating system resource statistics

SYNOPSIS
       dstat [-afv] [options..] [delay [count]]

DESCRIPTION
       Dstat is a versatile replacement for vmstat, iostat and ifstat. Dstat overcomes some of the limitations and adds some extra features.

       Dstat allows you to view all of your system resources instantly, you can eg. compare disk usage in combination with interrupts from
       your IDE controller, or compare the network bandwidth numbers directly with the disk throughput (in the same interval).

       Dstat also cleverly gives you the most detailed information in columns and clearly indicates in what magnitude and unit the output is
       displayed. Less confusion, less mistakes, more efficient.

       Dstat is unique in letting you aggregate block device throughput for a certain diskset or network bandwidth for a group of interfaces,
       ie. you can see the throughput for all the block devices that make up a single filesystem or storage system.

       Dstat allows its data to be directly written to a CSV file to be imported and used by OpenOffice, Gnumeric or Excel to create graphs.

       Note
       Users of Sleuthkit might find Sleuthkit?셲 dstat being renamed to datastat to avoid a name conflict. See Debian bug #283709 for more
       information.

기타 옵션은 manpage 참고
ex)

# dstat
----total-cpu-usage---- -dsk/total- -net/total- ---paging-- ---system--
usr sys idl wai hiq siq| read  writ| recv  send|  in   out | int   csw
  0   1  99   0   0   0|  33k   66k|   0     0 |   0     0 |1015   305
  7   1  92   0   0   0|   0  1240k|5160B 3198B|   0     0 |1267   985
  0   0 100   0   0   0|   0     0 |3720B  314B|   0     0 |1202   782
  0   0  99   0   0   0|   0   392k|1560B 2661B|   0     0 |1176   893
  0   0 100   0   0   0|   0   224k| 787B  762B|   0     0 |1172   875
  0   0 100   0   0   0|   0   224k| 750B  756B|   0     0 |1162   851
  0   0 100   0   0   0|   0   208k|1230B 2384B|   0     0 |1178   878
  0   0 100   0   0   0|   0   752k| 618B  670B|   0     0 |1172   840
  0   0  99   0   0   0|   0   264k|1422B 2470B|   0     0 |1170   885

시스템 사용률을 실시간으로 확인하기 편하다.

크리에이티브 커먼즈 라이센스
Creative Commons License
이올린에 북마크하기
2010/03/09 17:59 2010/03/09 17:59


About

by 삐꾸강아쥐

Counter

· Total
: 138036
· Today
: 12
· Yesterday
: 155
블로그코리아에 블UP하기