Re: monitor stats

From: DiegoF <diegof(dot)hykova(at)gmail(dot)com>
To: "Shoaib Mir" <shoaibmir(at)gmail(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: monitor stats
Date: 2007-06-04 00:38:32
Message-ID: ee70f9810706031738u24d32480qa220837f1bbb078e@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

solved. the problem is that miss the line ":: 1 localhost" in /etc/hosts

thanks

On 6/3/07, Diego Fernando Arce <diegof(dot)hykova(at)gmail(dot)com> wrote:
>
> hello again
>
> if, but, I need it is real time not in archives
>
> lynx /usr/share/doc/postgresql-8.1.8/html/monitoring-stats.html
>
> SELECT pg_stat_get_backend_pid(s.backendid) AS procpid,
> pg_stat_get_backend_activity( s.backendid) AS current_query
> FROM (SELECT pg_stat_get_backend_idset() AS backendid) AS s;
>
> in 8.1.4
>
> aslecol=# SELECT pg_stat_get_backend_pid(s.backendid) AS
> procpid,pg_stat_get_backend_activity(s.backendid ) AS current_query FROM
> (SELECT pg_stat_get_backend_idset() AS backendid) AS s;
> procpid
> |
> current_q
> uery
>
> ---------+------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
>
> --------------------------------------------------------------------------------------------------------------------------------------------------------------
> 25506 | <IDLE>
> 25507 | select
> entidad,producto,num_doc,f_pago,to_char(sald_mora::numeric(12,2),'999,999,
> 999.99'),fecha,sald_mora::numeric(12,2) from bcsc_facics where 1=1 and
> fecha_car
> ga in (select max(fecha_carga) from bcsc_facics where codcli='1448998')
> and bcsc_facics.codcli='1448998' order by fecha_carga
> desc,entidad,producto,num_doc
> 25524 | <IDLE>
> 6447 | <IDLE>
> 598 | <IDLE>
>
> in 8.1.8
>
> aslecol=# SELECT pg_stat_get_backend_pid(s.backendid) AS
> procpid,pg_stat_get_backend_activity(s.backendid) AS current_query FROM
> (SELECT pg_stat_get_backend_idset() AS backendid) AS s;
> procpid | current_query
> ---------+---------------
> (0 filas)
>
>
>
>
> On 5/29/07, Shoaib Mir <shoaibmir(at)gmail(dot)com > wrote:
> >
> > Make sure there are some queries been executed on the server from
> > pg_stat_activity. Make sure your logging level for log files is such that it
> > can log the queries in db server log file.
> >
> > In addition to log_statement you can also set log_min_duration_statement
> > to 0 and that will also log queries in your log file.
> >
> > --
> > Shoaib Mir
> > EnterpriseDB (www.enterprisedb.co,)
> >
> > On 5/29/07, Diego Fernando Arce < diegof(dot)hykova(at)gmail(dot)com> wrote:
> > >
> > > show log_statement;
> > >
> > > log_statement
> > > ---------------
> > > all
> > > (1 fila)
> > >
> > >
> > > select pg_stat_get_backend_pid(s.backendid
> > > ),pg_stat_get_backend_activity(s.backendid) from (select
> > > pg_stat_get_backend_idset() as backendid)s;
> > >
> > > pg_stat_get_backend_pid | pg_stat_get_backend_activity
> > > -------------------------+------------------------------
> > > (0 filas)
> > > executing in another terminal other query
> > >
> > >
> > > On 5/30/07, Shoaib Mir <shoaibmir(at)gmail(dot)com > wrote:
> > > >
> > > > Did you do a reload or restart of the server after doing this
> > > > change?
> > > >
> > > > what do you see when you do this query? --> show log_statement
> > > >
> > > > --
> > > > Shoaib Mir
> > > > EnterpriseDB ( www.enterprisedb.com)
> > > >
> > > > On 5/29/07, Diego Fernando Arce <diegof(dot)hykova(at)gmail(dot)com > wrote:
> > > > >
> > > > > this is a part of postgrsql.conf
> > > > >
> > > > >
> > > > > log_statement = 'all' # none, mod, ddl, all
> > > > > #log_hostname = off
> > > > >
> > > > >
> > > > >
> > > > > #---------------------------------------------------------------------------
> > > > > # RUNTIME STATISTICS
> > > > >
> > > > > #---------------------------------------------------------------------------
> > > > >
> > > > > # - Statistics Monitoring -
> > > > >
> > > > > #log_parser_stats = off
> > > > > #log_planner_stats = off
> > > > > #log_executor_stats = off
> > > > > #log_statement_stats = off
> > > > >
> > > > > # - Query/Index Statistics Collector -
> > > > >
> > > > > stats_start_collector = on
> > > > > stats_command_string = on
> > > > > #stats_block_level = off
> > > > > #stats_row_level = off
> > > > > #stats_reset_on_server_start = off
> > > > >
> > > > >
> > > > > *in 8.1.6 and 8.1.4 it works *
> > > > >
> > > > >
> > > > >
> > > > >
> > > > > On 5/29/07, Shoaib Mir <shoaibmir(at)gmail(dot)com > wrote:
> > > > > >
> > > > > > Did you try doing "log_statements = all" in your postgresql.conffile?
> > > > > >
> > > > > > --
> > > > > > Shoaib Mir
> > > > > > EnterpriseDB (www.enterprisedb.com)
> > > > > >
> > > > > > On 5/29/07, Diego Fernando Arce <diegof(dot)hykova(at)gmail(dot)com >
> > > > > > wrote:
> > > > > > >
> > > > > > > hello, I have a question, does not work monitor stats in
> > > > > > > postgres 8.1.8
> > > > > > >
> > > > > > > I cannot see querys in execution
> > > > > > >
> > > > > > > help me please..........
> > > > > > >
> > > > > > > DiegoF
> > > > > > >
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Ranieri Mazili 2007-06-04 02:11:01 Jumping Weekends
Previous Message Madison Kelly 2007-06-04 00:06:14 Re: High-availability