Commit Graph

27 Commits

Author SHA1 Message Date
Sevan Janiyan
2c71b83533 Add history section for devd(8)
Move sentence to a new line as advised by igor

PR:		212439
Approved by:	bcr (mentor)
MFC after:	5 days
Differential Revision:	https://reviews.freebsd.org/D8104
2016-10-05 20:04:36 +00:00
Alan Somers
cdfa64aaeb Convert devd's client socket to type SOCK_SEQPACKET.
This change consists of two merges from projects/zfsd/head along with the
addition of an ATF test case for the new functionality.

sbin/devd/tests/Makefile
sbin/devd/tests/client_test.c
	Add ATF test cases for reading events from both devd socket types.

r266519:
sbin/devd/devd.8
sbin/devd/devd.cc
	Create a new socket, of type SOCK_SEQPACKET, for communicating with
	clients. SOCK_SEQPACKET sockets preserve record boundaries,
	simplying code in the client. The old SOCK_STREAM socket is retained
	for backwards-compatibility with existing clients.

r269993:
sbin/devd/devd.8
	Fix grammar bug.

CR:		https://reviews.freebsd.org/rS266519
MFC after:	5 days
Sponsored by:	Spectra Logic
2014-08-14 22:33:56 +00:00
Alan Somers
d931b81aeb sbin/devd/devd.8
Fix grammar bug.

Reported by:	ian
Sponsored by:	Spectra Logic Corporation
2014-08-14 18:39:13 +00:00
Alan Somers
9102691e9c sbin/devd/devd.8
sbin/devd/devd.cc
	Create a new socket, of type SOCK_SEQPACKET, for communicating with
	clients.  SOCK_SEQPACKET sockets preserve record boundaries,
	simplying code in the client.  The old SOCK_STREAM socket is
	retained for backwards-compatibility with existing clients.

Sponsored by:	Spectra Logic
2014-05-21 23:04:47 +00:00
Alan Somers
6a2ae0eb16 sbin/devd/devd.8
sbin/devd/devd.cc
	Add a -q flag to devd that will suppress syslog logging at
	LOG_NOTICE or below.

Requested by:	ian@ and imp@
MFC after:	3 weeks
Sponsored by:	Spectra Logic Corporation
2014-03-07 23:30:48 +00:00
Alan Somers
6d1014a32b Add syslog(3) support to devd(8).
sbin/devd/devd.cc
        All output will now go to syslog(3) if devd is daemonized, or stderr
        if it's running in the foreground.

sbin/devd/devd.8
        Remove the "-D" flag.  Filtering messages by priority now
	happens in the usual syslog way.  For performance reasons, a few
	extra-verbose debugging statements are now conditional on the "-d" (do
	not daemonize) flag.

etc/syslog.conf
etc/newsyslog.conf
        Direct messages from devd(8) to /var/log/devd.log, but leave it
        disabled by default

Reviewed by:	eadler
Approved by:	gibbs (co-mentor)
MFC after:	never (removed a command-line option from devd)
2013-07-01 21:20:17 +00:00
Niclas Zeising
71c2381938 Bump .Dd for the change in r246121.
Approved by:	joel (mentor)
2013-02-05 14:29:37 +00:00
Ian Lepore
e1334f935f Fix a descriptor leak in devd. Clients reading /var/run/devd.pipe can close
their socket connection any time, and devd only notices that when it gets an
error trying to write an event to the client.  On a system with no device
change activity, clients could connect and disappear repeatedly without devd
noticing, leading to an ever-growing list of open socket descriptors in devd.

Now devd uses poll(2) looking for POLLHUP on all existing clients every time
a new client connection is established, and also periodically (once a minute)
to proactively find zombie clients and reap the socket descriptors.  It also
now has a connection limit, configurable with a new -l <num> command line arg.
When the maximum number of connections is reached it stops accepting new
connections until some current clients drop off.

Reviewed by:	imp
Approved by:	cognet (mentor)
2013-01-30 15:21:18 +00:00
Gleb Smirnoff
d50b2720a9 Xref re_format(7) in devd.conf(5), not in devd(8).
Pointy hat to:	glebius
2011-12-16 10:21:01 +00:00
Gleb Smirnoff
eecc3092a1 Xref re_format(7). 2011-12-16 10:14:41 +00:00
Ruslan Ermilov
5ef35a9854 Add -f option to program's usage(), fix manpage's SYNOPSIS. 2006-09-17 22:49:26 +00:00
Joseph Koshy
80615950df Rev 1.15 should have incremented the date on this manual page. 2005-12-19 02:55:44 +00:00
Joseph Koshy
8334958a7f Add a -f configfile option to devd(8), based on a patch submitted by
Wojciech A. Koszek.

Submitted by:	Wojciech A. Koszek <dunstan@freebsd.czest.pl>
2005-11-24 14:39:41 +00:00
Ruslan Ermilov
214144704b Scheduled mdoc(7) sweep. 2005-01-10 16:17:34 +00:00
Ceri Davies
e33bdcedbc Clarify that devd will only parse files whose names end in .conf.
Prompted by

PR:		docs/73668
Submitted by:	Dan Pelleg
MFC After:	3 days
2004-11-28 17:44:22 +00:00
Ruslan Ermilov
2410103c1d mdoc(7) fixes. 2004-07-07 19:57:16 +00:00
Warner Losh
251bedd15b Create a unix domain socket and write to it all the events that come
in over the socket.
2004-07-01 07:24:18 +00:00
Ralf S. Engelschall
ffd1bc0626 fix typo: s/Instaed/Instead/ 2003-09-26 12:24:16 +00:00
Ruslan Ermilov
d5986fac3a mdoc(7) fixes: Expand contraction. 2003-05-17 22:21:27 +00:00
Warner Losh
5a882d775d Implement a two new flags, and change the meaning of another one.
'd': now means don't do daemon().
'D': Debug
'n': Don't wait to process all pending events before calling daemon.

In the past, devd would call daemon immediately.  However, this causes
a race.  If anything in the boot process depends on configuring the
devices configured by devd, maybe they would be configured in time,
maybe not.  Now we don't call daemon until all pending events are
processed, unless -n is specified.

# -n is actually the default for a while due to the select(2) bug in devctl
# that I just fixed to give people a chance to upgrade.
2003-04-21 06:26:08 +00:00
Ruslan Ermilov
f1e65894d2 mdoc(7) police: Revision. 2003-03-03 11:51:30 +00:00
Warner Losh
93c6603a41 devd bugs section is now OBE 2003-02-14 16:21:50 +00:00
Jens Schweikhardt
57bd0fc6e8 english(4) police. 2002-12-27 12:15:40 +00:00
Warner Losh
acbfae74e3 Add BUGS section and note departure of actual implementation from what
is documented so the pioneers will know why it works the way it does.
2002-11-18 07:16:47 +00:00
John Baldwin
6616a2c799 Try to reword things a bit more to make it clearer.
Reviewed by:	imp
2002-11-13 20:27:46 +00:00
John Baldwin
1a1aec6aeb - Fix some minor grammar and spelling nits.
- Massage the wording in a few places.
- Put .Nm on lines by itself so it renders correctly.

Reviewed by:	imp
2002-11-13 19:31:04 +00:00
Warner Losh
e530e0446b devd. A daemon that hooks into the kernel's /dev/devctl to produce
arbitrary commands when devices come and go in the device tree (which is
different than the /dev directory).

This is an initial version.  Much of the planned power isn't here.
Instead of doing the full matching, we always run /etc/devd-generic.
/etc/devd.generic will go away at some point, I think.

I'm committing it in this early state so I can start getting feedback
from early adapters.

Approved by: re
2002-10-20 22:15:17 +00:00