Add proper per-file copyright notices/licenses and top-level license.
[bluesky.git] / TBBT / README
1 1. TBBT Directory Structure
2
3 # README:       this file. Introduce the TBBT directory and how to use TBBT.
4 # trace_init:   source code for extract file system hierarchy from the trace
5 # trace_play:   source code for trace player
6 # test:         example of play the EECS Oct 21 1 hour trace. It contains the
7 #               original trace file:            anon-lair62-011021-0000.txt
8 #               file system hierarchy map:      fh-path-map-play
9 #               file system hierarchy:          RFSFS
10 #
11
12 2. How to use TBBT?
13
14 #STEP1: compile the TBBT player, change the executable "sfs3" to be owned
15 #       by root 
16
17 cd ~nzhu/TBBT/trace_play
18 make sfs3
19 su - root; chown root:root tplay; exit
20
21 #STEP2: copy or link trace file in a directory for trace play
22
23 cd TESTDIR
24 ln -s ../test/anon-lair62-011021-0000.txt anon-lair62-011021-0000.txt
25
26 #STEP3: extract the file system hierarchy from the trace file
27 #       There are two outputs: fh-path-map-play and RFSFS
28 #       fh-path-map-play is the file system hierarchy map
29 #       RFSFS is the actually file system hierarchy, instead of writing
30 #       each file to the full length, -S option creates a file system 
31 #       hierarchy where all files are of 0 length. This is useful when
32 #       for experimental test run or debug run because writing all files
33 #       to the full length could be time consuming.
34
35 ~nzhu/TBBT/trace_init/extract-hierarchy anon-lair62-011021-0000.txt [-S]
36
37 #STEP4: copy RFSFS to an exported directory on NFS file server 
38
39 scp -r RFSFS server:/export_dir/
40
41 #STEP5: pair-up the request and reply packets in the trace. 
42 #       The output file name is based on input file with suffix ".pair"
43 #       in this example, anon-lair62-011021-0000.txt.pair
44
45 sfs3 -pair_trace anon-lair62-011021-0000.txt
46
47
48 #STEP6: play the trace against initial file system hierarchy (RFSFS) on server
49
50 sfs3 hostname:/export_dir/RFSFS anon-lair62-011021-0000.txt.pair fh-path-map-play 1 0