Harry wrote:
> I need help to know how to get below things in Postgresql :-
> 1) No. of active connections?
Can be selected from pg_stat_activity. The exact query depends on
PostgreSQL version and on what you consider "active" to mean.
> 2) No. of non-responding connections?
> 3) Queries which are running beyond time(i.e. time which 'll set in
> database query)?
How will you set that? What is the difference from "non-responding
connections"?
> 5) Dead Locked Queries?
> 4) Process ID's of dead-locked queries?
Deadlocks are automatically resolved and logged. Check the log.
> 5) No. of queries in non-responding state?
How is that different from "non-responding connections" in 2?
You might want to check on the tools mentioned on this page:
http://wiki.postgresql.org/wiki/Monitoring
If points 2, 3, and the second point 5 are about blocking, you might
be interested in these pages:
http://wiki.postgresql.org/wiki/Lock_Monitoringhttp://wiki.postgresql.org/wiki/Lock_dependency_information
-Kevin