I guess attachments don't come through to the list, so here it is.

------------- BEGIN SCRIPT ---------------
#!/usr/bin/perl

$| = 1;

while(<STDIN>) {
    chomp;

    if (  $_ =~ m/^\<listener index=\"(\d+)/ ) {
        $listener = $1;
    }

    if ( $_ =~ m/^\<service index=\"(\d+)/ ) {
        $service = $1;
    }

    if ( $_ =~ m/^\<session index=\"(\d+)\" key=\"([^\"]+)\"
backend=\"(\d+)\"/ ) {
        print "/opt/pound-2.4.3/sbin/poundctl -N " . $listener;
        print " " . $service . " " . $2 . " " . $3 . "\n";
    }
}
------------- END SCRIPT ---------------

Cullin

-----Original Message-----
From: Cullin J. Wible [mailto:[email protected]]
Sent: Monday, December 29, 2008 1:45 PM
To: [email protected]
Subject: [Pound Mailing List] Session Preversation Script

Hi Everyone,

We needed a way to preserve pound sessions. This way we could do a quick
pound restart and re-load the session data or, if necessary, do an
IP-takeover and move the session table to another server.

The script is quite simple, but I thought it was worth sharing. Here's
how to use it:

# poundctl -c /var/run/pound.ctl -X | pund-preserve >
/tmp/pound-sessions.sh
< restart pound, scp session list to other box, etc. >
# bash /tmp/pound-sessions.sh

As a side note, this script could be modified and combined with
something such as heartbeat or apinger to (
http://freshmeat.net/projects/apinger/) to create a redundant Pound
system. We're not quite there yet, but it's not that far off.

Thanks,

Cullin J. Wible
Co-Founder & Chief Architect

Email Data Source, Inc.
65 Broadway, Suite 601
New York, NY 10006
212-514-8900 | main
646-461-3775 | direct
212-514-8904 | fax

[email protected]

www.EmailDataSource.com <http://www.emaildatasource.com/>
Monitoring the World of Email Marketing



--
To unsubscribe send an email with subject unsubscribe to [email protected].
Please contact [email protected] for questions.

--
To unsubscribe send an email with subject unsubscribe to [email protected].
Please contact [email protected] for questions.

Reply via email to