티스토리 뷰

카테고리 없음

Command 모음

소농배 2021. 11. 18. 13:46

lsof -i TCP:{PORT_NUMBER}

 - TCP 포로토콜의 PORT_NUMBER 를 사용하고 있는 프로세스 조회

 $ lsof -i TCP:10001
COMMAND   PID     USER   FD   TYPE            DEVICE SIZE/OFF NODE NAME
Postman 91813 	  root   71u  IPv4 0x92ae7c0d52fa547      0t0  TCP localhost:53614->localhost:scp-config (ESTABLISHED)
java    92001     root  151u  IPv6 0x92ae7c0c98a283f      0t0  TCP *:scp-config (LISTEN)
java    92001     root  153u  IPv6 0x92ae7c0b765b83f      0t0  TCP localhost:scp-config->localhost:53614 (ESTABLISHED)

nslookup {uri}

 - URI 의 IP 반환

 $ nslookup naver.com
Server:		100.64.0.1
Address:	100.64.0.1#53

Non-authoritative answer:
Name:	naver.com
Address: 223.130.195.95
Name:	naver.com
Address: 223.130.195.200
Name:	naver.com
Address: 223.130.200.107
Name:	naver.com
Address: 223.130.200.104

jstat -gccapacity {pid}

 - Heap generation 별 크기

   NGCMN     NGCMX       NGC    S0C       S1C         EC      OGCMN      OGCMX       OGC          OC  MCMN      MCMX       MC    CCSMN    CCSMX      CCSC    YGC   FGC
     0.0 3145728.0 1982464.0    0.0   16384.0  1966080.0        0.0  3145728.0  1163264.0  1163264.0   0.0 1179648.0 147532.0      0.0 1048576.0  17252.0    115     0
          • NGCMN: Minimum new generation capacity (kB).
          • NGCMX: Maximum new generation capacity (kB).
          • NGC: Current new generation capacity (kB).
          • S0C: Current survivor space 0 capacity (kB).
          • S1C: Current survivor space 1 capacity (kB).
          • EC: Current eden space capacity (kB).
          • OGCMN: Minimum old generation capacity (kB).
          • OGCMX: Maximum old generation capacity (kB).
          • OGC: Current old generation capacity (kB).
          • OC: Current old space capacity (kB).
          • MCMN: Minimum metaspace capacity (kB).
          • MCMX: Maximum metaspace capacity (kB).
          • MC: Metaspace capacity (kB).
          • CCSMN: Compressed class space minimum capacity (kB).
          • CCSMX: Compressed class space maximum capacity (kB).
          • CCSC: Compressed class space capacity (kB).
          • YGC: Number of young generation GC events.
          • FGC: Number of full GC events.

jstat -gc {pid}

 - GC 힙 통계 

 S0C    S1C    S0U    S1U      EC       EU        OC         OU       MC     MU    CCSC   CCSU   YGC     YGCT    FGC    FGCT     GCT
 0.0   16384.0  0.0   16384.0 1966080.0 81920.0  1163264.0   417974.7  148172.0 142911.3 17380.0 16375.7    116    3.278   0      0.000    3.278
  • S0C: Current survivor space 0 capacity (kB).
  • S1C: Current survivor space 1 capacity (kB).
  • S0U: Survivor space 0 utilization (kB).
  • S1U: Survivor space 1 utilization (kB).
  • EC: Current eden space capacity (kB).
  • EU: Eden space utilization (kB).
  • OC: Current old space capacity (kB).
  • OU: Old space utilization (kB).
  • MC: Metaspace capacity (kB).
  • MU: Metacspace utilization (kB).
  • CCSC: Compressed class space capacity (kB).
  • CCSU: Compressed class space used (kB).
  • YGC: Number of young generation garbage collection events.
  • YGCT: Young generation garbage collection time.
  • FGC: Number of full GC events.
  • FGCT: Full garbage collection time.
  • GCT: Total garbage collection time.

pmap -x {pid} | sort -k 3 -n -r | more

 - Process 가 사용중인 메모리 

pmap -x 1 | sort -k 3 -n -r | more
total kB         9136620 3146948 3115392
0000000700000000 3163108 2482224 2482224 rw---   [ anon ]
00007f1761000000   91008   90380   90380 rwx--   [ anon ]
00007f1710e00000   51200   51200   51200 rw---   [ anon ]
00007f1718f02000   50168   49160   49160 rw---   [ anon ]
00007f16cc000000   51608   47288   47288 rw---   [ anon ]
00007f16ec000000   52692   40064   40064 rw---   [ anon ]
공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
링크
«   2025/04   »
1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30
글 보관함