apps/dtnperf/dtnperf-details.txt
changeset 0 2b3e5ec03512
equal deleted inserted replaced
-1:000000000000 0:2b3e5ec03512
       
     1                          *************************
       
     2                          *       dtnperf         *
       
     3                          *                       *
       
     4                          * DETAILED INSTRUCTIONS *
       
     5                          *************************
       
     6 
       
     7 This document describes, in a certain detail, the functions of dtnperf.
       
     8 
       
     9 * DTNPERF - SERVER
       
    10 
       
    11 The server syntax is simple:
       
    12 
       
    13     SYNTAX: ./dtnperf-server [options]
       
    14 
       
    15 where options are almost useless, so you can run it without anything else.
       
    16 However let's say something about them.
       
    17 
       
    18 -d <dir> : here you can specify the directory in which the received file will be
       
    19            saved. Actually, i haven't tested it yet, so if you do it please let
       
    20 me know what you could do. The default directory is /var/dtn/dtnperf: it works
       
    21 great and i don't want to change it (yes, i'm quite lazy).
       
    22 
       
    23 -D : with this option you can see all the debug messages of the server, so you
       
    24      can truly understand how it works, thus obtaining the complete control of
       
    25 the galaxy, the secret of the universe and maybe the immortal life.
       
    26 
       
    27 -m : by typing it, you can store the received bundles into memory, instead of a
       
    28      file. This surely works ONLY if:
       
    29 1) the client is using -m option too
       
    30 2) the client sends bundles with a payload SMALLER than 50000 bytes.
       
    31 Read also the '-m' explanation in the client section.
       
    32 
       
    33 -h : simply shows the syntax
       
    34 
       
    35 -v : the 'verbose' mode shows some additional messages about what's happening.
       
    36 
       
    37 
       
    38 
       
    39 * DTNPERF - CLIENT
       
    40 
       
    41 Let's begin from the syntax:
       
    42 
       
    43     SYNTAX: ./dtnperf-client -d <dest_eid> [-t <sec> | -n <num>] [options]
       
    44 
       
    45 -d <dest_eid> : is a required argument, and specifies the EID of the server.
       
    46                 An EID (Endpoint ID) is the DTN name of a node, and generally
       
    47 has a DNS-like syntax: dtn://servername.dtn. This syntax may however change.
       
    48 
       
    49 -t <sec> : this option requires a positive number, which is interpreted as a
       
    50            number of seconds. This means that your transmission will last
       
    51 at least <sec> seconds (if you want to know why i wrote "at least", read the
       
    52 -p session).
       
    53 So, if i wanted to transmit data for 30 seconds, i should write "-t 30".
       
    54 
       
    55 -n <num> : the argument must be a positive number, eventually followed by a
       
    56            measure unit (B for bytes, K for KBytes or M for MBytes). If no unit
       
    57 is expressed, the client assumes you want to send MBytes. If i wanted to send
       
    58 a 10 MBytes file, i should write "-n 10M", while for 1 KByte i'd write "-n 1K".
       
    59 
       
    60 
       
    61 Then there are a bunch if options, which are quite important.
       
    62 
       
    63 -p <size> : with this option, you can define the payload size of a bundle.
       
    64             It's a very important option, because it affects the goodput result.
       
    65 If you use it in Time-Mode (-t option) there's no upper limit for the size, but
       
    66 remember that - if you specify a value greater than 50000 bytes - the client
       
    67 will create a file as big as your defined size. So make sure to have enough free
       
    68 space on your hard disk to store that file.
       
    69 Another important thing to know, when working in Time-Mode, is that the data
       
    70 transfer has a greater priority than the timeout. To understand this, let's
       
    71 assume that i made this call:
       
    72 
       
    73              ./dtnperf-client -d dtn://dest.dtn -t 30 -p 10M
       
    74 
       
    75 and that a 10 MB transfer takes 20 seconds. The client will transmit the 10 MB
       
    76 file (and 20 seconds are gone), then it starts transmitting it again, since the
       
    77 timeout is set to 30 seconds. But it has to finish the file transfer before
       
    78 returning the resulting goodput, so the transmission will stop after 40 seconds,
       
    79 because also the second file transfer takes 20 seconds!
       
    80 
       
    81 If you use the -p option in Data-Mode (-n option) you can send an amount of data
       
    82 (specified in the -n parameter) by multiple transmissions of smaller bundles. To
       
    83 do so, you can write (i.e.)
       
    84 
       
    85              ./dtnperf-client -d dtn://dest.dtn -n 10M -p 100K
       
    86 
       
    87 so you'll send 100 bundles, each of 100 KBytes, until a 10 MBytes amount of data
       
    88 is reached. This could be very important, because the resulting goodput of that
       
    89 command may be very different from the one obtained by:
       
    90 
       
    91              ./dtnperf-client -d dtn://dest.dtn -n 10M -p 1M
       
    92 
       
    93 since the payload affects the band usage, and thus the goodput.
       
    94 
       
    95 IMPORTANT: if no measure unit is defined, the client assumes you're talking
       
    96            about KBytes (while the -n option assumes MBytes).
       
    97 
       
    98 -r <eid> : this is an optional argument, and not so important at all.
       
    99            It simply requires the reply-to EID, which is the DTN node name that
       
   100 will be delivered the server answer. With this option you can send data from one
       
   101 machine, and see the results on a different one. I've not tested this so far, so
       
   102 make some tests before.
       
   103 
       
   104 -m : this option is a leftover of the first versions of dtnperf.
       
   105      The fact is that: when you have a payload SMALLER THAN 50000 bytes, you can
       
   106 store your bundle either into a file or into memory. The default setting is that
       
   107 you store it into a file (so a 50KB file is created and so on...), but you may
       
   108 want to use memory instead (perhaps you may think it's faster, or you don't have
       
   109 50000 bytes free on your hard disk...), so just type the -m option AND start the
       
   110 server with the same option!
       
   111 In example:
       
   112 
       
   113              ./dtnperf-server -m (on the receiver)
       
   114              ./dtnperf-client -d dtn://dest.dtn -n 20K -m (on the sender)
       
   115 
       
   116 When in Time-Mode (-t option), the client will automatically use memory support
       
   117 for payloads smaller than 50000 bytes.
       
   118 
       
   119 -B <num> : you may want to send a certain amount of data for many times. In this
       
   120            case you can specify how many transmissions you want to do as a 
       
   121 positive number following the -B option.
       
   122 
       
   123 -S <sec> : if you plan to do consecutive transmissions (-B option), you could
       
   124            set an interval of <sec> seconds between these data transfers.
       
   125 In example, i may want to transmit 1 MB for 5 times, with a 3 seconds interval:
       
   126 
       
   127              ./dtnperf-client -d dtn://dest.dtn -n 1M -B 5 -S 3
       
   128 
       
   129 ...got it?
       
   130 
       
   131 -c : this could be a very useful option.
       
   132      It generates a CSV output (Comma Separated Values), which you can redirect
       
   133 into a .csv file and open it in a common spreadsheet, such as OpenOffice.org.
       
   134 To redirect the output you shall use the shell '>' and '>>' functions.
       
   135 In example:
       
   136 
       
   137              ./dtnperf-client -d dtn://dest.dtn -t 30 -c >> test1.csv
       
   138 
       
   139 -h : this is the usual 'help' function, quite useless now that you've read this.
       
   140 
       
   141 -v : the 'verbose' mode prints some messages to better understand what's
       
   142      happening inside the client brain. You can't use it with the -c option.
       
   143 
       
   144 -D : if you specify this, you'll be flooded by many debug messages. You'll see
       
   145      what's happening inside the client, and have a mystic experience within the
       
   146 real Matrix of dtnperf.
       
   147 
       
   148 NOTE: If you have a look at the source code, you'll find that there are two more
       
   149 options which now are commented. In particular, they are '-s' and '-i'.
       
   150 These are old options, quite useless now.
       
   151 With the first one you can specify the EID of the sender: now this is automatic.
       
   152 With the '-i' option you can define the registration ID on the Bundle Daemon.
       
   153 
       
   154 Well, these were all the things you should know for a correct use of dtnperf.
       
   155 If you have questions, or suggestions as well, feel free to contact me at
       
   156 
       
   157              piero.cornice@gmail.com
       
   158 
       
   159 Thanks =)