Debian Codegraph @

tcl/ex/empweb/modelSim

raw
1 #! /bin/sh
2
3 # usage to run this program
4 # ./modelSim
5 #
6 #
7 #The file isiweb.tcl is a ns script that demonstrates how to use
8 #the output of ModelGen (the set of CDF files in ./cdf) to simulate
9 #the traffic collected at ISI/USC gateway link. To execute it,
10 #assuming you already have ns installed in your system, type
11 #"ns isiweb.tcl" from the command line. It takes ~1 hour on a
12 #Red Hat Linux 7.0 Pentium II Xeon 450 MHz PC with 1GB physical
13 #memory.
14 #
15
16 ns isigen.tcl > sim.log
17
18 #
19 # the set of tcl/awk/perl scripts are used to
20 # compute the time series of traffic size for
21 # both inbound and outbound ISI traffic from
22 # the output of ns. The resulted time series
23 # isi.time (inbound traffic) and www.time
24 # (outbound traffic) can further be used to perform
25 # wavelet scaling analysis
26 #
27
28 awk -f filter.awk < isi.in > in.time
29 awk -f filter.awk < isi.out > out.time
30 filter.tcl www.in > www.in.time
31 filter.tcl www.out > www.out.time
32 cat in.time out.time | sort -n > isi.merge
33 cat www.in.time www.out.time | sort -n > www.merge
34 cat isi.merge | time-series.pl > isi.time
35 cat www.merge | time-series.pl > www.time
36
37 #
38 # modelCDF is a perl script that are used to
39 # generate, in a CDF format, the following
40 # user-level statistics for further validation of
41 # the model
42 # (a) session inter-arrival
43 # (b) number of pages per session
44 # (c) page inter-arrival
45 # (d) page size
46 # (e) request size
47 # (f) server popularity
48 # The CDF flie is in 3-column format (take pagesize.dat.cdf for example)
49 # 1st column: page size (in KB)
50 # 2nd column: accumulated number of samples
51 # 3rd column: accumulated probability
52 #
53
54 sort -n +2 +5 sim.log > sim.log.sorted
55 modelCDF sim.log.sorted
56