Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am using postgresql.

I want to monitor RAM usage of My Database server, is there any query or command which given the RAM usage or CPU usage?

Anything regarding MySql will also be helpful.

EDIT: I want to monitor Database server from Webserver, If usage increases some sort of limit it, webserver will send mails to administrator.

share|improve this question
What Operating System? – gravyface May 11 '11 at 13:40






share|improve this answer

If you're running on a linux/bsd system tool called top availabe which will show you CPU and memory usage of running processes. There are also programs like mytop and mysqlreport which are freely available for download and will show you what your mysql server is doing.

Mysql Enterprise Montior can show you actual cpu, memory and various other stats on your mysql instance but sadly it isn't free.

share|improve this answer

This may be what you're looking for:

The PostgreSQL Module helps you monitor your PostgreSQL Database's performance.


CPU Usage: The total cpu usage of all the PostgreSQL processes averaged over one minute.

Memory Usage: The total estimated memory usage in percentage of all the PostgreSQL processes. Real memory usage is next to impossible to calculate in a modern OS because of the shared memory pages so our service gives you an estimate based on tipical scenarios.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.