Synchronet v3.19b-Win32 (install) has been released (Jan-2022).

You can donate to the Synchronet project using PayPal.

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Last revisionBoth sides next revision
util:pktdump [2020/03/18 18:50] – created with initial info and example wkitty42util:pktdump [2020/03/18 19:07] – [scripted example] clean up and some rewording wkitty42
Line 8: Line 8:
 /sbbs/exec/pktdump /sbbs/ftn/out/fidonet/*.?ut /sbbs/exec/pktdump /sbbs/ftn/out/fidonet/*.?ut
  
-===== 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 that used pktdump to retrieve the destination addresses from the pkts and create new flo files for them.+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 that use pktdump to retrieve the destination addresses from the pkts and create new flo files for them.
  
 +First run through all the pkts and output a list of destination addresses
 <code> <code>
 # make a list of pkt destination addresses # make a list of pkt destination addresses
Line 16: Line 17:
   egrep -e "Packet Type .* from $MYFTNADDR to " | \   egrep -e "Packet Type .* from $MYFTNADDR to " | \
   cut -d " " -f 12 | sort -V | uniq   cut -d " " -f 12 | sort -V | uniq
 +</code>
  
 +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.
 +<code>
 # 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 '\n' '\0' | \   cut -d " " -f 1 | tr '\n' '\0' | \
   xargs -0 -n1 -i mv '{}' /sbbs/tmp   xargs -0 -n1 -i mv '{}' /sbbs/tmp
 +</code>
  
 +Now that we have moved the pkts, lets create a flo file with them for the destination address. Put the destination system's net in place of $DESTNET and its node in place of $DESTNODE.
 +<code>
 # 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 "%04x%04x.flo\n" $DESTNET $DESTNODE)   $(printf "%04x%04x.flo\n" $DESTNET $DESTNODE)
 </code> </code>
-The above script snippets result in BSO flo file being created in the current directory with a list of pkts in the temporary directory. You only need to move the flo file to the proper FTN outbound directory for the mailer to find it and send the pkts from the temporary directoryThis script example helped me to recover several thousand pkts that were abandoned over night on my hub system.+ 
 +The above can be done bit better by not moving the pkts to the tmp directory first but this works fine with some manual work addedOnce the flo file is created, it is a simple matter manually to copy/move it to the proper outbound directory and wait for the mailer to transit and delete the pkts listed in it before handling the next system in the list of destinations. 
 + 
 +I've not yet spent more time to fix it up into a proper script that doesn't need to move the files at all plus there should be some .bsy file creation to prevent the tosser and mailer from jumping the gun while the pkts are moved and the flo is created. 
 + 
 +These example oneliners helped me to recover several thousand pkts that were abandoned over night on my hub system.
  
 ===== See Also ===== ===== See Also =====