Shell script Postgres Running

Поиск
Список
Период
Сортировка
От Lucas Possamai
Тема Shell script Postgres Running
Дата
Msg-id CAE_gQfVJQiSiq4LHvYScQ3v2X+yRZnsw7HMEyWhvFEXJr=9rdQ@mail.gmail.com
обсуждение исходный текст
Ответы Re: Shell script Postgres Running
Список pgsql-admin
Hi all,

I'm writing a shell script to get the information if postgres is or is not running.

#!/usr/bin/ksh
# the path to the PID file
PIDFILE=/var/lib/pgsql/9.2/data/postmaster.pid
if [ -f $PIDFILE ] ; then
PID=`cat $PIDFILE`
if [ "x$PID" != "x" ] && kill -0 $PID 2>/dev/null ; then
STATUS="There is a pidfile, YES, Postgres is running."
else
STATUS="There is no pidfile, Postgres is not running."
fi
else
STATUS="There is no pidfile, Postgres is not running."
fi
echo $STATUS


The script above works.. But, is there any way to get the same information, but with the checkpoints?

When you have a huge shared_buffer, when stopping the postgres' process, it will take some time to get it running again, right? Because the server will be writing a checkpoint?

So I'd like to check that... Is it possible?

Cheers
Lucas

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

Предыдущее
От: "Mitra ."
Дата:
Сообщение: Re: Error: extra data after last expected column
Следующее
От: Keith
Дата:
Сообщение: Re: Shell script Postgres Running