Print this page
11083 support NFS server in zone
Portions contributed by: Dan Kruchinin <dan.kruchinin@nexenta.com>
Portions contributed by: Stepan Zastupov <stepan.zastupov@gmail.com>
Portions contributed by: Joyce McIntosh <joyce.mcintosh@nexenta.com>
Portions contributed by: Mike Zeller <mike@mikezeller.net>
Portions contributed by: Dan McDonald <danmcd@joyent.com>
Portions contributed by: Gordon Ross <gordon.w.ross@gmail.com>
Portions contributed by: Vitaliy Gusev <gusev.vitaliy@gmail.com>
Reviewed by: Rick McNeal <rick.mcneal@nexenta.com>
Reviewed by: Rob Gittins <rob.gittins@nexenta.com>
Reviewed by: Sanjay Nadkarni <sanjay.nadkarni@nexenta.com>
Reviewed by: Jason King <jbk@joyent.com>
Reviewed by: C Fraire <cfraire@me.com>
Change-Id: I22f289d357503f9b48a0bc2482cc4328a6d43d16
| Split |
Close |
| Expand all |
| Collapse all |
--- old/usr/src/cmd/smbsrv/dtrace/smb-trace.d
+++ new/usr/src/cmd/smbsrv/dtrace/smb-trace.d
1 +#!/usr/sbin/dtrace -s
1 2 /*
2 3 * This file and its contents are supplied under the terms of the
3 4 * Common Development and Distribution License ("CDDL"), version 1.0.
4 5 * You may only use this file in accordance with the terms of version
5 6 * 1.0 of the CDDL.
6 7 *
7 8 * A full copy of the text of the CDDL should have accompanied this
8 9 * source. A copy of the CDDL is also available via the Internet at
9 10 * http://www.illumos.org/license/CDDL.
10 11 */
11 12
12 13 /*
13 - * Copyright 2017 Nexenta Systems, Inc. All rights reserved.
14 + * Copyright 2018 Nexenta Systems, Inc. All rights reserved.
14 15 */
15 16
16 17 /*
17 18 * Example using the "smb" dtrace provider.
18 19 * Traces all SMB commands.
19 20 *
20 21 * All these probes provide:
21 22 * args[0] conninfo_t
22 23 * args[1] smbopinfo_t
23 24 * Some also provide one of: (not used here)
24 25 * args[2] smb_name_args_t
25 26 * args[2] smb_open_args_t
26 27 * args[2] smb_rw_args_t
28 + *
29 + * Usage: smb-trace.d [<client ip>|all [<share path>|all] [<zone id>]]]
30 + *
31 + * example: smb_trace.d 192.168.012.001 mypool_fs1 0
32 + *
33 + * It is valid to specify <client ip> or <share path> as "all" to
34 + * print data for all clients and/or all shares.
35 + * Omitting <zone id> will print data for all zones.
27 36 */
28 37
38 +#pragma D option defaultargs
39 +
40 +dtrace:::BEGIN
41 +{
42 + all_clients = (($$1 == NULL) || ($$1 == "all")) ? 1 : 0;
43 + all_shares = (($$2 == NULL) || ($$2 == "all")) ? 1 : 0;
44 + all_zones = ($$3 == NULL) ? 1 : 0;
45 +
46 + client = $$1;
47 + share = $$2;
48 + zoneid = $3;
49 +
50 + printf("%Y - client=%s share=%s zone=%s)\n", walltimestamp,
51 + (all_clients) ? "all" : client,
52 + (all_shares) ? "all" : share,
53 + (all_zones) ? "all" : $$3);
54 +}
55 +
29 56 smb:::op-*-start
57 +/ ((all_clients) || (args[0]->ci_remote == client)) &&
58 + ((all_shares) || (args[1]->soi_share == share)) &&
59 + ((all_zones) || (args[1]->soi_zoneid == zoneid)) /
30 60 {
31 61 printf("clnt=%s mid=0x%x uid=0x%x tid=0x%x\n",
32 62 args[0]->ci_remote,
33 63 args[1]->soi_mid,
34 64 args[1]->soi_uid,
35 65 args[1]->soi_tid);
36 66 }
37 67
38 68 smb:::op-*-done
69 +/ ((all_clients) || (args[0]->ci_remote == client)) &&
70 + ((all_shares) || (args[1]->soi_share == share)) &&
71 + ((all_zones) || (args[1]->soi_zoneid == zoneid)) /
39 72 {
40 73 printf("clnt=%s mid=0x%x status=0x%x\n",
41 74 args[0]->ci_remote,
42 75 args[1]->soi_mid,
43 76 args[1]->soi_status);
77 +}
78 +
79 +dtrace:::END
80 +{
44 81 }
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX