How to check the memory footprint of nginx/mysql database
This article mainly tells you how to check the memory occupation of nginx/mysql database, and you can check the relevant professional terms on the Internet or find some related books to supplement it. We will not dabble here, so let's go straight to the topic. I hope that how to check the memory occupation of nginx/mysql database this article can bring you some practical help.
Check the average system memory occupied by each php-fpm. It is also applicable to look at nginx/mysqld, etc., and replace php-fpm with mysqld.
Ps-- no-headers-o "rss,cmd"-C php-fpm | awk'{sum+=$1} END {printf ("% d% s\ n", sum/NR/1024, "M")}'
View occupied memory
[root@centos69] # ps-ylC php-fpm-- sort:rss
S UID PID PPID C PRI NI RSS SZ WCHAN TTY TIME CMD
S 0 3082 1 0 80 0 6124 53280 ep_pol? 00:00:00 php-fpm
R 3085 3082 9 800 0 25708 57731 -? 00:03:00 php-fpm
R 3086 3082 9 800 0 25712 57731 -? 00:03:00 php-fpm
R 3083 3082 9 800 0 25716 57734 -? 00:03:00 php-fpm
R 3087 3082 9 800 0 25720 57741 -? 00:03:00 php-fpm
R 3088 3082 9 800 0 25732 57738 -? 00:02:59 php-fpm
R 3090 3082 9 800 0 25732 57735 -? 00:02:59 php-fpm
R 3094 3082 9 800 0 25756 57764 -? 00:02:59 php-fpm
R 3084 3082 9 800 0 25808 57764 -? 00:03:00 php-fpm
R 3092 3082 9 800 0 25828 57761 -? 00:02:59 php-fpm
R 3096 3082 9 800 0 25856 57768 -? 00:02:59 php-fpm
Nginx/mysql database memory footprint how to view will first tell you here, for other related issues you want to know can continue to pay attention to our industry information. Our section will capture some industry news and professional knowledge to share with you every day.