Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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
1  
What Operating System? –  gravyface May 11 '11 at 13:40
add comment

3 Answers

Linux/*nix:

top

Solaris:

prstat

Windows:

taskmgr.exe
share|improve this answer
add comment

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
add comment

This may be what you're looking for:

http://theservermonitor.com/pbl_help.php?11/postgres

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

Provides

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
add comment

Your Answer

 
discard

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.