질문&답변
클라우드/리눅스에 관한 질문과 답변을 주고 받는 곳입니다.
리눅스 분류

top명령어중 메모리 부분

작성자 정보

  • 임근식 작성
  • 작성일

컨텐츠 정보

본문

 

 

==> top 명령의 메모리 정보는 /proc/meminfo 로부터 가져오 보여주는 것이므로,
Kernel Source 의 ./Documentation/filesystems/proc.txt 파일을 vi로 열어서 355라인으로
이동하시면 메모리에 대한 상세한 정보를 얻어실수 있습니다.  

예) Kernel 2.6.11
-----------------------------------------------------------------------------

353 ..............................................................................
354
355 meminfo:
356
357 Provides information about distribution and utilization of memory.  This
358 varies by architecture and compile options.  The following is from a
359 16GB PIII, which has highmem enabled.  You may not have all of these fields.
360
361 > cat /proc/meminfo
362
363
364 MemTotal:     16344972 kB
365 MemFree:      13634064 kB
366 Buffers:          3656 kB
367 Cached:        1195708 kB
368 SwapCached:          0 kB
369 Active:         891636 kB
370 Inactive:      1077224 kB
371 HighTotal:    15597528 kB
372 HighFree:     13629632 kB
373 LowTotal:       747444 kB
374 LowFree:          4432 kB
375 SwapTotal:           0 kB
376 SwapFree:            0 kB
377 Dirty:             968 kB
378 Writeback:           0 kB
379 Mapped:         280372 kB
380 Slab:           684068 kB
381 CommitLimit:   7669796 kB
382 Committed_AS:   100056 kB
383 PageTables:      24448 kB
384 VmallocTotal:   112216 kB
385 VmallocUsed:       428 kB
386 VmallocChunk:   111088 kB
387
388     MemTotal: Total usable ram (i.e. physical ram minus a few reserved
389               bits and the kernel binary code)
390      MemFree: The sum of LowFree+HighFree
391      Buffers: Relatively temporary storage for raw disk blocks
392               shouldn't get tremendously large (20MB or so)
393       Cached: in-memory cache for files read from the disk (the
394               pagecache).  Doesn't include SwapCached
395   SwapCached: Memory that once was swapped out, is swapped back in but
396               still also is in the swapfile (if memory is needed it
397               doesn't need to be swapped out AGAIN because it is already
398               in the swapfile. This saves I/O)
399       Active: Memory that has been used more recently and usually not
400               reclaimed unless absolutely necessary.
401     Inactive: Memory which has been less recently used.  It is more
402               eligible to be reclaimed for other purposes
403    HighTotal:
404     HighFree: Highmem is all memory above ~860MB of physical memory
405               Highmem areas are for use by userspace programs, or
406               for the pagecache.  The kernel must use tricks to access
407               this memory, making it slower to access than lowmem.
408     LowTotal:
409      LowFree: Lowmem is memory which can be used for everything that
410               highmem can be used for, but it is also availble for the
411               kernel's use for its own data structures.  Among many
412               other things, it is where everything from the Slab is
413               allocated.  Bad things happen when you're out of lowmem.
414    SwapTotal: total amount of swap space available
415     SwapFree: Memory which has been evicted from RAM, and is temporarily
416               on the disk
417        Dirty: Memory which is waiting to get written back to the disk
418    Writeback: Memory which is actively being written back to the disk
419       Mapped: files which have been mmaped, such as libraries
420               Slab: in-kernel data structures cache
421  CommitLimit: Based on the overcommit ratio ('vm.overcommit_ratio'),
422               this is the total amount of  memory currently available to
423               be allocated on the system. This limit is only adhered to
424               if strict overcommit accounting is enabled (mode 2 in
425               'vm.overcommit_memory').
426               The CommitLimit is calculated with the following formula:
427               CommitLimit = ('vm.overcommit_ratio' * Physical RAM) + Swap
428               For example, on a system with 1G of physical RAM and 7G
429               of swap with a `vm.overcommit_ratio` of 30 it would
430               yield a CommitLimit of 7.3G.
431               For more details, see the memory overcommit documentation
432               in vm/overcommit-accounting.
433 Committed_AS: The amount of memory presently allocated on the system.
434               The committed memory is a sum of all of the memory which
435               has been allocated by processes, even if it has not been
436               "used" by them as of yet. A process which malloc()'s 1G
437               of memory, but only touches 300M of it will only show up
438               as using 300M of memory even if it has the address space
439               allocated for the entire 1G. This 1G is memory which has
440               been "committed" to by the VM and can be used at any time
441               by the allocating application. With strict overcommit
442               enabled on the system (mode 2 in 'vm.overcommit_memory'),
443               allocations which would exceed the CommitLimit (detailed
444               above) will not be permitted. This is useful if one needs
445               to guarantee that processes will not fail due to lack of
446               memory once that memory has been successfully allocated.
447   PageTables: amount of memory dedicated to the lowest level of page
448               tables.
449 VmallocTotal: total size of vmalloc memory area
450  VmallocUsed: amount of vmalloc area which is used
451 VmallocChunk: largest contigious block of vmalloc area which is free
452

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

관련자료

댓글 0
등록된 댓글이 없습니다.

공지사항


뉴스광장


  • 현재 회원수 :  60,032 명
  • 현재 강좌수 :  35,773 개
  • 현재 접속자 :  126 명