From: | John R Pierce <pierce(at)hogranch(dot)com> |
---|---|
To: | Whit Armstrong <armstrong(dot)whit(at)gmail(dot)com> |
Cc: | pgsql-general <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: nagios -- number of postgres connections |
Date: | 2009-06-17 03:32:28 |
Message-ID: | 4A3863CC.9050604@hogranch.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Whit Armstrong wrote:
> anyone know a way to get nagios to monitor the number of postgres connections?
>
a script that counts how many lines of postgres processes there are and
subtracts a few....
$ ps -C postmaster uww
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
postgres 2878 0.0 0.1 152036 1500 ? S Apr05 22:48
/usr/bin/postmaster -p 5432 -D /var/lib/pgsql/data
postgres 3941 0.0 0.0 13056 460 ? Ss Apr05 0:11
postgres: logger process
postgres 3944 0.0 8.4 152192 87196 ? Ss Apr05 1:35
postgres: writer process
postgres 3945 0.0 0.0 152192 684 ? Ss Apr05 0:10
postgres: wal writer process
postgres 3946 0.0 0.1 152980 1380 ? Ss Apr05 29:13
postgres: autovacuum launcher process
postgres 3947 0.1 0.0 13916 1020 ? Ss Apr05 118:23
postgres: stats collector process
so there's one connection there, and the others are the fixed processes.
From | Date | Subject | |
---|---|---|---|
Next Message | Jeff Frost | 2009-06-17 03:37:46 | Re: nagios -- number of postgres connections |
Previous Message | Whit Armstrong | 2009-06-17 03:20:51 | nagios -- number of postgres connections |