Skip to content

DISTRESS Testing Hints

JohnDvorak edited this page Apr 16, 2014 · 2 revisions

You may find these tips helpful in debugging or testing the security of our DISTRESS system.

  1. After running ./distressd, you will be able to execute several other Erlang commands. Useful commands include:

NOTE: Don't forget to add the period after the command! That is necessary for Erlang commands.

  • distressd:stop(). - Stops the DISTRESS service from running. Useful to simulate a broken connection?

  • distressd:start(). - Restarts a stopped DISTRESS service.

  • distressd:purge(). - Clears the key-value storage tables of the DISTRESS server. Useful many files have been added to DISTRESS, and you need to prevent collisions.

  • observer:start(). - Starts the Erlang Observer program that can monitor performance and data for the distressd process. Through Observer, you can check real-time performance (System and Load Charts tabs), as well as checking the key-value tables distressd uses (Table Viewer tab). To see the correct key-value tables, go to the Table Viewer tab, then View > "Mnesia Tables". All the data can be found in the t_block table. The key is the hash of the pre-encrypted chunk, and the value is the encrypted binary data for each chunk. The t_block table is what is purged when calling distressd:purge()..

  1. If your distress list -verbose command is returning too many receipt files in your library, you can delete your entire library by removing ~/.config/distress/library. This will reset your DISTRESS client and shell to a state before any files have been added to the system. I recommend you use the distressd:purge(). command above at the same time for a clean installation.

  2. Use distress import and distress export command liberally! You can share a receipt file between as many users as you wish, as long as they are all pointing to the same DISTRESS server (the distressd service). Also use distress verify to verify if a receipt matches to a particular file. This can be thought of as a DISTRESS version of a diff command.

Clone this wiki locally