components/proftpd/dtrace/example.d
author Stefan Teleman <stefan.teleman@oracle.com>
Mon, 16 Mar 2015 13:28:51 -0700
changeset 3955 4e310c8109a5
parent 3932 1b7dd68f6aa9
permissions -rw-r--r--
20461144 LIBSTDCXX should have some master test results to compare against 20021138 stdcxx fails to build with studio 12.4 fcs 20460634 NEON should have some master test results to compare against 20460896 OCAML has no tests and no master test results files 19931870 "gmake test" failures for libneon

#!/usr/sbin/dtrace -Zs
/*
 * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
 */

#pragma D option quiet
#pragma D option switchrate=10hz

dtrace:::BEGIN
{
    printf("%-20s %-8s %9s %-5s %-6s %s\n", "CLIENT", "USER", "LAT(us)",
        "DIR", "BYTES", "PATH");
}

ftp*:::transfer-start
{
    self->start = timestamp;
}

ftp*:::transfer-done
/self->start/
{
    this->delta = (timestamp - self->start) / 1000;
    printf("%-20s %-8s %9d %-5s %-6d %s\n", args[0]->ci_remote,
    args[1]->fti_user, this->delta, args[1]->fti_cmd,
    args[1]->fti_nbytes, args[1]->fti_pathname);
    self->start = 0;
}