Get the App
SLTechnology News&Howtos  ›  Development  › 

See what the php-fpm memory footprint commands are

Shulou Source: shulou.com Published: 2022-06-03 17:42:34 11月13日 Update

This article mainly introduces what are the php-fpm memory occupancy commands, which are very detailed and have certain reference value. Friends who are interested must finish reading them.

Check out several useful small commands that are consumed by PHP-FPM, and record them as follows:

1. View the memory footprint of each FPM:

Ps-ylC php-fpm-- sort:rss

Of course, add | wc-l after the end to view the total number of current FPM processes on the system.

A single process occupies 23m of memory

# ps-ylC php-fpm-- sort:rss

S UID PID PPID C PRI NI RSS SZ WCHAN TTY TIME CMD

S 0 627 1 0 80 0 848 6205 ep_pol? 00:01:09 php-fpm

S 501 6685 627 0 80 0 23392 10858 skb_re? 00:01:21 php-fpm

S 501 6684 627 080 0 23536 10808 skb_re? 00:01:17 php-fpm

S 501 6915 627 0 80 0 24752 10911 skb_re? 00:01:12 php-fpm

# ps-ylC php-fpm-- sort:rss | wc-l

five

two。 Check the average memory footprint of PHP-FPM on your machine:

The command is as follows:

Ps-- no-headers-o "rss,cmd"-C php-fpm | awk'{sum+=$1} END {printf ("% d% s\ n", sum/NR/1024, "M")}'

The average memory is 17m.

# ps-- no-headers-o "rss,cmd"-C php-fpm | awk'{sum+=$1} END {printf ("% d% s\ n", sum/NR/1024, "M")}'

17M

The above is all the contents of the article "what are the php-fpm memory usage commands?" Thank you for reading! Hope to share the content to help you, more related knowledge, welcome to follow the industry information channel!

Tags: Memory command content size article process value interest individual partner life more useful machine knowledge system industry information information channel Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Information Redmi Apple MySQL Microsoft