summaryrefslogtreecommitdiffstats
path: root/nfsd-probes.stp
blob: 53c0d0b706fb18bed5e979b6da93e94a7ffa5229 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
probe nfsd.dispatch {
	printf("%s: ip %s proto %d vers %d\n", name, client_ip, proto, version);
	printf("%s: xid %d prog %d proc %d\n", name, xid, prog, proc);
}
probe nfsd.dispatch.return {
	if ($return)
		printf("%s: %s\n", name, retstr);
}
probe nfsd.proc2.lookup {
	printf("%s: ip %s proto %d fh 0x%x filename %s\n", 
	name, client_ip, proto, fh, filename);
}
probe nfsd.proc3.lookup {
	printf("%s: ip %s proto %d fh 0x%x filename %s\n", 
	name, client_ip, proto, fh, filename);
}
%( kernel_v >= "2.6.25" %?
probe nfsd.proc4.lookup {
	printf("%s: ip %s proto %d fh 0x%x filename %s\n", 
	name, client_ip, proto, fh, filename);
}
%)
probe nfsd.proc.lookup.return {
	if ($return)
		printf("%s: %s\n", name, retstr);
}
probe nfsd.proc2.read {
	printf("%s: ip %s proto %d fh 0x%x count %d offset %d vec 0x%x vlen %d\n", 
	name, client_ip, proto, fh, count, offset, vec, vlen);
}
probe nfsd.proc3.read {
	printf("%s: ip %s proto %d fh 0x%x count %d offset %d vec 0x%x vlen %d\n", 
	name, client_ip, proto, fh, count, offset, vec, vlen);
}
%( kernel_v >= "2.6.25" %?
probe nfsd.proc4.read {
	printf("%s: ip %s proto %d fh 0x%x count %d offset %d vec 0x%x\n", 
	name, client_ip, proto, fh, count, offset, vec);
}
%)
probe nfsd.proc.read.return {
	if ($return)
		printf("%s: %s\n", name, retstr);
}
probe nfsd.proc2.write {
	printf("%s: ip %s proto %d fh 0x%x count %d offset %d vlen %d\n", 
	name, client_ip, proto, fh, count, offset, vlen);
}
probe nfsd.proc3.write {
	printf("%s: ip %s proto %d fh 0x%x count %d offset %d vlen %d stable %d\n", 
	name, client_ip, proto, fh, count, offset, vlen, stable);
}
%( kernel_v >= "2.6.25" %?
probe nfsd.proc4.write {
	printf("%s: ip %s proto %d fh 0x%x count %d offset %d vlen %d stable %d\n", 
	name, client_ip, proto, fh, count, offset, vlen, stable);
}
%)
probe nfsd.proc2.write.return {
	if ($return)
		printf("%s: %s\n", name, retstr);
}
probe nfsd.proc3.write.return {
	printf("%s: count %d stable %d\n", name, count, stable);
	if ($return)
		printf("%s: %s\n", name, retstr);
}
%( kernel_v >= "2.6.25" %?
probe nfsd.proc4.write.return {
	printf("%s: count %d stable %d\n", name, count, stable);
	if ($return)
		printf("%s: %s\n", name, retstr);
}
%)
probe nfsd.proc3.commit {
	printf("%s: ip %s proto %d fh 0x%x count %d offset %d\n",
	name, client_ip, proto, fh, count, offset);
}
%( kernel_v >= "2.6.25" %?
probe nfsd.proc4.commit {
	printf("%s: ip %s proto %d fh 0x%x count %d offset %d\n",
	name, client_ip, proto, fh, count, offset);
}
%)
probe nfsd.proc.commit.return {
	if ($return)
		printf("%s: %s\n", name, retstr);
}
probe nfsd.proc2.create {
	printf("%s: ip %s %s\n", name, client_ip, filename);
}
probe nfsd.proc3.create {
	printf("%s: ip %s %s\n", name, client_ip, filename);
}
%( kernel_v >= "2.6.25" %?
probe nfsd.proc4.create {
	printf("%s: ip %s %s\n", name, client_ip, filename);
}
%)
probe nfsd.proc.create.return {
	if ($return)
		printf("%s: %s\n", name, retstr);
}
probe nfsd.proc2.remove {
	printf("%s: ip %s %s\n", name, client_ip, filename);
}
probe nfsd.proc3.remove {
	printf("%s: ip %s %s\n", name, client_ip, filename);
}
%( kernel_v >= "2.6.25" %?
probe nfsd.proc4.remove {
	printf("%s: ip %s %s\n", name, client_ip, filename);
}
%)
probe nfsd.proc.remove.return {
	if ($return)
		printf("%s: %s\n", name, retstr);
}
probe nfsd.proc2.rename {
	printf("%s: ip %s %s to %s\n", name, client_ip, filename, tname);
}
probe nfsd.proc3.rename {
	printf("%s: ip %s %s to %s\n", name, client_ip, filename, tname);
}
%( kernel_v >= "2.6.25" %?
probe nfsd.proc4.rename {
	printf("%s: ip %s %s to %s\n", name, client_ip, filename, tname);
}
%)
probe nfsd.proc.rename.return {
	if ($return)
		printf("%s: %s\n", name, retstr);
}
probe nfsd.proc.entries {
	printf("%s:\n", name);
}
probe nfsd.proc.return {
	printf("%s: %s %d\n", name, retstr, $return);
}
probe nfsd.entries {
	printf("%s: ip %s %s\n", name, client_ip, argstr);
}
probe nfsd.return {
	if ($return)
		printf("%s: ip %s %s\n", client_ip, name, retstr);
}
probe begin { log("Starting NFS server probes") }
probe end { log("Ending NFS server probes") }