1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81
|
Installation instructions
-------------------------
$ git clone https://github.com/emikulic/darkstat
$ cd darkstat
$ autoconf
$ autoheader
$ ./configure
$ make
$ make install
Quickstart
----------
$ darkstat -i eth0
Slightly slower start
---------------------
$ man darkstat
Packaging
---------
The install target respects DESTDIR. If you are packaging darkstat or
installing into a chroot, you can:
$ make install DESTDIR=/chroot/whatever
Portability
-----------
darkstat is mostly developed on Debian GNU/Linux, but mostly run darkstat on
FreeBSD.
darkstat usually builds out-of-the-box on FreeBSD, although you should probably
install it from ports.
In the past, darkstat has also been reported to work on:
- Solaris (with Sun C 5.8, and libpcap installed)
- Fedora Core (with libpcap-devel installed)
- OpenBSD
- NetBSD
- Mac OS X
- AIX
- Debian / Ubuntu (you need build-essential, zlib1g-dev, libpcap-dev)
- Mandrake
- OpenSUSE
Sadly, darkstat doesn't run on GNU/Hurd 0.3 because the BPF there doesn't
support non-blocking operation (FIONBIO).
Development hints
-----------------
Test the binary without daemonizing it (running it in the background):
sudo ./darkstat -i eth0 --no-daemon --verbose
To view the manpage:
nroff -man darkstat.8 | less
To build with sanitizers:
CFLAGS="-g -fsanitize=address -fsanitize=undefined" ./configure
To see what make is doing:
make V=1
Suggested valgrind invocation:
(note that valgrind doesn't work with a -fsanitize=address build)
sudo valgrind --leak-check=full --show-reachable=yes ./darkstat -i eth0 --no-daemon --verbose --chroot $PWD --export DB --import DB --daylog DAYLOG --user $USER
|