Linux to see the memory occupied by a process, the first can be found through the PS command process ID, such as PS -ef | grep Kafka can see the process ID of this program Kafka
As you can see is 2913, you can now view the memory using the following command:
2913
This allows you to see CPU and memory occupancy in real time, and then press Q to return to the command line
You can also use the PS command directly to view: PS -aux | grep Kafka
The first dimension is CPU and memory occupancy, and the next 943100 is the amount of physical memory used, in K, at which time the Kafka consumes about 943M of memory
You can also view the status file for a process: cat /proc/2913/status
The vmrss corresponds to the physical memory footprint, about 943M and just the same
You can also view memory consumption dynamically with the top command
By: ps aux | Sort -k4,4nr | Head - n -View the top 10 memory-consuming programs
How to view the memory occupied by a process under Linux