Re: How to get postmaster shut down time in postgres?

From: Melvin Davidson <melvin6925(at)gmail(dot)com>
To: pavan95 <pavan(dot)postgresdba(at)gmail(dot)com>
Cc: "pgsql-general(at)postgresql(dot)org >> PG-General Mailing List" <pgsql-general(at)postgresql(dot)org>
Subject: Re: How to get postmaster shut down time in postgres?
Date: 2018-06-04 13:52:26
Message-ID: CANu8FiyxU2JBm9KNqPn=d=VJ_ZZOtKPA7rnLKKNRp=Gtf39h-Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Mon, Jun 4, 2018 at 9:44 AM, pavan95 <pavan(dot)postgresdba(at)gmail(dot)com> wrote:

> Hi Adrian/Melvin,
>
> Thanks for your prompt replies. Yeah, I'm aware of that way.
>
> But my requirement is to get the server shutdown time whenever that event
> occurs and insert into a table dynamically!! Is it possible?
>
> The main reason for my requirement is to find the time swing between server
> stop and start.
>
> Thanks in advance.
>
> Regards,
> Pavan
>
>
>
> --
> Sent from: http://www.postgresql-archive.org/PostgreSQL-general-
> f1843780.html
>
>
>... my requirement is to get the server shutdown time whenever that event
>occurs and insert into a table dynamically!! Is it possible?

Since you have not stated your O/S, we cannot provide a specific solution.
However, I can suggest that you use
a command line script to grab the time from the log and then write to a
file. EG. grep / find

--
*Melvin Davidson*
*Maj. Database & Exploration Specialist*
*Universe Exploration Command – UXC*
Employment by invitation only!

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Klaver 2018-06-04 13:55:20 Re: How to get postmaster shut down time in postgres?
Previous Message pavan95 2018-06-04 13:44:20 Re: How to get postmaster shut down time in postgres?