head	1.4;
access;
symbols
	perseant-exfatfs-base-20250801:1.4
	perseant-exfatfs-base-20240630:1.4
	perseant-exfatfs:1.4.0.10
	perseant-exfatfs-base:1.4
	netbsd-8-3-RELEASE:1.1
	netbsd-9-4-RELEASE:1.1
	bouyer-sunxi-drm:1.4.0.8
	bouyer-sunxi-drm-base:1.4
	netbsd-9-3-RELEASE:1.1
	cjep_sun2x:1.4.0.6
	cjep_sun2x-base:1.4
	cjep_staticlib_x-base1:1.4
	netbsd-9-2-RELEASE:1.1
	cjep_staticlib_x:1.4.0.4
	cjep_staticlib_x-base:1.4
	thorpej-futex-base:1.4
	netbsd-9-1-RELEASE:1.1
	bouyer-xenpvh-base2:1.4
	phil-wifi-20200421:1.4
	bouyer-xenpvh-base1:1.4
	phil-wifi-20200411:1.4
	bouyer-xenpvh:1.4.0.2
	bouyer-xenpvh-base:1.4
	phil-wifi-20200406:1.4
	netbsd-8-2-RELEASE:1.1
	ad-namecache-base3:1.4
	netbsd-9-0-RELEASE:1.1
	netbsd-9-0-RC2:1.1
	ad-namecache-base2:1.4
	ad-namecache-base1:1.3
	ad-namecache:1.3.0.2
	ad-namecache-base:1.3
	netbsd-9-0-RC1:1.1
	phil-wifi-20191119:1.1
	netbsd-9:1.1.0.72
	netbsd-9-base:1.1
	phil-wifi-20190609:1.1
	netbsd-8-1-RELEASE:1.1
	netbsd-8-1-RC1:1.1
	isaki-audio2:1.1.0.70
	isaki-audio2-base:1.1
	pgoyette-compat-merge-20190127:1.1
	pgoyette-compat-20190127:1.1
	pgoyette-compat-20190118:1.1
	pgoyette-compat-1226:1.1
	pgoyette-compat-1126:1.1
	pgoyette-compat-1020:1.1
	pgoyette-compat-0930:1.1
	pgoyette-compat-0906:1.1
	jdolecek-ncqfixes:1.1.0.68
	jdolecek-ncqfixes-base:1.1
	netbsd-7-2-RELEASE:1.1
	pgoyette-compat-0728:1.1
	netbsd-8-0-RELEASE:1.1
	phil-wifi:1.1.0.66
	phil-wifi-base:1.1
	pgoyette-compat-0625:1.1
	netbsd-8-0-RC2:1.1
	pgoyette-compat-0521:1.1
	pgoyette-compat-0502:1.1
	pgoyette-compat-0422:1.1
	netbsd-8-0-RC1:1.1
	pgoyette-compat-0415:1.1
	pgoyette-compat-0407:1.1
	pgoyette-compat-0330:1.1
	pgoyette-compat-0322:1.1
	pgoyette-compat-0315:1.1
	netbsd-7-1-2-RELEASE:1.1
	pgoyette-compat:1.1.0.64
	pgoyette-compat-base:1.1
	netbsd-7-1-1-RELEASE:1.1
	tls-maxphys-base-20171202:1.1
	matt-nb8-mediatek:1.1.0.62
	matt-nb8-mediatek-base:1.1
	nick-nhusb-base-20170825:1.1
	perseant-stdc-iso10646:1.1.0.60
	perseant-stdc-iso10646-base:1.1
	netbsd-8:1.1.0.58
	netbsd-8-base:1.1
	prg-localcount2-base3:1.1
	prg-localcount2-base2:1.1
	prg-localcount2-base1:1.1
	prg-localcount2:1.1.0.56
	prg-localcount2-base:1.1
	pgoyette-localcount-20170426:1.1
	bouyer-socketcan-base1:1.1
	jdolecek-ncq:1.1.0.54
	jdolecek-ncq-base:1.1
	pgoyette-localcount-20170320:1.1
	netbsd-7-1:1.1.0.52
	netbsd-7-1-RELEASE:1.1
	netbsd-7-1-RC2:1.1
	nick-nhusb-base-20170204:1.1
	netbsd-7-nhusb-base-20170116:1.1
	bouyer-socketcan:1.1.0.50
	bouyer-socketcan-base:1.1
	pgoyette-localcount-20170107:1.1
	netbsd-7-1-RC1:1.1
	nick-nhusb-base-20161204:1.1
	pgoyette-localcount-20161104:1.1
	netbsd-7-0-2-RELEASE:1.1
	nick-nhusb-base-20161004:1.1
	localcount-20160914:1.1
	netbsd-7-nhusb:1.1.0.48
	netbsd-7-nhusb-base:1.1
	pgoyette-localcount-20160806:1.1
	pgoyette-localcount-20160726:1.1
	pgoyette-localcount:1.1.0.46
	pgoyette-localcount-base:1.1
	nick-nhusb-base-20160907:1.1
	nick-nhusb-base-20160529:1.1
	netbsd-7-0-1-RELEASE:1.1
	nick-nhusb-base-20160422:1.1
	nick-nhusb-base-20160319:1.1
	nick-nhusb-base-20151226:1.1
	netbsd-7-0:1.1.0.44
	netbsd-7-0-RELEASE:1.1
	nick-nhusb-base-20150921:1.1
	netbsd-7-0-RC3:1.1
	netbsd-7-0-RC2:1.1
	netbsd-7-0-RC1:1.1
	nick-nhusb-base-20150606:1.1
	nick-nhusb-base-20150406:1.1
	nick-nhusb:1.1.0.42
	nick-nhusb-base:1.1
	netbsd-6-0-6-RELEASE:1.1
	netbsd-6-1-5-RELEASE:1.1
	netbsd-7:1.1.0.40
	netbsd-7-base:1.1
	yamt-pagecache-base9:1.1
	yamt-pagecache-tag8:1.1
	netbsd-6-1-4-RELEASE:1.1
	netbsd-6-0-5-RELEASE:1.1
	tls-earlyentropy:1.1.0.38
	tls-earlyentropy-base:1.1
	riastradh-xf86-video-intel-2-7-1-pre-2-21-15:1.1
	riastradh-drm2-base3:1.1
	netbsd-6-1-3-RELEASE:1.1
	netbsd-6-0-4-RELEASE:1.1
	netbsd-6-1-2-RELEASE:1.1
	netbsd-6-0-3-RELEASE:1.1
	rmind-smpnet-nbase:1.1
	netbsd-6-1-1-RELEASE:1.1
	riastradh-drm2-base2:1.1
	riastradh-drm2-base1:1.1
	riastradh-drm2:1.1.0.36
	riastradh-drm2-base:1.1
	rmind-smpnet:1.1.0.28
	rmind-smpnet-base:1.1
	netbsd-6-1:1.1.0.34
	netbsd-6-0-2-RELEASE:1.1
	netbsd-6-1-RELEASE:1.1
	khorben-n900:1.1.0.32
	netbsd-6-1-RC4:1.1
	netbsd-6-1-RC3:1.1
	agc-symver:1.1.0.30
	agc-symver-base:1.1
	netbsd-6-1-RC2:1.1
	netbsd-6-1-RC1:1.1
	yamt-pagecache-base8:1.1
	netbsd-6-0-1-RELEASE:1.1
	yamt-pagecache-base7:1.1
	matt-nb6-plus-nbase:1.1
	yamt-pagecache-base6:1.1
	netbsd-6-0:1.1.0.26
	netbsd-6-0-RELEASE:1.1
	netbsd-6-0-RC2:1.1
	tls-maxphys:1.1.0.24
	tls-maxphys-base:1.1
	matt-nb6-plus:1.1.0.22
	matt-nb6-plus-base:1.1
	netbsd-6-0-RC1:1.1
	jmcneill-usbmp-base10:1.1
	yamt-pagecache-base5:1.1
	jmcneill-usbmp-base9:1.1
	yamt-pagecache-base4:1.1
	jmcneill-usbmp-base8:1.1
	jmcneill-usbmp-base7:1.1
	jmcneill-usbmp-base6:1.1
	jmcneill-usbmp-base5:1.1
	jmcneill-usbmp-base4:1.1
	jmcneill-usbmp-base3:1.1
	jmcneill-usbmp-pre-base2:1.1
	jmcneill-usbmp-base2:1.1
	netbsd-6:1.1.0.20
	netbsd-6-base:1.1
	jmcneill-usbmp:1.1.0.18
	jmcneill-usbmp-base:1.1
	jmcneill-audiomp3:1.1.0.16
	jmcneill-audiomp3-base:1.1
	yamt-pagecache-base3:1.1
	yamt-pagecache-base2:1.1
	yamt-pagecache:1.1.0.14
	yamt-pagecache-base:1.1
	rmind-uvmplock-nbase:1.1
	cherry-xenmp:1.1.0.12
	cherry-xenmp-base:1.1
	rmind-uvmplock-base:1.1
	rmind-uvmplock:1.1.0.10
	bouyer-quota2-nbase:1.1
	bouyer-quota2:1.1.0.8
	bouyer-quota2-base:1.1
	jruoho-x86intr:1.1.0.6
	jruoho-x86intr-base:1.1
	matt-mips64-premerge-20101231:1.1
	uebayasi-xip-base4:1.1
	uebayasi-xip:1.1.0.4
	uebayasi-xip-base3:1.1
	yamt-nfs-mp:1.1.0.2
	yamt-nfs-mp-base11:1.1;
locks; strict;
comment	@# @;


1.4
date	2020.01.19.20.41.19;	author riastradh;	state dead;
branches;
next	1.3;
commitid	NUgQFwlNUzjxhlTB;

1.3
date	2019.12.23.06.45.38;	author maxv;	state Exp;
branches
	1.3.2.1;
next	1.2;
commitid	MNV9eadX2VzGwNPB;

1.2
date	2019.12.18.07.37.18;	author maxv;	state dead;
branches;
next	1.1;
commitid	p344TaOkdu7MX9PB;

1.1
date	2010.09.09.00.10.16;	author sjg;	state Exp;
branches
	1.1.2.1
	1.1.4.1
	1.1.10.1
	1.1.66.1;
next	;

1.3.2.1
date	2020.01.25.22.38.46;	author ad;	state dead;
branches;
next	;
commitid	ethRERRmx7bMJ7UB;

1.1.2.1
date	2010.09.09.00.10.16;	author yamt;	state dead;
branches;
next	1.1.2.2;

1.1.2.2
date	2010.10.09.03.32.05;	author yamt;	state Exp;
branches;
next	;

1.1.4.1
date	2010.09.09.00.10.16;	author uebayasi;	state dead;
branches;
next	1.1.4.2;

1.1.4.2
date	2010.10.22.09.23.13;	author uebayasi;	state Exp;
branches;
next	;

1.1.10.1
date	2010.09.09.00.10.16;	author rmind;	state dead;
branches;
next	1.1.10.2;

1.1.10.2
date	2011.03.05.20.53.08;	author rmind;	state Exp;
branches;
next	;

1.1.66.1
date	2020.04.08.14.08.04;	author martin;	state dead;
branches;
next	;
commitid	Qli2aW9E74UFuA3C;


desc
@@


1.4
log
@Remove filemon(4).

Discussed on tech-kern:
https://mail-index.NetBSD.org/tech-kern/2020/01/13/msg025938.html

This was never (intentionally) enabled by default, and the design has
some shortcomings.  You can get mostly the same results with ktrace,
as in usr.bin/make/filemon/filemon_ktrace.c which is now used instead
of filemon for make's meta mode.

If applications require higher performance than ktrace, or nesting
that ktrace doesn't support, we might consider adding something back
into the vfs system calls themselves, without hijacking the syscall
table.  (Might want a more reliable output format too, e.g. one that
can handle newlines in file names.)
@
text
@#!/bin/sh

# Note that filemon.kmod needs the 6.x version of modload.

Error() {
	echo "ERROR: $@@" >&2; exit 1
}

major=`sysctl kern.drivers | tr ',' '\012' | sed -n '/filemon/s,.*\[\([0-9][0-9]*\).*,\1,p'`

[ ${major:-0} -gt 0 ] || Error filemon not loaded
dev=/dev/filemon

if [ -c $dev ]; then
   x=`'ls' -l $dev`
   case "$x" in
   *" $major,"*) exit 0;;
   esac
   rm -f $dev
fi
mknod -m 666 $dev c $major 0

@


1.3
log
@Revert the removal of filemon.
@
text
@@


1.3.2.1
log
@Sync with head.
@
text
@@


1.2
log
@Retire filemon, discussed on tech-kern@@.
@
text
@@


1.1
log
@First cut of simple syscall wrapper, which make(1) can use
to track process activity.
@
text
@@


1.1.66.1
log
@Merge changes from current as of 20200406
@
text
@@


1.1.10.1
log
@file mknod-sh was added on branch rmind-uvmplock on 2011-03-05 20:53:08 +0000
@
text
@d1 22
@


1.1.10.2
log
@sync with head
@
text
@a0 22
#!/bin/sh

# Note that filemon.kmod needs the 6.x version of modload.

Error() {
	echo "ERROR: $@@" >&2; exit 1
}

major=`sysctl kern.drivers | tr ',' '\012' | sed -n '/filemon/s,.*\[\([0-9][0-9]*\).*,\1,p'`

[ ${major:-0} -gt 0 ] || Error filemon not loaded
dev=/dev/filemon

if [ -c $dev ]; then
   x=`'ls' -l $dev`
   case "$x" in
   *" $major,"*) exit 0;;
   esac
   rm -f $dev
fi
mknod -m 666 $dev c $major 0

@


1.1.4.1
log
@file mknod-sh was added on branch uebayasi-xip on 2010-10-22 09:23:13 +0000
@
text
@d1 22
@


1.1.4.2
log
@Sync with HEAD (-D20101022).
@
text
@a0 22
#!/bin/sh

# Note that filemon.kmod needs the 6.x version of modload.

Error() {
	echo "ERROR: $@@" >&2; exit 1
}

major=`sysctl kern.drivers | tr ',' '\012' | sed -n '/filemon/s,.*\[\([0-9][0-9]*\).*,\1,p'`

[ ${major:-0} -gt 0 ] || Error filemon not loaded
dev=/dev/filemon

if [ -c $dev ]; then
   x=`'ls' -l $dev`
   case "$x" in
   *" $major,"*) exit 0;;
   esac
   rm -f $dev
fi
mknod -m 666 $dev c $major 0

@


1.1.2.1
log
@file mknod-sh was added on branch yamt-nfs-mp on 2010-10-09 03:32:05 +0000
@
text
@d1 22
@


1.1.2.2
log
@sync with head
@
text
@a0 22
#!/bin/sh

# Note that filemon.kmod needs the 6.x version of modload.

Error() {
	echo "ERROR: $@@" >&2; exit 1
}

major=`sysctl kern.drivers | tr ',' '\012' | sed -n '/filemon/s,.*\[\([0-9][0-9]*\).*,\1,p'`

[ ${major:-0} -gt 0 ] || Error filemon not loaded
dev=/dev/filemon

if [ -c $dev ]; then
   x=`'ls' -l $dev`
   case "$x" in
   *" $major,"*) exit 0;;
   esac
   rm -f $dev
fi
mknod -m 666 $dev c $major 0

@


