Multiple Entries due to Network Downtime

Hi,

The T-1 went down for a day and requests got caught in a “loop” and produced
almost 700 of the same three requests sent. Is there a way I can clear all
this out at once or do I have to do it one at a time thru the web interface?

George Nussbaum 10 New England Executive Park
Network/System Engineer Burlington, MA 01803
Exodus Communications Inc. www.exodus.net
V-(781) 203-1320 george.nussbaum@exodus.net

Cell-(617) 283-8009 Pager-(800) 581-8672
Fax-(781) 273-4237

| The T-1 went down for a day and requests got caught in a “loop” and
| produced almost 700 of the same three requests sent. Is there a way I
| can clear all this out at once or do I have to do it one at a time thru
| the web interface?
±–>8

A short Perl script I use for this; requires Expect.pm (see CPAN); wants
request serial numbers as arguments. I generally use rtq | awk to generate
the serial numbers.

(\Za is an evil hack to wait for EOF… it can never match.)

use Expect;

my $rt;
foreach my $req (@ARGV) {
$rt = Expect->spawn(‘rt’, ‘-kill’, $req);
$rt->expect(30, ‘:’);
$rt->print(“yes\r”);
$rt->expect(30, ‘\Za’);
}

brandon s. allbery [os/2][linux][solaris][japh] allbery@kf8nh.apk.net
system administrator [WAY too many hats] allbery@ece.cmu.edu
electrical & computer engineering KF8NH
carnegie mellon university [“better check the oblivious first” -ke6sls]

(\Za is an evil hack to wait for EOF… it can never match.)

I think expect also is an evil hack. I guess it’s just the old cli that
is evil. If you know the API, it should be almost as easy to make a perl
script that calls the right subs … or maybe hack the cli not to ask for
“yes”. Anyway, I’m lazy, so I always fix such things directly through the
sql;

update each_req set status='dead' where serial_num in (....);

well, of course that is an even more evil hack, as it doesn’t create
transactions as it should.

“The trouble with the world is that the stupid are
cocksure and the intelligent are full of doubt.”

  • Bertrand Russell

| I guess it’s just the old cli that is evil.
±–>8

Yep. Or at least highly annoying.

brandon s. allbery [os/2][linux][solaris][japh] allbery@kf8nh.apk.net
system administrator [WAY too many hats] allbery@ece.cmu.edu
electrical & computer engineering KF8NH
carnegie mellon university [“better check the oblivious first” -ke6sls]