equal
deleted
inserted
replaced
|
1 #!/usr/sbin/dtrace -Zs |
|
2 /* |
|
3 * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. |
|
4 */ |
|
5 |
|
6 #pragma D option quiet |
|
7 #pragma D option switchrate=10hz |
|
8 |
|
9 dtrace:::BEGIN |
|
10 { |
|
11 printf("%-20s %-8s %9s %-5s %-6s %s\n", "CLIENT", "USER", "LAT(us)", |
|
12 "DIR", "BYTES", "PATH"); |
|
13 } |
|
14 |
|
15 ftp*:::transfer-start |
|
16 { |
|
17 self->start = timestamp; |
|
18 } |
|
19 |
|
20 ftp*:::transfer-done |
|
21 /self->start/ |
|
22 { |
|
23 this->delta = (timestamp - self->start) / 1000; |
|
24 printf("%-20s %-8s %9d %-5s %-6d %s\n", args[0]->ci_remote, |
|
25 args[1]->fti_user, this->delta, args[1]->fti_cmd, |
|
26 args[1]->fti_nbytes, args[1]->fti_pathname); |
|
27 self->start = 0; |
|
28 } |