[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[ale] Monitoring dhcpd.leases file?
- Subject: [ale] Monitoring dhcpd.leases file?
- From: james.sumners at gmail.com (James Sumners)
- Date: Mon, 5 Jan 2015 21:28:31 -0500
- In-reply-to: <CAMKTeNwxAdozH6viPbb2OARKc98qF0u9h=OwD8d8h_FA986zxg@mail.gmail.com>
- References: <CAAt=rgCgdK8THshqTJHFnVGQR7d-DX=V02-vvjs1r66HorL=4A@mail.gmail.com> <CAAt=rgALARdYytFvMJ1pkEhDD66DrBNS2WNyL8uVT9az4XMyRw@mail.gmail.com> <[email protected]> <CAMKTeNwxAdozH6viPbb2OARKc98qF0u9h=OwD8d8h_FA986zxg@mail.gmail.com>
On Mon, Jan 5, 2015 at 5:24 PM, Scott Bragg <walkingbear at gmail.com> wrote:
> I'd approach it by experimenting with inotifywait and piping the diff of
> the pre-change with post-change file.
`tail -f` now defaults to using the inotify API if it is present. So to
test the application I wrote I simply did a `tail -f dhcpd.leases |
socat unix-connect:/var/run/dhcpd-tracker.inpu stdio` (where
dhcpd-tracker.input is the Unix socket my application listens to).
--
James Sumners
http://james.roomfullofmirrors.com/
"All governments suffer a recurring problem: Power attracts pathological
personalities. It is not that power corrupts but that it is magnetic to the
corruptible. Such people have a tendency to become drunk on violence, a
condition to which they are quickly addicted."
Missionaria Protectiva, Text QIV (decto)
CH:D 59
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.ale.org/pipermail/ale/attachments/20150105/a1d8d615/attachment.html>