Re: [WIP] pg_ping utility

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: [WIP] pg_ping utility
Дата
Msg-id CAB7nPqSOruR3ds0TsU3P85_Huj7jQyVnDRq0giXn3iRxFMnQpQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: [WIP] pg_ping utility  (Phil Sorber <phil@omniti.com>)
Ответы Re: [WIP] pg_ping utility  (Phil Sorber <phil@omniti.com>)
Re: [WIP] pg_ping utility  (Peter Eisentraut <peter_e@gmx.net>)
Список pgsql-hackers


On Sat, Nov 17, 2012 at 2:48 AM, Phil Sorber <phil@omniti.com> wrote:
On Thu, Nov 15, 2012 at 10:55 PM, Michael Paquier
<michael.paquier@gmail.com> wrote:
> On Fri, Nov 16, 2012 at 12:34 PM, Phil Sorber <phil@omniti.com> wrote:
>> On Thu, Nov 15, 2012 at 9:23 PM, Michael Paquier
>> <michael.paquier@gmail.com> wrote:
>> > 3) Having an output close to what ping actually does would also be nice,
>> > the
>> > current output like Accepting/Rejecting Connections are not that
>>
>> Could you be more specific? Are you saying you don't want to see
>> accepting/rejecting info output?
>
> OK sorry.
>
> I meant something like that for an accessible server:
> $ pg_ping -c 3 -h server.com
> PING server.com (192.168.1.3)
> accept from 192.168.1.3: icmp_seq=0 time=0.241 ms
> accept from 192.168.1.3: icmp_seq=0 time=0.240 ms
> accept from 192.168.1.3: icmp_seq=0 time=0.242 ms
>
> Like that for a rejected connection:
> reject from 192.168.1.3: icmp_seq=0 time=0.241 ms
>
> Like that for a timeout:
> timeout from 192.168.1.3: icmp_seq=0
> Then print 1 line for each ping taken to stdout.

How does icmp_seq fit into this? Or was that an oversight?

Also, in standard ping if you don't pass -c it will continue to loop
until interrupted. Would you suggest that pg_ping mimic that, or that
we add an additional flag for that behavior?

FWIW, I would use 'watch' with the existing output for cases that I
would need something like that.
We waited a couple of days for feedback for this feature. So based on all the comments provided by everybody on this thread, perhaps we should move on and implement the options that would make pg_ping a better wrapper for PQPing. Comments?
--
Michael Paquier
http://michael.otacoo.com

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Michael Meskes
Дата:
Сообщение: Re: fix ecpg core dump when there's a very long struct variable name in .pgc file
Следующее
От: "Kevin Grittner"
Дата:
Сообщение: Re: Invalid optimization of VOLATILE function in WHERE clause?