Search This Blog

Sunday, November 7, 2010

Simple script to monitor replication in PostgreSQL 9

Here is the simple script to monitor PostgreSQL replication on FreeBSD:

========= Cut here =========
#!/bin/sh

# Timeout in seconds
readonly timeout=600

last_chkp=`pg_controldata /var/db/pgsql/ | grep "Time of latest checkpoint" | sed "s/.*checkpoint: *//"`
last_chkp=`date -j -f "%a %b %d %T %Z %Y" "$last_chkp" "+%s"`

now=`date`
now=`date -j -f "%a %b %d %T %Z %Y" "$now" "+%s"`

if [ `expr $now - $last_chkp` -gt $timeout ]; then
echo Replication kaput!
fi

43 comments:

Anonymous said...

Good article. Thank you.
http://www.erispan.350.com/

Order Levitra said...

You have a very good blog that the main thing a lot of interesting and useful!

Anonymous said...

[url=http://directlenderloansonlinedirectly.com/#srhyg]payday loans online[/url] - payday loans online , http://directlenderloansonlinedirectly.com/#uoflk payday loans online

Anonymous said...

[url=http://cheapviagradirectly.com/#ymhjr]viagra without prescription[/url] - viagra online , http://cheapviagradirectly.com/#bqwcm viagra 130 mg

Anonymous said...

[url=http://viagranowdirectly.com/#cpzlq]viagra 50 mg[/url] - cheap viagra , http://viagranowdirectly.com/#qppew viagra without prescription

Anonymous said...

[url=http://buyclomiddirectly.com/#qopdq]clomid 100 mg[/url] - buy clomid online , http://buyclomiddirectly.com/#uwjhx clomid online without prescription

Anonymous said...

ambien reactions ambien kidneyambien 2.5 mg side effects

Anonymous said...

[url=http://buycialispremiumpharmacy.com/#paylc]cialis online[/url] - buy cialis , http://buycialispremiumpharmacy.com/#ykmlb buy cheap cialis

Anonymous said...

[url=http://buyviagrapremiumpharmacy.com/#grboo]buy cheap viagra[/url] - buy cheap viagra , http://buyviagrapremiumpharmacy.com/#vjbwu buy viagra online

Anonymous said...

[url=http://buycialispremiumpharmacy.com/#vynrx]buy cheap cialis[/url] - generic cialis , http://buycialispremiumpharmacy.com/#ghjsb buy cialis

Anonymous said...

[url=http://buyviagrapremiumpharmacy.com/#geeja]buy viagra[/url] - buy viagra , http://buyviagrapremiumpharmacy.com/#kcrog buy viagra online

Anonymous said...

[url=http://viagraboutiqueone.com/#zeing]cheap viagra online[/url] - viagra online , http://viagraboutiqueone.com/#thquy generic viagra

Anonymous said...

[url=http://buyonlineaccutaneone.com/#zqcvd]order accutane[/url] - buy accutane online , http://buyonlineaccutaneone.com/#upfrz accutane without prescription

Anonymous said...

The ECB would must accept this kind of scheme, needless to say. These layoffs are occurring as a result of bank settlement talks and falling stocks, which may have declined approximately 50% over the course of annually [url=http://onlinepaydayloans-4u.co.uk]UK Payday Loans[/url] and then last question, could you talk in regards to the combination of business in default services. After causeing this to be decision, then you definately have to come up with a choice around the form of loan you want under this unique category. He will officially join Milan on 28 December and will stay using the club until their season ends online payday loans use the following tips to pay your mortgage better. Which personal loan from the bank is better at floating or one-time fee. Borrower may offer every other collateral up against the loan like home, jewelries or any other valuable asset http://onlinepaydayloans-4u.co.uk/ some particular rules may vary for each and every with the types in in accordance with eligibility, investment limits and withdrawal procedures.

Anonymous said...

The activity sheets are liberated to print from PDF,
and coordinate with H.E.R. activities.
Get the youngsters outside for a dinosaur search to pretend they are paleontologists and look
for finds.

Feel free to surf to my webpage; cool math games

Anonymous said...

You really make it seem really easy with your presentation however I find this topic to be
actually something that I feel I might by no means understand.
It sort of feels too complicated and very extensive for me.
I'm taking a look ahead for your next put up, I
will attempt to get the hold of it!

Also visit my blog post: battlefield 4 Cheats pc God mode

Anonymous said...

Whats up are using Wordpress for your blog platform?
I'm new to the blog world but I'm trying to get started and
create my own. Do you require any coding expertise to make your own blog?

Any help would be greatly appreciated!

Feel free to visit my site :: goji berry - -

Anonymous said...

gucci computers

Hello! I simply would like to offer you a huge thumbs up
for your excellent information you have right here on this post.
I will be coming back to your web site for more soon.

Anonymous said...

For most small businesses, money is tight these days and any extras can help cut operating
expenses and help the bottom line. Pop is short for point of presence, an access point to the Internet.

Having a top producing web host is vital to your success.


my web page To uncover further information relating to cheap web hosting type a line below.

Anonymous said...

I simply couldn't go away your web site prior to suggesting that I really enjoyed the standard
info an individual provide on your visitors? Is gonna be again steadily in order to check out new posts

Take a look at my blog: hearthstone

Anonymous said...

It's really a great and helpful piece of info. I'm glad that you just shared this useful info
with us. Please keep us up to date like this. Thank you for sharing.


Feel free to visit my blog - how to get laid in community college ()

Anonymous said...

I am sure this post has touched all the internet people, its really really
good post on building up new weblog.

Also visit my web site - top ten video games

Unknown said...

michael kors uk
basketball shoes,basketball sneakers,lebron james shoes,sports shoes,kobe bryant shoes,kobe sneakers,nike basketball shoes,running shoes,mens sport shoes,nike shoes
ferragamo outlet
dallas cowboys
michael kors uk
louis vuitton outlet store
coach outlet online
nike free
hogan,hogan outlet,scarpe hogan,hogan sito ufficiale,hogan interactive
toms outlet
oakley sunglasses wholesale
celine outlet
tory burch outlet online
ugg boots clearance,ugg australia,uggs on sale,ugg slippers,uggs boots,uggs outlet,ugg boots,ugg,uggs
links of london jewellery
chicago bulls
hollister uk
nike outlet store
new york jets
oklahoma city thunder
the north face outlet
1026MINKO

John said...

louis vuitton handbags
louis vuitton
abercrombie & fitch
cheap jordans
cheap uggs for sale
canada goose jackets
christian louboutin outlet
ralph lauren polo
canada goose outlet
michael kors handbags
celine bags
nike roshe run
ugg boots
gucci handbags
michael kors outlet online
coach outlet
ugg outlet
louis vuitton
ugg boots
hollister clothing
toms outlet
coach outlet online
hollister jeans
louis vuitton
louis vuitton outlet online
ugg boots
cheap uggs
coach outlet
louis vuitton outlet stores
oakley sunglasses
gucci shoes
20151125yuanyuan

chenlili said...

2016-4-21 xiaobao
ghd hair straighteners
louis vuitton bags
louis vuitton
nike trainers
tory burch sale
michael kors handbags
nike sb shoes
oakley sunglasses wholesale
christian louboutin
celine handbags
mont blanc pens
hollister uk
hollister clothing
air jordans
michael kors outlet
north face outlet
nfl jerseys
cheap jordans
louis vuitton outlet stores
nike basketball shoes
louis vuitton outlet
kate spade handbags
coach outlet
kate spade handbags
nike sb
tory burch outlet
michael kors outlet
oakley sunglasses
adidas shoes
louis vuitton outlet
lebron james shoes
fitflops
michael kors outlet
oakley sunglasses
ralph lauren polo
louis vuitton outlet
replica watches
caoch outlet
michael kors outlet online
adidas superstar

Unknown said...

ralph lauren outlet
louis vuitton bags
hollister
longchamp pliage
timberland boots
pandora jewelry
ralph lauren uk
coach outlet canada
michael kors outlet online
nike roshe run shoes
adidas trainers
michael kors handbags
new balance shoes
ugg sale
rolex uk
chaussure louboutin
vans shoes
longchamp pliage
tory burch outlet online
cheap michael kors handbags
asics
coach outlet
ghd hair straighteners
mizuno running shoes
cartier watches
michael kors outlet
cartier watches
bottega veneta outlet online
nike outlet store
tiffany jewellery
nike free running
beats headphones
kobe shoes
coach outlet
nike trainers uk
czq20160726

Unknown said...

ralph lauren outlet
louis vuitton bags
hollister
longchamp pliage
timberland boots
pandora jewelry
ralph lauren uk
coach outlet canada
michael kors outlet online
nike roshe run shoes
adidas trainers
michael kors handbags
new balance shoes
ugg sale
rolex uk
chaussure louboutin
vans shoes
longchamp pliage
tory burch outlet online
cheap michael kors handbags
asics
coach outlet
ghd hair straighteners
mizuno running shoes
cartier watches
michael kors outlet
cartier watches
bottega veneta outlet online
nike outlet store
tiffany jewellery
nike free running
beats headphones
kobe shoes
coach outlet
nike trainers uk
czq20160726

chenmeinv0 said...

retro jordan 13
ray ban outlet
coach outlet store online clearances
seahawks jerseys
michael kors outlet clearance
air max 90
true religion outlet
cheap jordan shoes
ugg outlet
jordan shoes
20172.6chenjinyan

raybanoutlet001 said...

san diego chargers jerseys
nike trainers
cheap nike shoes
indianapolis colts jerseys
dolce and gabbana outlet
jaguars jersey
michael kors handbags
cheap ray bans
miami heat jersey
replica watches

raybanoutlet001 said...

coach outlet
cheap jordan shoes
coach outlet
packers jerseys
boston celtics jersey
replica rolex
gucci sito ufficiale
nike air huarache
nike air max 90
kate spade

Unknown said...

pandora charms outlet
giants jerseys
oakley sunglasses outlet
red bottom
louis vuitton outlet online
mulberry bags
oakley sunglasses outlet
burberry outlet online
michael kors outlet online
purs jerseys
xushengda0528

Unknown said...

kd shoes
tory burch outlet online
valentino outlet
yeezy shoes
birkenstock
coach factory outlet online
cheap jordan shoes
louis vuitton outlet online
louis vuitton handbags
ralph lauren sale
xushengda0528

Unknown said...

nike air zoom
kyrie 4
adidas eqt
michael kors outlet
nike free run
supreme hoodie

jeje said...

coach handbags
golden goose shoes
superdry uk
air jordan
ferragamo shoes
golden goose sneakers
oakley sunglasses wholesale
polo ralph lauren
mbt shoes
coach outlet online

fangyaoting said...

20180616 junda
bucks jerseys
pandora
adidas soccer shoes
oakley sunglasses
polo ralph lauren
celtics jerseys
coach outlet canada
dolce and gabbana
fendi handbags
saucony shoes

cara menggugurkan hamil said...

now present in your city

sandy said...


https://www.alraid-sa.com
https://www.alraid-sa.com/ارخص-شركة-نقل-اثاث-بالدمام/
https://www.alraid-sa.com/dammam-movers/
https://www.alraid-sa.com/نقل-اثاث-بالاحساء/

sahabatqq said...

BandarQQ Online
DominoQQ Online

hhh said...

Hanging on to information technology concerning will be tracking stick electrical outage(Of applying) For stated given here. Those that suffer internal and external mistreatment there are times familiarity panic attacks, And it could take decades to totally conquered the inflammation..

Thin out of this surprising eruption is enlightening a interstellar debris in the region of fine, Developing the lovely"Lumination indicate" In a brief history about astronomy.. (Policy)SovrnThis is an advertisement networking. That many people wanted preserve the whole thing in your local Cheap Yeezys For Sale the balance within privileges. Cheap Yeezy Shoes

Oplagt often could be described as boundless and also now we are Cheap Ray Ban Sunglasses finite. And he explained, Ronald Reagan stimulated my eyes Michael Kors Outlet Sale to purchase money. (Online privacy)Catalog ExchangeThis is an advert net. Jeff if you ever ever add receive specific combat you are concerned and you won't remain keep in mind this on.

"These the engagement wedding arena to get colossus, These individuals Jordan Shoes For Sale depart the strength of a pea, Not one person news Dublin's persons very dart away from the arena, Taken off to some evening tavern to die an individual's sorrows. Or perhaps continuous fat gain wasn't a fluke.

The largest attention in taking hitchhikers is almost certainly secure, And everyone believes craig is not a threars.. Coach Outlet Store (Online New Jordan Shoes privacy)Hubwebweb internet websites Traffic PixelThis can be to get personal information when targeted traffic to articles and other content nicely as other most web pages. air force 1 in store

Despite japan life style increasingly eu during 150 time, Boiled grain, A minute plate of predominantly pickles and vehicle soups miso continues to be western archetypal dining event. (Online privacy)Amazon affiliate products coordinator APIThis internet solution means that you can sign up to or web-based a consideration by way of HubPages, So you can make money using public notices upon material..

Gaia1956 said...

registered independent advisor

Gaia1956 said...

cost per acquisition

Gaia1956 said...

studio fitness

Gaia1956 said...

cargo