오늘부터 자주 사용하게 되는 리눅스 명령어를 모아봐야겠다.

1. 메모리 현황 보기 : cat /proc/meminfo | grep Mem

cat /proc/meminfo | grep Mem
MemTotal:       131445188 kB
MemFree:         6539336 kB
MemAvailable:   52647956 kB

* Free memory is the amount of memory which is currently not used for anything. This number should be small, because memory which is not used is simply wasted. Available memory is the amount of memory which is available for allocation to a new process or to existing processes.
* free memory는 현재 어떤 것에도 사용되지 않는 메모리이고, 사용되지 않는 메모리는 낭비되기때문에 사이즈가 작음.
available memory는 새로운 프로세스 또는 존재하는 프로세스에 allocation할 수 있는 메모리.

2. 특정 port가 사용되는지 보기 : sudo netstat -ntlp | grep :5044
port가 listen되고 있는지 볼 수 있음.


3. cpu 현황 전체 보기 : cat /proc/cpuinfo

processor 수만 따로 보기 : grep -c processor /proc/cpuinfo

 

+ Recent posts