Linux view a memory occupied by a process, the first process id can be found through ps commands, such as ps -ef | grep kafka kafka can see the process of this program id
We can see that 2913 can now use the following command to view memory:
top -p 2913
This dynamic real-time view of CPU and memory usage, and then press q to return to the command line
Ps command can also be used directly View: ps -aux | grep Kafka used to live
The first place is marked CPU and memory usage, the latter 943,100 physical memory usage, the unit is k, this time takes about 943M memory kafka
You can also view the status file processes: CAT / proc / 2913 / status
VmRSS corresponding value is the physical memory usage, and just about 943M agreement
It also can by dynamic top command to view memory usage
By: PS the AUX | the Sort -k4,4nr | program 10 former head -n 10 View memory consumption