Received: from makus.postgresql.org ([98.129.198.125]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1T9ni9-0008ER-SN for pgsql-performance@postgresql.org; Fri, 07 Sep 2012 01:50:22 +0000 Received: from sam.nabble.com ([216.139.236.26]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1T9ni2-0007vm-Vn for pgsql-performance@postgresql.org; Fri, 07 Sep 2012 01:50:17 +0000 Received: from [192.168.236.26] (helo=sam.nabble.com) by sam.nabble.com with esmtp (Exim 4.72) (envelope-from ) id 1T9nhz-0000Sp-Qc for pgsql-performance@postgresql.org; Thu, 06 Sep 2012 18:50:11 -0700 Date: Thu, 6 Sep 2012 18:50:11 -0700 (PDT) From: charles_xie To: pgsql-performance@postgresql.org Message-ID: <1346982611815-5723150.post@n5.nabble.com> In-Reply-To: References: <1346742779879-5722548.post@n5.nabble.com> Subject: Re: HELP!!!-----Need to Sql commands to monitoring Postgresql MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Pg-Spam-Score: -0.8 (/) X-Archive-Number: 201209/21 X-Sequence-Number: 47767 Hi=EF=BC=8C Thanks for your advice.i know the basic monitoring skill,because the postgresql database is used for the factory production , so I hope they can run normal and exert more perfect performance. so i need to be considered from the point of view ,eg : threading ,locks and so on. Daniel Farina-4 wrote >=20 > On Tue, Sep 4, 2012 at 12:12 AM, charles_xie <xqwyy163@> wrote: >> Hi all, >> i have 5 servers that have been installing postgresql .In order >> to >> know the postgresql working status and monitor them ,moreover i don't >> want >> to use the monitor tools .I want to use the SQL commands to monitoring >> postgresql system . please suggest any SQL COMMANDS to work >> successfully.if >> you have some good suggestion ,you can email to me >> (charles.xie@) or sky :xqwbx163 >=20 > Hello, >=20 > You might want to try pgsql-general or the wiki. The right stuff also > depends on what you are monitoring for. >=20 > Basic uptime and information: "SELECT 1" ("can I log in?"), but also > counting the number of connections (select count(*) from > pg_stat_activity), the number of contending connections (select > count(*) from pg_stat_activity where waiting =3D 't'), the number of > tables (select count(*) from pg_tables), database size (select > pg_database_size()), and database version (select > version()) we find useful. It's so useful we put it into a very > condensed and cryptic status line (which can optionally have more > information in more exceptional conditions) like: >=20 > [100.5GB:140T:7C], (v9.0.6, --other statuses if they occur--) >=20 > The space of queries used for tuning and capacity are much larger, but > I find these basic chunks of information a useful fingerprint of most > databases and activity levels in a relatively small amount of space. >=20 > --=20 > fdr >=20 >=20 > --=20 > Sent via pgsql-performance mailing list (pgsql-performance@) > To make changes to your subscription: > http://www.postgresql.org/mailpref/pgsql-performance >=20 -- View this message in context: http://postgresql.1045698.n5.nabble.com/HELP-= Need-to-Sql-commands-to-monitoring-Postgresql-tp5722548p5723150.html Sent from the PostgreSQL - performance mailing list archive at Nabble.com.