Whamcloud - gitweb
- ext2_obd.c --- fix the bugs in read/write for Linux 2.4.3
[fs/lustre-release.git] / lustre / scripts / obdtrace_demo.scr
1 # Copyright (C) 2001  Cluster File Systems, Inc.
2 #
3 # This code is issued under the GNU General Public License.
4 # See the file COPYING in this distribution
5 # Print OS version
6 shell uname -r
7 # Insert Lustre kernel modules
8 insmod class/obdclass.o
9 procsys trace 0
10 procsys debug 0
11 insmod ext2obd/obdext2.o
12 insmod obdtrace/obdtrace.o
13 insmod obdfs/obdfs.o
14 # Configure direct driver on /dev/obd0
15 device /dev/obd0
16 attach obdext2
17 setup /dev/sda2
18 # Configure obdtrace on /dev/obd1
19 device /dev/obd1
20 attach obdtrace
21 setup /dev/obd0
22 # What's the obd status
23 status
24 shell cat /proc/lustre/obd/1/stats
25 # mount obd file system
26 shell mkdir -p /mnt/obd
27 shell mount -t obdfs -odevice=/dev/obd1 none /mnt/obd
28 shell mount
29 # Prepare a data set (tar file of current directory)
30 shell rm -f /tmp/obdtrace_test.tar
31 shell tar cf /tmp/obdtrace_test.tar .
32 # make a directory on obd device
33 shell mkdir -p /mnt/obd/obdtrace_test_dir
34 # Unpack tarfile to obd device 
35 shell tar -C /mnt/obd/obdtrace_test_dir -xf /tmp/obdtrace_test.tar
36 shell rm -rf /mnt/obd/obdtrace_test_dir
37 # Check obdtrace performance stats
38 status
39 shell cat /proc/lustre/obd/1/stats
40 shell echo 0 >  /proc/lustre/obd/1/stats
41 shell cat /proc/lustre/obd/1/stats
42 # Umount file system
43 shell umount /mnt/obd
44 # Cleanup /tmp
45 shell rm -f /tmp/obdtrace_test.tar
46 # Dismantle /dev/obd1
47 device /dev/obd1
48 cleanup
49 detach
50 close
51 # Dismantle /dev/obd0
52 device /dev/obd0
53 cleanup
54 detach
55 close
56 # Remove all loaded kernel modules
57 rmmod obdfs
58 rmmod obdtrace
59 rmmod obdext2
60 rmmod obdclass