Created
March 21, 2013 23:41
-
-
Save spiermar/5217833 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
ps -A -o pid,rss,command | grep nginx | grep -v grep | awk '{total+=$2}END{printf("nginx=%dMb\n", total/1024)}' | |
ps -A -o pid,rss,command | grep php-fpm | grep -v grep | awk '{total+=$2}END{printf("php-fpm=%dMb\n", total/1024)}' | |
ps -A -o pid,rss,command | grep mysqld | grep -v grep | awk '{total+=$2}END{printf("mysql=%dMb\n", total/1024)}' | |
ps -A -o pid,rss,command | grep transmission-da | grep -v grep | awk '{total+=$2}END{printf("transmission=%dMb\n", total/1024)}' | |
ps -A -o pid,rss,command | grep fail2ban | grep -v grep | awk '{total+=$2}END{printf("fail2ban=%dMb\n", total/1024)}' | |
ps -A -o pid,rss,command | grep sshd | grep -v grep | awk '{total+=$2}END{printf("sshd=%dMb\n", total/1024)}' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment