From owner-freebsd-dtrace@FreeBSD.ORG Wed Dec 3 23:19:59 2014 Return-Path: Delivered-To: freebsd-dtrace@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B08929AD; Wed, 3 Dec 2014 23:19:59 +0000 (UTC) Received: from shxd.cx (unknown [64.201.244.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 98FEDCE8; Wed, 3 Dec 2014 23:19:59 +0000 (UTC) Received: from 50-196-156-133-static.hfc.comcastbusiness.net ([50.196.156.133]:57384 helo=THEMADHATTER) by shxd.cx with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.77 (FreeBSD)) (envelope-from ) id 1XvuG2-000GTE-CP; Tue, 02 Dec 2014 12:41:14 -0800 From: To: Subject: DTrace script to trace processes entering vfs::vop_remove Date: Wed, 3 Dec 2014 15:19:31 -0800 Message-ID: <032e01d00f4f$98a04e20$c9e0ea60$@FreeBSD.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_NextPart_000_032F_01D00F0C.8A7D0E20" X-Mailer: Microsoft Outlook 15.0 Thread-Index: AdAPTofd7PLakoAQSU2gf0OzLHW5aQ== Content-Language: en-us Sender: devin@shxd.cx Cc: 'Devin Teske' , 'Julian Elischer' , freebsd-dtrace@freebsd.org X-BeenThere: freebsd-dtrace@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "A discussion list for developers working on DTrace in FreeBSD." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Dec 2014 23:19:59 -0000 This is a multipart message in MIME format. ------=_NextPart_000_032F_01D00F0C.8A7D0E20 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Hi markj, list, I wrote a script for $work to help me find out "who on Earth keeps deleting files XYZ?" from a particular storage server. Please find attached a copy of watch_vop_remove.d which has the following sample output: 2014 Dec 3 11:58:52 rm[75596]: /tmp/foo -+= 72846 0.0 -bash \-+= 75589 0.0 /bin/bash /usr/home/support/bash_script \-+= 75596 0.0 rm -f /tmp/foo The above sample output was displayed when executing the following shell script: #!/bin/bash touch /tmp/foo rm -f /tmp/foo The output format displayed for each vop_remove() call is as follows: DATE process[PID]: PATH_TO_DELETE -+= GPID UID.GID grandparent_process [arguments (up to 3)] \-+= PPID UID.GID parent_process [arguments (up to 3)] \-+= PID UID.GID process [arguments (up to 3)] NB: Requires "kldload dtraceall" to be performed prior to execution -- Cheers, Devin ------=_NextPart_000_032F_01D00F0C.8A7D0E20 Content-Type: application/octet-stream; name="watch_vop_remove.d" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="watch_vop_remove.d" #!/usr/sbin/dtrace -s=0A= /* -=0A= * Copyright (c) 2014 Devin Teske =0A= * All rights reserved.=0A= * Redistribution and use in source and binary forms, with or without=0A= * modification, are permitted provided that the following conditions=0A= * are met:=0A= * 1. Redistributions of source code must retain the above copyright=0A= * notice, this list of conditions and the following disclaimer.=0A= * 2. Redistributions in binary form must reproduce the above copyright=0A= * notice, this list of conditions and the following disclaimer in the=0A= * documentation and/or other materials provided with the = distribution.=0A= * =0A= * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND=0A= * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE=0A= * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR = PURPOSE=0A= * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE = LIABLE=0A= * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR = CONSEQUENTIAL=0A= * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE = GOODS=0A= * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)=0A= * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, = STRICT=0A= * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY = WAY=0A= * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF=0A= * SUCH DAMAGE.=0A= *=0A= * $Title: dtrace(1) script to log process(es) entering vfs::vop_remove $=0A= */=0A= =0A= #pragma D option quiet=0A= #pragma D option dynvarsize=3D16m=0A= #pragma D option switchrate=3D10hz=0A= =0A= /*********************************************************/=0A= =0A= vfs::vop_remove:entry=0A= {=0A= this->vp =3D (struct vnode *)arg0;=0A= this->ncp =3D &(this->vp->v_cache_dst) !=3D NULL ?=0A= this->vp->v_cache_dst.tqh_first : 0;=0A= this->fi_name =3D args[1] ? (=0A= args[1]->a_cnp !=3D NULL ?=0A= stringof(args[1]->a_cnp->cn_nameptr) : ""=0A= ) : "";=0A= this->mount =3D this->vp->v_mount; /* ptr to vfs we are in */=0A= this->fi_fs =3D this->mount !=3D 0 ?=0A= stringof(this->mount->mnt_stat.f_fstypename) : "";=0A= this->fi_mount =3D this->mount !=3D 0 ?=0A= stringof(this->mount->mnt_stat.f_mntonname) : "";=0A= this->d_name =3D args[0]->v_cache_dd !=3D NULL ?=0A= stringof(args[0]->v_cache_dd->nc_name) : "";=0A= this->ts =3D timestamp;=0A= @c =3D count();=0A= }=0A= =0A= vfs::vop_remove:entry /this->vp =3D=3D 0 || this->fi_fs =3D=3D 0 ||=0A= this->fi_fs =3D=3D "devfs" || this->fi_fs =3D=3D "" ||=0A= this->fi_name =3D=3D ""/=0A= {=0A= this->ncp =3D 0;=0A= }=0A= =0A= /*********************************************************/=0A= =0A= vfs::vop_remove:entry /this->ncp/ /* depth =3D=3D 1 */=0A= {=0A= this->dvp =3D this->ncp->nc_dvp !=3D NULL ? (=0A= &(this->ncp->nc_dvp->v_cache_dst) !=3D NULL ?=0A= this->ncp->nc_dvp->v_cache_dst.tqh_first : 0=0A= ) : 0;=0A= self->depth =3D 0;=0A= self->name[++self->depth] =3D this->dvp !=3D 0 ? (=0A= this->dvp->nc_name !=3D 0 ? stringof(this->dvp->nc_name) : ""=0A= ) : "";=0A= }=0A= =0A= vfs::vop_remove:entry /self->name[1] =3D=3D 0 || this->fi_fs =3D=3D 0 ||=0A= this->fi_fs =3D=3D "devfs" || this->fi_fs =3D=3D "" ||=0A= self->name[1] =3D=3D "/" || self->name[1] =3D=3D ""/=0A= {=0A= this->dvp =3D 0;=0A= }=0A= =0A= /*********************************************************/=0A= =0A= /*=0A= * BEGIN Pathname-depth iterators (copy/paste as many times as-desired)=0A= */=0A= =0A= vfs::vop_remove:entry /this->dvp/ /* depth =3D=3D 2 */=0A= {=0A= this->dvp =3D this->dvp->nc_dvp !=3D NULL ? (=0A= &(this->dvp->nc_dvp->v_cache_dst) !=3D NULL ?=0A= this->dvp->nc_dvp->v_cache_dst.tqh_first : 0=0A= ) : 0;=0A= self->name[++self->depth] =3D this->dvp !=3D 0 ? (=0A= this->dvp->nc_name !=3D 0 ? stringof(this->dvp->nc_name) : ""=0A= ) : "";=0A= }=0A= =0A= vfs::vop_remove:entry /this->dvp/ /* depth =3D=3D 3 */=0A= {=0A= this->dvp =3D this->dvp->nc_dvp !=3D NULL ? (=0A= &(this->dvp->nc_dvp->v_cache_dst) !=3D NULL ?=0A= this->dvp->nc_dvp->v_cache_dst.tqh_first : 0=0A= ) : 0;=0A= self->name[++self->depth] =3D this->dvp !=3D 0 ? (=0A= this->dvp->nc_name !=3D 0 ? stringof(this->dvp->nc_name) : ""=0A= ) : "";=0A= }=0A= =0A= vfs::vop_remove:entry /this->dvp/ /* depth =3D=3D 4 */=0A= {=0A= this->dvp =3D this->dvp->nc_dvp !=3D NULL ? (=0A= &(this->dvp->nc_dvp->v_cache_dst) !=3D NULL ?=0A= this->dvp->nc_dvp->v_cache_dst.tqh_first : 0=0A= ) : 0;=0A= self->name[++self->depth] =3D this->dvp !=3D 0 ? (=0A= this->dvp->nc_name !=3D 0 ? stringof(this->dvp->nc_name) : ""=0A= ) : "";=0A= }=0A= =0A= vfs::vop_remove:entry /this->dvp/ /* depth =3D=3D 5 */=0A= {=0A= this->dvp =3D this->dvp->nc_dvp !=3D NULL ? (=0A= &(this->dvp->nc_dvp->v_cache_dst) !=3D NULL ?=0A= this->dvp->nc_dvp->v_cache_dst.tqh_first : 0=0A= ) : 0;=0A= self->name[++self->depth] =3D this->dvp !=3D 0 ? (=0A= this->dvp->nc_name !=3D 0 ? stringof(this->dvp->nc_name) : ""=0A= ) : "";=0A= }=0A= =0A= vfs::vop_remove:entry /this->dvp/ /* depth =3D=3D 6 */=0A= {=0A= this->dvp =3D this->dvp->nc_dvp !=3D NULL ? (=0A= &(this->dvp->nc_dvp->v_cache_dst) !=3D NULL ?=0A= this->dvp->nc_dvp->v_cache_dst.tqh_first : 0=0A= ) : 0;=0A= self->name[++self->depth] =3D this->dvp !=3D 0 ? (=0A= this->dvp->nc_name !=3D 0 ? stringof(this->dvp->nc_name) : ""=0A= ) : "";=0A= }=0A= =0A= vfs::vop_remove:entry /this->dvp/ /* depth =3D=3D 7 */=0A= {=0A= this->dvp =3D this->dvp->nc_dvp !=3D NULL ? (=0A= &(this->dvp->nc_dvp->v_cache_dst) !=3D NULL ?=0A= this->dvp->nc_dvp->v_cache_dst.tqh_first : 0=0A= ) : 0;=0A= self->name[++self->depth] =3D this->dvp !=3D 0 ? (=0A= this->dvp->nc_name !=3D 0 ? stringof(this->dvp->nc_name) : ""=0A= ) : "";=0A= }=0A= =0A= vfs::vop_remove:entry /this->dvp/ /* depth =3D=3D 8 */=0A= {=0A= this->dvp =3D this->dvp->nc_dvp !=3D NULL ? (=0A= &(this->dvp->nc_dvp->v_cache_dst) !=3D NULL ?=0A= this->dvp->nc_dvp->v_cache_dst.tqh_first : 0=0A= ) : 0;=0A= self->name[++self->depth] =3D this->dvp !=3D 0 ? (=0A= this->dvp->nc_name !=3D 0 ? stringof(this->dvp->nc_name) : ""=0A= ) : "";=0A= }=0A= =0A= vfs::vop_remove:entry /this->dvp/ /* depth =3D=3D 9 */=0A= {=0A= this->dvp =3D this->dvp->nc_dvp !=3D NULL ? (=0A= &(this->dvp->nc_dvp->v_cache_dst) !=3D NULL ?=0A= this->dvp->nc_dvp->v_cache_dst.tqh_first : 0=0A= ) : 0;=0A= self->name[++self->depth] =3D this->dvp !=3D 0 ? (=0A= this->dvp->nc_name !=3D 0 ? stringof(this->dvp->nc_name) : ""=0A= ) : "";=0A= }=0A= =0A= vfs::vop_remove:entry /this->dvp/ /* depth =3D=3D 10 */=0A= {=0A= this->dvp =3D this->dvp->nc_dvp !=3D NULL ? (=0A= &(this->dvp->nc_dvp->v_cache_dst) !=3D NULL ?=0A= this->dvp->nc_dvp->v_cache_dst.tqh_first : 0=0A= ) : 0;=0A= self->name[++self->depth] =3D this->dvp !=3D 0 ? (=0A= this->dvp->nc_name !=3D 0 ? stringof(this->dvp->nc_name) : ""=0A= ) : "";=0A= }=0A= =0A= vfs::vop_remove:entry /this->dvp/ /* depth =3D=3D 11 */=0A= {=0A= this->dvp =3D this->dvp->nc_dvp !=3D NULL ? (=0A= &(this->dvp->nc_dvp->v_cache_dst) !=3D NULL ?=0A= this->dvp->nc_dvp->v_cache_dst.tqh_first : 0=0A= ) : 0;=0A= self->name[++self->depth] =3D this->dvp !=3D 0 ? (=0A= this->dvp->nc_name !=3D 0 ? stringof(this->dvp->nc_name) : ""=0A= ) : "";=0A= }=0A= =0A= vfs::vop_remove:entry /this->dvp/ /* depth =3D=3D 12 */=0A= {=0A= this->dvp =3D this->dvp->nc_dvp !=3D NULL ? (=0A= &(this->dvp->nc_dvp->v_cache_dst) !=3D NULL ?=0A= this->dvp->nc_dvp->v_cache_dst.tqh_first : 0=0A= ) : 0;=0A= self->name[++self->depth] =3D this->dvp !=3D 0 ? (=0A= this->dvp->nc_name !=3D 0 ? stringof(this->dvp->nc_name) : ""=0A= ) : "";=0A= }=0A= =0A= vfs::vop_remove:entry /this->dvp/ /* depth =3D=3D 13 */=0A= {=0A= this->dvp =3D this->dvp->nc_dvp !=3D NULL ? (=0A= &(this->dvp->nc_dvp->v_cache_dst) !=3D NULL ?=0A= this->dvp->nc_dvp->v_cache_dst.tqh_first : 0=0A= ) : 0;=0A= self->name[++self->depth] =3D this->dvp !=3D 0 ? (=0A= this->dvp->nc_name !=3D 0 ? stringof(this->dvp->nc_name) : ""=0A= ) : "";=0A= }=0A= =0A= vfs::vop_remove:entry /this->dvp/ /* depth =3D=3D 14 */=0A= {=0A= this->dvp =3D this->dvp->nc_dvp !=3D NULL ? (=0A= &(this->dvp->nc_dvp->v_cache_dst) !=3D NULL ?=0A= this->dvp->nc_dvp->v_cache_dst.tqh_first : 0=0A= ) : 0;=0A= self->name[++self->depth] =3D this->dvp !=3D 0 ? (=0A= this->dvp->nc_name !=3D 0 ? stringof(this->dvp->nc_name) : ""=0A= ) : "";=0A= }=0A= =0A= vfs::vop_remove:entry /this->dvp/ /* depth =3D=3D 15 */=0A= {=0A= this->dvp =3D this->dvp->nc_dvp !=3D NULL ? (=0A= &(this->dvp->nc_dvp->v_cache_dst) !=3D NULL ?=0A= this->dvp->nc_dvp->v_cache_dst.tqh_first : 0=0A= ) : 0;=0A= self->name[++self->depth] =3D this->dvp !=3D 0 ? (=0A= this->dvp->nc_name !=3D 0 ? stringof(this->dvp->nc_name) : ""=0A= ) : "";=0A= }=0A= =0A= vfs::vop_remove:entry /this->dvp/ /* depth =3D=3D 16 */=0A= {=0A= this->dvp =3D this->dvp->nc_dvp !=3D NULL ? (=0A= &(this->dvp->nc_dvp->v_cache_dst) !=3D NULL ?=0A= this->dvp->nc_dvp->v_cache_dst.tqh_first : 0=0A= ) : 0;=0A= self->name[++self->depth] =3D this->dvp !=3D 0 ? (=0A= this->dvp->nc_name !=3D 0 ? stringof(this->dvp->nc_name) : ""=0A= ) : "";=0A= }=0A= =0A= vfs::vop_remove:entry /this->dvp/ /* depth =3D=3D 17 */=0A= {=0A= this->dvp =3D this->dvp->nc_dvp !=3D NULL ? (=0A= &(this->dvp->nc_dvp->v_cache_dst) !=3D NULL ?=0A= this->dvp->nc_dvp->v_cache_dst.tqh_first : 0=0A= ) : 0;=0A= self->name[++self->depth] =3D this->dvp !=3D 0 ? (=0A= this->dvp->nc_name !=3D 0 ? stringof(this->dvp->nc_name) : ""=0A= ) : "";=0A= }=0A= =0A= vfs::vop_remove:entry /this->dvp/ /* depth =3D=3D 18 */=0A= {=0A= this->dvp =3D this->dvp->nc_dvp !=3D NULL ? (=0A= &(this->dvp->nc_dvp->v_cache_dst) !=3D NULL ?=0A= this->dvp->nc_dvp->v_cache_dst.tqh_first : 0=0A= ) : 0;=0A= self->name[++self->depth] =3D this->dvp !=3D 0 ? (=0A= this->dvp->nc_name !=3D 0 ? stringof(this->dvp->nc_name) : ""=0A= ) : "";=0A= }=0A= =0A= vfs::vop_remove:entry /this->dvp/ /* depth =3D=3D 19 */=0A= {=0A= this->dvp =3D this->dvp->nc_dvp !=3D NULL ? (=0A= &(this->dvp->nc_dvp->v_cache_dst) !=3D NULL ?=0A= this->dvp->nc_dvp->v_cache_dst.tqh_first : 0=0A= ) : 0;=0A= self->name[++self->depth] =3D this->dvp !=3D 0 ? (=0A= this->dvp->nc_name !=3D 0 ? stringof(this->dvp->nc_name) : ""=0A= ) : "";=0A= }=0A= =0A= vfs::vop_remove:entry /this->dvp/ /* depth =3D=3D 20 */=0A= {=0A= this->dvp =3D this->dvp->nc_dvp !=3D NULL ? (=0A= &(this->dvp->nc_dvp->v_cache_dst) !=3D NULL ?=0A= this->dvp->nc_dvp->v_cache_dst.tqh_first : 0=0A= ) : 0;=0A= self->name[++self->depth] =3D this->dvp !=3D 0 ? (=0A= this->dvp->nc_name !=3D 0 ? stringof(this->dvp->nc_name) : ""=0A= ) : "";=0A= }=0A= =0A= /*=0A= * END Pathname-depth iterators=0A= */=0A= =0A= /*********************************************************/=0A= =0A= vfs::vop_remove:entry /this->fi_mount !=3D 0/=0A= {=0A= printf("%Y %s[%d]: ", timestamp + 1406598400000000000, execname, pid);=0A= =0A= /*=0A= * Print full path of file to delete=0A= * NB: Up-to but not including the parent directory (printed below)=0A= */=0A= printf("%s%s", this->fi_mount, this->fi_mount !=3D 0 ? (=0A= this->fi_mount =3D=3D "/" ? "" : "/"=0A= ) : "/");=0A= name =3D self->name[self->depth--]; /* 20 */=0A= printf("%s%s", name, name !=3D "" ? "/" : "");=0A= name =3D self->name[self->depth--]; /* 19 */=0A= printf("%s%s", name, name !=3D "" ? "/" : "");=0A= name =3D self->name[self->depth--]; /* 18 */=0A= printf("%s%s", name, name !=3D "" ? "/" : "");=0A= name =3D self->name[self->depth--]; /* 17 */=0A= printf("%s%s", name, name !=3D "" ? "/" : "");=0A= name =3D self->name[self->depth--]; /* 16 */=0A= printf("%s%s", name, name !=3D "" ? "/" : "");=0A= name =3D self->name[self->depth--]; /* 15 */=0A= printf("%s%s", name, name !=3D "" ? "/" : "");=0A= name =3D self->name[self->depth--]; /* 14 */=0A= printf("%s%s", name, name !=3D "" ? "/" : "");=0A= name =3D self->name[self->depth--]; /* 13 */=0A= printf("%s%s", name, name !=3D "" ? "/" : "");=0A= name =3D self->name[self->depth--]; /* 12 */=0A= printf("%s%s", name, name !=3D "" ? "/" : "");=0A= name =3D self->name[self->depth--]; /* 11 */=0A= printf("%s%s", name, name !=3D "" ? "/" : "");=0A= name =3D self->name[self->depth--]; /* 10 */=0A= printf("%s%s", name, name !=3D "" ? "/" : "");=0A= name =3D self->name[self->depth--]; /* 9 */=0A= printf("%s%s", name, name !=3D "" ? "/" : "");=0A= name =3D self->name[self->depth--]; /* 8 */=0A= printf("%s%s", name, name !=3D "" ? "/" : "");=0A= name =3D self->name[self->depth--]; /* 7 */=0A= printf("%s%s", name, name !=3D "" ? "/" : "");=0A= name =3D self->name[self->depth--]; /* 6 */=0A= printf("%s%s", name, name !=3D "" ? "/" : "");=0A= name =3D self->name[self->depth--]; /* 5 */=0A= printf("%s%s", name, name !=3D "" ? "/" : "");=0A= name =3D self->name[self->depth--]; /* 4 */=0A= printf("%s%s", name, name !=3D "" ? "/" : "");=0A= name =3D self->name[self->depth--]; /* 3 */=0A= printf("%s%s", name, name !=3D "" ? "/" : "");=0A= name =3D self->name[self->depth--]; /* 2 */=0A= printf("%s%s", name, name !=3D "" ? "/" : "");=0A= name =3D self->name[self->depth--]; /* 1 */=0A= printf("%s%s", name, name !=3D "" ? "/" : "");=0A= =0A= /* Print the parent directory name */=0A= printf("%s%s", this->d_name !=3D 0 ? this->d_name : "",=0A= this->d_name !=3D 0 ? "/" : "");=0A= =0A= /* Print the entry name */=0A= printf("%s", this->fi_name !=3D 0 ? this->fi_name : "");=0A= =0A= printf("\n");=0A= =0A= /*=0A= * Examine process, parent process, and grandparent process details=0A= */=0A= =0A= /******************* CURPROC *******************/=0A= =0A= pn =3D 0;=0A= proc =3D curthread->td_proc;=0A= _pid[pn] =3D proc->p_pid;=0A= _uid[pn] =3D proc->p_ucred->cr_uid;=0A= _gid[pn] =3D proc->p_ucred->cr_rgid;=0A= p_args =3D proc->p_args;=0A= ar_length =3D p_args ? p_args->ar_length : 0;=0A= ar_args =3D (char *)(p_args ? p_args->ar_args : 0);=0A= ad =3D 0;=0A= =0A= arg[pn,ad++] =3D ar_length > 0 ? stringof(ar_args) : proc->p_comm;=0A= len =3D ar_length > 0 ? strlen(ar_args) + 1 : 0;=0A= ar_args +=3D len;=0A= ar_length -=3D len;=0A= =0A= arg[pn,ad++] =3D ar_length > 0 ? ar_args : "";=0A= len =3D ar_length > 0 ? strlen(ar_args) + 1 : 0;=0A= ar_args +=3D len;=0A= ar_length -=3D len;=0A= =0A= arg[pn,ad++] =3D ar_length > 0 ? ar_args : "";=0A= len =3D ar_length > 0 ? strlen(ar_args) + 1 : 0;=0A= ar_args +=3D len;=0A= ar_length -=3D len;=0A= =0A= arg[pn,ad++] =3D ar_length > 0 ? ar_args : "";=0A= len =3D ar_length > 0 ? strlen(ar_args) + 1 : 0;=0A= ar_args +=3D len;=0A= ar_length -=3D len;=0A= =0A= arg[pn,ad++] =3D ar_length > 0 ? "..." : "";=0A= =0A= /******************* PPARENT *******************/=0A= =0A= pn++;=0A= proc =3D proc->p_pptr;=0A= _pid[pn] =3D proc->p_pid;=0A= _uid[pn] =3D proc->p_ucred->cr_uid;=0A= _gid[pn] =3D proc->p_ucred->cr_rgid;=0A= p_args =3D proc ? proc->p_args : 0;=0A= ar_length =3D p_args ? p_args->ar_length : 0;=0A= ar_args =3D (char *)(p_args ? p_args->ar_args : 0);=0A= ad =3D 0;=0A= offset =3D 0;=0A= =0A= arg[pn,ad++] =3D ar_length > 0 ? ar_args : proc->p_comm;=0A= len =3D ar_length > 0 ? strlen(ar_args) + 1 : 0;=0A= ar_args +=3D len;=0A= ar_length -=3D len;=0A= =0A= arg[pn,ad++] =3D ar_length > 0 ? ar_args : "";=0A= len =3D ar_length > 0 ? strlen(ar_args) + 1 : 0;=0A= ar_args +=3D len;=0A= ar_length -=3D len;=0A= =0A= arg[pn,ad++] =3D ar_length > 0 ? ar_args : "";=0A= len =3D ar_length > 0 ? strlen(ar_args) + 1 : 0;=0A= ar_args +=3D len;=0A= ar_length -=3D len;=0A= =0A= arg[pn,ad++] =3D ar_length > 0 ? ar_args : "";=0A= len =3D ar_length > 0 ? strlen(ar_args) + 1 : 0;=0A= ar_args +=3D len;=0A= ar_length -=3D len;=0A= =0A= arg[pn,ad++] =3D ar_length > 0 ? "..." : "";=0A= =0A= /******************* GPARENT *******************/=0A= =0A= pn++;=0A= proc =3D proc->p_pptr;=0A= _pid[pn] =3D proc->p_pid;=0A= _uid[pn] =3D proc->p_ucred->cr_uid;=0A= _gid[pn] =3D proc->p_ucred->cr_rgid;=0A= p_args =3D proc ? proc->p_args : 0;=0A= ar_length =3D p_args ? p_args->ar_length : 0;=0A= ar_args =3D (char *)(p_args ? p_args->ar_args : 0);=0A= ad =3D 0;=0A= offset =3D 0;=0A= =0A= arg[pn,ad++] =3D ar_length > 0 ? ar_args : proc->p_comm;=0A= len =3D ar_length > 0 ? strlen(ar_args) + 1 : 0;=0A= ar_args +=3D len;=0A= ar_length -=3D len;=0A= =0A= arg[pn,ad++] =3D ar_length > 0 ? ar_args : "";=0A= len =3D ar_length > 0 ? strlen(ar_args) + 1 : 0;=0A= ar_args +=3D len;=0A= ar_length -=3D len;=0A= =0A= arg[pn,ad++] =3D ar_length > 0 ? ar_args : "";=0A= len =3D ar_length > 0 ? strlen(ar_args) + 1 : 0;=0A= ar_args +=3D len;=0A= ar_length -=3D len;=0A= =0A= arg[pn,ad++] =3D ar_length > 0 ? ar_args : "";=0A= len =3D ar_length > 0 ? strlen(ar_args) + 1 : 0;=0A= ar_args +=3D len;=0A= ar_length -=3D len;=0A= =0A= arg[pn,ad++] =3D ar_length > 0 ? "..." : "";=0A= =0A= /***********************************************/=0A= =0A= /*=0A= * Print process, parent, and grandparent details=0A= */=0A= =0A= printf(" -+=3D %05d %d.%d %s", _pid[pn], _uid[pn], _gid[pn], arg[pn,0]);=0A= printf("%s%s", arg[pn,1] !=3D "" ? " " : "", arg[pn,1]);=0A= printf("%s%s", arg[pn,2] !=3D "" ? " " : "", arg[pn,2]);=0A= printf("%s%s", arg[pn,3] !=3D "" ? " " : "", arg[pn,3]);=0A= printf("%s%s", arg[pn,4] !=3D "" ? " " : "", arg[pn,4]);=0A= printf("%s", arg[pn,0] !=3D "" ? "\n" : "");=0A= =0A= pn--;=0A= printf(" \-+=3D %05d %d.%d %s",=0A= _pid[pn], _uid[pn], _gid[pn], arg[pn,0]);=0A= printf("%s%s", arg[pn,1] !=3D "" ? " " : "", arg[pn,1]);=0A= printf("%s%s", arg[pn,2] !=3D "" ? " " : "", arg[pn,2]);=0A= printf("%s%s", arg[pn,3] !=3D "" ? " " : "", arg[pn,3]);=0A= printf("%s%s", arg[pn,4] !=3D "" ? " " : "", arg[pn,4]);=0A= printf("%s", arg[pn,0] !=3D "" ? "\n" : "");=0A= =0A= pn--;=0A= printf(" \-+=3D %05d %d.%d %s",=0A= _pid[pn], _uid[pn], _gid[pn], arg[pn,0]);=0A= printf("%s%s", arg[pn,1] !=3D "" ? " " : "", arg[pn,1]);=0A= printf("%s%s", arg[pn,2] !=3D "" ? " " : "", arg[pn,2]);=0A= printf("%s%s", arg[pn,3] !=3D "" ? " " : "", arg[pn,3]);=0A= printf("%s%s", arg[pn,4] !=3D "" ? " " : "", arg[pn,4]);=0A= printf("%s", arg[pn,0] !=3D "" ? "\n" : "");=0A= }=0A= =0A= /*********************************************************/=0A= =0A= vfs::vop_remove:entry=0A= {=0A= self->name[self->depth++] =3D 0;=0A= self->name[2] =3D 0;=0A= self->name[3] =3D 0;=0A= self->name[4] =3D 0;=0A= self->name[5] =3D 0;=0A= self->name[6] =3D 0;=0A= self->name[7] =3D 0;=0A= self->name[8] =3D 0;=0A= self->name[9] =3D 0;=0A= self->name[10] =3D 0;=0A= self->name[11] =3D 0;=0A= self->name[12] =3D 0;=0A= self->name[13] =3D 0;=0A= self->name[14] =3D 0;=0A= self->name[15] =3D 0;=0A= self->name[16] =3D 0;=0A= self->name[17] =3D 0;=0A= self->name[18] =3D 0;=0A= self->name[19] =3D 0;=0A= self->name[20] =3D 0;=0A= self->depth =3D 0;=0A= }=0A= ------=_NextPart_000_032F_01D00F0C.8A7D0E20--