watch -d -n 10 'ps aux|grep mysqld|grep -v grep;free -m'=>
Every 10.0s: ps aux|grep mysqld|grep -v grep;free -m Fri May 14 10:14:08 2021
mysql 38434 187 55.4 20346284 18170260 ? Ssl 08:52 153:38 /usr/sbin/mysqld
total used free shared buff/cache available
Mem: 31990 18123 1115 64 12751 13351
Swap: 1907 3 1904
mysqld의 메모리 사용량과 남은 메모리량을 모니터링 하는 명령어
-d 로 변화 부분에 강조 표시 됨 (색상 반전 부분)
while true; do ps aux|grep mysqld|egrep -v '(grep|bin/sh)'; sleep 10; done
=> 10초마다 명령어 실행
# while true; do ps aux|grep mysqld|egrep -v '(grep|bin/sh)'; sleep 10; done
mysql 38434 197 55.8 20346284 18299000 ? Ssl 08:52 659:55 /usr/sbin/mysqld
mysql 38434 196 55.8 20346284 18299000 ? Ssl 08:52 660:14 /usr/sbin/mysqld
mysql 38434 196 55.8 20346284 18299000 ? Ssl 08:52 660:25 /usr/sbin/mysqld
mysql 38434 196 55.8 20346284 18299000 ? Ssl 08:52 660:41 /usr/sbin/mysqld