| 1 | [[TranslatedPages]] |
| 2 | = mf-php5-cgi-processes = |
| 3 | == Synopsis == |
| 4 | Find all php5-cgi processes and list them in by user and the total number for each user. |
| 5 | |
| 6 | == Description == |
| 7 | This script runs the following command: |
| 8 | {{{ |
| 9 | total=$(ps -eFH| grep php5-cgi | wc -l) |
| 10 | ps -eFH | awk '/php5-cgi/{print $1}' | sort | uniq -c | sort -n |
| 11 | printf "Total: %s\n" "$total" |
| 12 | }}} |
| 13 | |
| 14 | == Examples == |
| 15 | {{{ |
| 16 | 0 lucy:~# mf-php5-cgi-processes |
| 17 | 2 4403 |
| 18 | 2 root |
| 19 | 4 chiapas |
| 20 | 6 6396 |
| 21 | 11 5050 |
| 22 | 23 3580 |
| 23 | Total: 49 |
| 24 | 0 lucy:~# |
| 25 | }}} |
| 26 | |
| 27 | == See Also == |
| 28 | |
| 29 | |
| 30 | ---- |
| 31 | '''[wiki:how-to/servers/mf-commands << MayFirst Commands]''' |