Gostaria de saber quanto de memória cada processo esta consumindo do seu ambiente, conheça o “ps_mem“.
Com o ps_mem você consegue identificar quanto cada processo esta consumindo de memória e a soma de consumo de todos processos.
Para instalar o mesmo no CentOS é bem simples, siga o exemplo abaixo:
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 31 32 33 34 35 36 37 38 39 40 |
[root@srv-centos ~]# yum -y install ps_mem Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * base: centos.xpg.com.br * epel: mirror.globo.com * extras: centos.xpg.com.br * updates: centos.xpg.com.br Resolving Dependencies --> Running transaction check ---> Package ps_mem.noarch 0:3.1-5.el7 will be installed --> Finished Dependency Resolution Dependencies Resolved ================================================================================================================================================================================ Package Arch Version Repository Size ================================================================================================================================================================================ Installing: ps_mem noarch 3.1-5.el7 base 20 k Transaction Summary ================================================================================================================================================================================ Install 1 Package Total download size: 20 k Installed size: 43 k Downloading packages: ps_mem-3.1-5.el7.noarch.rpm | 20 kB 00:00:00 Running transaction check Running transaction test Transaction test succeeded Running transaction Installing : ps_mem-3.1-5.el7.noarch 1/1 Verifying : ps_mem-3.1-5.el7.noarch 1/1 Installed: ps_mem.noarch 0:3.1-5.el7 Complete! [root@srv-centos ~]# |
Simples não, apos instalar bastar rodar o comando “ps_mem“, segue saída do comando:
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 |
[root@srv-centos ~]# ps_mem Private + Shared = RAM used Program 240.0 KiB + 123.0 KiB = 363.0 KiB agetty (2) 540.0 KiB + 117.0 KiB = 657.0 KiB auditd 688.0 KiB + 86.0 KiB = 774.0 KiB crond 824.0 KiB + 77.5 KiB = 901.5 KiB systemd-logind 812.0 KiB + 133.0 KiB = 945.0 KiB chronyd 956.0 KiB + 101.0 KiB = 1.0 MiB dbus-daemon 684.0 KiB + 388.0 KiB = 1.0 MiB login 892.0 KiB + 289.5 KiB = 1.2 MiB wpa_supplicant 1.1 MiB + 146.0 KiB = 1.3 MiB master 1.2 MiB + 537.0 KiB = 1.7 MiB pickup 1.2 MiB + 537.0 KiB = 1.7 MiB qmgr 932.0 KiB + 945.0 KiB = 1.8 MiB bash (2) 1.2 MiB + 1.5 MiB = 2.6 MiB systemd-journald 2.2 MiB + 594.5 KiB = 2.8 MiB systemd-udevd 1.5 MiB + 1.5 MiB = 3.0 MiB rsyslogd 2.3 MiB + 1.4 MiB = 3.7 MiB sshd (2) 3.6 MiB + 593.5 KiB = 4.1 MiB lvmetad 3.8 MiB + 632.5 KiB = 4.4 MiB systemd 4.4 MiB + 1.1 MiB = 5.5 MiB NetworkManager 10.7 MiB + 961.5 KiB = 11.7 MiB polkitd 11.7 MiB + 1.3 MiB = 13.0 MiB tuned 13.1 MiB + 423.5 KiB = 13.5 MiB dhclient --------------------------------- 77.7 MiB ================================= [root@srv-centos ~]# |
Agora fica fácil saber quem é o ladrão de memoria do seu ambiente. 😉
[]’s