Jon Warbrick, July 2014, V3.2 (for Ansible 1.7)
First one found from of
#!/bin/bash | |
echo "Average php-fpm process memory usage:" | |
PHPFPM="php-fpm" # it could be just php-fpm or php-fpm-X.X (eg. php-fpm-7.1) depending on configuration | |
AVG=$(ps --no-headers -o "rss,cmd" -C $PHPFPM | awk '{ sum+=$1 } END { printf ("%d%s\n", sum/NR/1024,"M") }') | |
QTY=$(ps -ylC $PHPFPM --sort:rss | tail -n +2 | wc -l) | |
echo "$AVG on $QTY processes" | |
exit 0 |
<?php | |
// This can be found in the Symfony\Component\HttpFoundation\Response class | |
const HTTP_CONTINUE = 100; | |
const HTTP_SWITCHING_PROTOCOLS = 101; | |
const HTTP_PROCESSING = 102; // RFC2518 | |
const HTTP_OK = 200; | |
const HTTP_CREATED = 201; | |
const HTTP_ACCEPTED = 202; |
Jon Warbrick, July 2014, V3.2 (for Ansible 1.7)
First one found from of