Postgresql – How to find,total memory/ram using by the postgresql database in Linux machine

postgresqlpostgresql-9.2

When I execute top -u postgres or ps -C postgres -o %cpu,%mem,cmd in linux machine I am getting the list of postgres processors in my database machine. I need a consolidated %cpu and %ram usage by postgres.

Best Solution

Some details for caching in PostgreSQL and memory usage including disc caching.