ps -u postgres o pid,rss:8,cmd | awk 'NR>1 {A+=$2} {print} END{print "Total RSS: " A}' PID RSS CMD 2263 8112 postgres: root production 10.1.1.1(44699) 2478 7888 postgres: root production 10.1.1.1(44740) 3486 12060 postgres: root mitel 10.1.1.20(56395) 5258 245840 postgres: ibroker production 10.1.3.10(60655) 5262 11440 postgres: root c21mb_ledger 10.1.3.10(60657) 5955 759728 postgres: ibroker production 10.1.4.100(52832) 8774 7100 postgres: root texashomes 10.1.1.102(50113) 11137 10624 postgres: root production 10.1.1.20(37557) 11138 10620 postgres: root production 10.1.1.20(37558) 11139 10616 postgres: root production 10.1.1.20(37559) 11140 10616 postgres: root production 10.1.1.20(37560) 11141 10604 postgres: root production 10.1.1.20(37561) 11142 10608 postgres: root production 10.1.1.20(37562) 11168 49032 postgres: root session 10.1.1.20(37566) 11169 49028 postgres: root session 10.1.1.20(37567) 11171 49032 postgres: root session 10.1.1.20(37568) 11172 49028 postgres: root session 10.1.1.20(37569) 11173 48960 postgres: root session 10.1.1.20(37570) 11174 48848 postgres: root session 10.1.1.20(37571) 13605 237056 postgres: ibroker production 10.1.3.44(42043) 13958 950036 postgres: ibroker production 10.1.3.1(60019) 14872 5456 postgres: root dns_internal 127.0.0.1(59540) 14873 5456 postgres: root dns_internal 127.0.0.1(59541) 14876 8988 postgres: root dns_internal 127.0.0.1(59542) 14877 5452 postgres: root dns_internal 127.0.0.1(59543) 14879 8980 postgres: root dns_internal 127.0.0.1(59544) 14880 5452 postgres: root dns_internal 127.0.0.1(59545) 14882 9040 postgres: root dns_internal 127.0.0.1(59546) 14883 5448 postgres: root dns_internal 127.0.0.1(59547) 14895 8992 postgres: root dns_internal 127.0.0.1(59548) 14896 5460 postgres: root dns_internal 127.0.0.1(59549) 15960 13188 postgres: vaquero vaquero 127.0.0.1(59561) 17027 3856 postgres: root production [local] 18157 542004 postgres: ibroker production 10.1.3.3(58493) 21051 621364 postgres: ibroker production 10.1.3.54(10678) 21060 6472 postgres: root c21mb_ledger 10.1.3.54(10680) 26033 104552 postgres: ibroker production 10.1.4.72(58340) 26042 6464 postgres: root c21mb_ledger 10.1.4.72(58342) 27710 8580 postgres: root production 10.1.1.6(46801) 27712 5428 postgres: root session 10.1.1.6(46804) 29737 8580 postgres: root production 10.1.1.6(54798) 29738 5420 postgres: root session 10.1.1.6(54801) 30176 200284 /usr/lib/postgresql/9.3/bin/postgres -D /var/lib/postgresql/9.3/main -c config_file=/etc/postgresql/9.3/main/postgresql.conf 30178 5571684 postgres: checkpointer process 30179 196480 postgres: writer process 30180 10508 postgres: wal writer process 30181 3568 postgres: autovacuum launcher process 30182 3396 postgres: stats collector process 31298 126352 postgres: root production 10.1.1.6(51169) 31302 5420 postgres: root session 10.1.1.6(51171) 31321 171212 postgres: root production 10.1.1.6(51311) 31322 5424 postgres: root session 10.1.1.6(51312) 31364 117460 postgres: root production 10.1.1.6(51503) 31365 5432 postgres: root session 10.1.1.6(51504) 31542 13624 postgres: root production 10.1.1.6(51511) 31543 13620 postgres: root production 10.1.1.6(51521) 31544 40844 postgres: root production 10.1.1.6(51522) 31545 49044 postgres: root session 10.1.1.6(51523) 31553 13624 postgres: root production 10.1.1.6(51544) 31554 171204 postgres: root production 10.1.1.6(51546) 31555 5428 postgres: root session 10.1.1.6(51549) 32607 765032 postgres: ibroker production 10.1.4.106(49210)