Differences
This shows you the differences between two versions of the page.
Last revisionBoth sides next revision | |||
util:pktdump [2020/03/18 18:50] – created with initial info and example wkitty42 | util:pktdump [2020/03/18 19:07] – [scripted example] clean up and some rewording wkitty42 | ||
---|---|---|---|
Line 8: | Line 8: | ||
/ | / | ||
- | ===== scripted example | + | ===== scripting examples |
- | At one point in time, I had a lot of pkts that got abandoned due to a misconfiguration of my mailer. This misconfiguration resulted in the mailer not being able to access the pkt files but it could access the BSO .?lo files. When it found it could not access the pkts listed in the flo file, it deleted the flo file resulting in the pkts being abandoned. Since I didn't want that mail to be lost, I wrote a script | + | At one point in time, I had a lot of pkts that got abandoned due to a misconfiguration of my mailer. This misconfiguration resulted in the mailer not being able to access the pkt files but it could access the BSO .?lo files. When it found it could not access the pkts listed in the flo file, it deleted the flo file resulting in the pkts being abandoned. Since I didn't want that mail to be lost, I wrote some oneliners |
+ | First run through all the pkts and output a list of destination addresses | ||
< | < | ||
# make a list of pkt destination addresses | # make a list of pkt destination addresses | ||
Line 16: | Line 17: | ||
egrep -e " | egrep -e " | ||
cut -d " " -f 12 | sort -V | uniq | cut -d " " -f 12 | sort -V | uniq | ||
+ | </ | ||
+ | Now, use one of the above addresses in place of $DESTADDR and your FTN address in place of $MYFTNADDR to move all the pkts for the destination system to the /sbbs/tmp directory. | ||
+ | < | ||
# choose an address from the above list | # choose an address from the above list | ||
# get a list of pkts destined there and | # get a list of pkts destined there and | ||
Line 24: | Line 28: | ||
cut -d " " -f 1 | tr ' | cut -d " " -f 1 | tr ' | ||
xargs -0 -n1 -i mv ' | xargs -0 -n1 -i mv ' | ||
+ | </ | ||
+ | Now that we have moved the pkts, lets create a flo file with them for the destination address. Put the destination system' | ||
+ | < | ||
# create a flo file with the pkts | # create a flo file with the pkts | ||
printf "$(ls -d -1 $PWD/*.pkt | \ | printf "$(ls -d -1 $PWD/*.pkt | \ | ||
Line 30: | Line 37: | ||
$(printf " | $(printf " | ||
</ | </ | ||
- | The above script snippets result in a BSO flo file being created in the current directory with a list of pkts in the temporary | + | |
+ | The above can be done a bit better by not moving | ||
+ | |||
+ | I've not yet spent more time to fix it up into a proper | ||
+ | |||
+ | These example | ||
===== See Also ===== | ===== See Also ===== |