Table of contents

Debugging bundle transfer

In the 2.0 release, we have replaced DTN with a Java-based DTN-like protocol. This is implemented by the OCMP DTN Connection Object (CO). Like the original DTN protocol, the DTN CO uses a postgres database to keep track of bundles in transit. To check on the progress of bundles, you can just check the database. Note that this allows nodes to power cycle without loss of state.

All KioskNet nodes (kiosks, ferries, gateways, and the proxy) have a database in Postgres named 'ocmp'. This database has three important tables:

  • pendingpacket which keeps track of bundles that are still alive
  • receivedpacket which keeps track of bundles that have been received from elsewhere
  • sentfiles which keeps track of files that have been sent

Each table keeps track of the source of each bundle, its destination, and a sendcount, which is how often it has been sent. If the sendcount is non-zero, it has been properly handled. If it is -1, it has just been received and is not ready to be sent yet, and if it is 0, it is ready to be sent. Each OCMP node prioritize sending those bundles whose sendcounts are smaller, but are greater than -1.

Checking the database

To check on the bundles waiting to be sent at, say, the kiosk do the following:

  • ssh to the kiosk
  • su postgres
  • psql ocmp
  • select source,sendcount from pendingpacket;

This will list the bundles that are pending transfer. To list bundles that have been received, you would do

  • select source from receivedpacket;

Clearing the database

If you want to clear all the information in the database to restore it to pristine state, issues the following postgres command on all the databases (ignore warnings):

  • delete from pendingpacket; delete from receivedpacket; delete from filestate; delete from sentfiles;

Checking the log files

Another source of debugging information are the OCMP logs.

  • Logs for the kiosk, ferry, and gateway can be found at /var/log/ocmpclient.log
  • The log for the proxy is at /var/log/ocmpproxy.log
  • To change the log level, edit /var/ocmp/ocmp.txt
  • To change where the logs go, edit /var/ocmp/ocmp.txt . If you want logs on the console, you can set the destination to STDOUT

Return to deployment guide.

Retrieved from "http://blizzard.cs.uwaterloo.ca/tetherless/index.php/Debugging_bundle_transfer"

This page has been accessed 591 times. This page was last modified 02:06, 19 Sep 2008.


Main Page

About

Current Projects

Downloads

Documents

Internal

Old Projects

Meta