#!/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)}’
Recent Comments