]> granicus.if.org Git - vnstat/commitdiff
update documentation, use markdown style formatting
authorTeemu Toivola <git@humdi.net>
Sat, 13 Apr 2019 16:19:43 +0000 (19:19 +0300)
committerTeemu Toivola <git@humdi.net>
Sat, 13 Apr 2019 16:19:43 +0000 (19:19 +0300)
13 files changed:
.gitignore
INSTALL [deleted file]
INSTALL.md [new file with mode: 0644]
INSTALL_BSD [deleted file]
INSTALL_BSD.md [new file with mode: 0644]
Makefile.am
Makefile.in
README
README.md
UNINSTALL.md [moved from UNINSTALL with 57% similarity]
UPGRADE [deleted file]
UPGRADE.md [new file with mode: 0644]
man/vnstat.1

index c4bd3129489b40b2c9dad5ba5ddc3f48acdb9e7a..4eb26b551b57a503f05fc95f1e56fedbdd2b393b 100644 (file)
@@ -24,3 +24,7 @@ src/stamp-h1
 tests/.deps
 tests/.dirstamp
 *~
+INSTALL
+INSTALL_BSD
+UPGRADE
+UNINSTALL
diff --git a/INSTALL b/INSTALL
deleted file mode 100644 (file)
index c9e7009..0000000
--- a/INSTALL
+++ /dev/null
@@ -1,187 +0,0 @@
-
-tl;dr: ./configure --prefix=/usr --sysconfdir=/etc && make && make install
-
-
-Prerequisites
-:::::::::::::
-
- - make
- - C compiler
- - user with access to kernel interface statistics
-   - usually available by default but can be restricted for example
-     by grsecurity and similar security enhancement suites or settings
- - sqlite3     (library and development files)
- - libgd       (optional, image output)
- - check       (optional, test suite)
- - pkg-config  (optional, for check detection)
- - autotools   (optional, for recreating configure and makefiles)
-
-
-Compiling the binaries
-::::::::::::::::::::::
-
- This source package contains the required source files for vnStat including
- the daemon (vnstatd) and image output (vnstati). Executing
-
-     ./configure --prefix=/usr --sysconfdir=/etc && make
-
- will compile 'vnstat' and 'vnstatd'. The optional image output capable binary
- 'vnstati' will also be compiled if the required additional libgd library is
- found to be available and --disable-image-output isn't given as parameter
- for ./configure.
-
- An example cgi ('vnstat.cgi') to be used with a http server with the image
- output support has been provided in the 'examples' directory. Configuration
- options for the cgi are in the beginning of the file. Additional examples
- for using the json output are also available in the same directory.
-
- For executing the optional test suite, see the appendix at the end of this
- file.
-
-
-Installing as root
-::::::::::::::::::
-
- Log in as root and run the following command:
-
-     make install
-
- If there were no errors, vnStat binaries, man pages and a configuration
- file should now be installed. The configuration file will be upgraded using
- previously configured values if it is found already to exist. A backup
- of the previous configuration file will be named as vnstat.conf.old.
-
- The configuration file /etc/vnstat.conf should be checked at this point.
- See the vnstat.conf man page for documentation about available options.
-
- Finally, make vnStat monitor available interfaces. Configure init scripts
- so that the following command is executed once during system startup:
-
-     vnstatd -d
-
- The 'examples' directory contains suitable files for most commonly used
- service managers. Refer to your operating system / distribution
- documentation if unsure which service manager is being used.
-
-   systemd:
-     cp -v examples/systemd/vnstat.service /etc/systemd/system/
-     systemctl enable vnstat
-     systemctl start vnstat
-
-   init.d:
-     Debian:
-       cp -v examples/init.d/debian/vnstat /etc/init.d/
-       update-rc.d vnstat defaults
-       service vnstat start
-     Red Hat / CentOS:
-       cp -v examples/init.d/redhat/vnstat /etc/init.d/
-       chkconfig vnstat on
-       service vnstat start
-
-   upstart:
-     cp -v examples/upstart/vnstat.conf /etc/init/
-     initctl start vnstat
-
- An alternative method is to add the command to an already existing
- script that gets executed during system startup. In many distributions
- /etc/rc.local can be used if nothing else suitable can be found. Note
- that the full path to the executable may need to be included instead of
- only the command itself.
-
- During first startup, the daemon (vnstatd) should list and add all
- available interfaces for monitoring. Depending on configuration, it may
- take some minutes for the 'vnstat' command to begin showing results as
- the entries in the database aren't updated constantly.
-
- Monitoring of unwanted interfaces can be stopped with:
-
-     vnstat --remove -i ethunwanted
-
-
-Installing without root access
-::::::::::::::::::::::::::::::
-
- Copy all needed binaries to some directory included in your PATH
- (~/bin/ is used here as an example) and create the database directory.
-
-     cp -v vnstat vnstatd vnstati ~/bin/
-     cp -v cfg/vnstat.conf ~/.vnstatrc
-     mkdir ~/.vnstat
-
- Check that the binaries got installed to a suitable location and are of the
- correct version:
-
-     vnstat --version
-
- If this gives a 'command not found' error or a different than expected
- version then check the content of the PATH variable and try again.
-
- Next open the configuration file ~/.vnstatrc with your favorite text editor
- and locate the following line:
-
-     DatabaseDir "/var/lib/vnstat"
-
- and replace it with
-
-     DatabaseDir "/pathtomyhomedir/.vnstat"
-
- Next, locate the following lines:
-
-     UseLogging 2
-     LogFile "/var/log/vnstat/vnstat.log"
-     PidFile "/var/run/vnstat/vnstat.pid"
-
- and replace them with
-
-     UseLogging 1
-     LogFile "/pathtomyhomedir/.vnstat/.log"
-     PidFile "/pathtomyhomedir/.vnstat/.pid"
-
- Finally, save the file. If you are unsure about your home directory path, execute
-
-     cd ; pwd
-
- The ouput should tell your home directory.
-
- Now it's time to add a crontab entry for vnStat in order to get the daemon
- running automatically after a system startup. Do that by executing the
- command 'crontab -e' and add the following line (without leading spaces,
- remember to change the path):
-
-     @reboot ~/bin/vnstatd -d
-
- If you found yourself using a strange editor then 'man vi' may help.
-
- Make sure the configuration file (~/.vnstatrc) has the log option either
- disabled or set to a file that is located in a place where you have write
- permissions, such as your home dir. Then try starting the daemon with
-
-     vnstatd -d
-
- After that wait for (or generate) at least 1024 bytes of network traffic
- (and 5 min for the next database file save).
-
-     vnstat
-
- Now you should get some stats about your network usage. See the config
- file ~/.vnstatrc for interface and other settings.
-
-
-Appendix: Running the test suite
-::::::::::::::::::::::::::::::::
-
- This step isn't mandatory for using vnStat.
-
- The source package includes a test suite for validating many of the
- functionalities provided by the executables. The test suite requires the
- Check unit testing framework ( https://libcheck.github.io/check/ ) to be
- installed and available. Depending on the used distribution, the necessary
- package to be installed is usually called 'check' and may also require
- 'check-devel' to be installed if available. After the configure script has
- been executed the test suite can be executed with:
-
-     make check
-
- The output should show a non-zero number of tests executed if all the
- necessary packages were available. A more detailed list of executed tests
- can be seen from the check_vnstat.log file after execution.
diff --git a/INSTALL.md b/INSTALL.md
new file mode 100644 (file)
index 0000000..0395712
--- /dev/null
@@ -0,0 +1,194 @@
+
+# tl;dr
+
+    ./configure --prefix=/usr --sysconfdir=/etc && make && make install
+
+
+# Prerequisites
+
+ - make
+ - C compiler
+ - user with access to kernel interface statistics
+   - usually available by default but can be restricted for example
+     by grsecurity and similar security enhancement suites or settings
+ - sqlite3     (library and development files)
+ - libgd       (optional, image output)
+ - check       (optional, test suite)
+ - pkg-config  (optional, for check detection)
+ - autotools   (optional, for recreating configure and makefiles)
+
+
+# Compiling the binaries
+
+This source package contains the required source files for vnStat including
+the daemon (vnstatd) and image output (vnstati). Executing
+
+    ./configure --prefix=/usr --sysconfdir=/etc && make
+
+will compile `vnstat` and `vnstatd`. The optional image output capable binary
+`vnstati` will also be compiled if the required additional libgd library is
+found to be available and `--disable-image-output` isn't given as parameter
+for `./configure`.
+
+An example cgi (`vnstat.cgi`) to be used with a http server with the image
+output support has been provided in the `examples` directory. Configuration
+options for the cgi are in the beginning of the file. Additional examples
+for using the json output are also available in the same directory.
+
+For executing the optional test suite, see the appendix at the end of this
+file.
+
+
+# Installing as root
+
+Log in as root and run the following command:
+
+    make install
+
+If there were no errors, vnStat binaries, man pages and a configuration
+file should now be installed. The configuration file will be upgraded using
+previously configured values if it is found already to exist. A backup
+of the previous configuration file will be named as `vnstat.conf.old`.
+
+The configuration file `/etc/vnstat.conf` should be checked at this point.
+See the `vnstat.conf` man page for documentation about available options.
+
+Finally, make vnStat monitor available interfaces. Configure init scripts
+so that the following command is executed once during system startup:
+
+    vnstatd -d
+
+The `examples` directory contains suitable files for most commonly used
+service managers. Refer to your operating system / distribution
+documentation if unsure which service manager is being used.
+
+ * systemd
+    ~~~
+    cp -v examples/systemd/vnstat.service /etc/systemd/system/
+    systemctl enable vnstat
+    systemctl start vnstat
+    ~~~
+
+ * init.d
+
+   * Debian
+    ~~~
+    cp -v examples/init.d/debian/vnstat /etc/init.d/
+    update-rc.d vnstat defaults
+    service vnstat start
+    ~~~
+
+   * Red Hat / CentOS
+    ~~~
+    cp -v examples/init.d/redhat/vnstat /etc/init.d/
+    chkconfig vnstat on
+    service vnstat start
+    ~~~
+
+ * upstart
+    ~~~
+    cp -v examples/upstart/vnstat.conf /etc/init/
+    initctl start vnstat
+    ~~~
+
+An alternative method is to add the command to an already existing
+script that gets executed during system startup. In many distributions
+`/etc/rc.local` can be used if nothing else suitable can be found. Note
+that the full path to the executable may need to be included instead of
+only the command itself.
+
+During first startup, the daemon (`vnstatd`) should list and add all
+available interfaces for monitoring. Depending on configuration, it may
+take some minutes for the `vnstat` command to begin showing results as
+the entries in the database aren't updated constantly.
+
+Monitoring of unwanted interfaces can be stopped with:
+
+    vnstat --remove -i ethunwanted
+
+
+# Installing without root access
+
+Copy all needed binaries to some directory included in your PATH
+(`~/bin/` is used here as an example) and create the database directory.
+
+    cp -v vnstat vnstatd vnstati ~/bin/
+    cp -v cfg/vnstat.conf ~/.vnstatrc
+    mkdir ~/.vnstat
+
+Check that the binaries got installed to a suitable location and are of the
+correct version:
+
+    vnstat --version
+
+If this gives a `command not found` error or a different than expected
+version then check the content of the PATH variable and try again.
+
+Next open the configuration file `~/.vnstatrc` with your favorite text editor
+and locate the following line:
+
+    DatabaseDir "/var/lib/vnstat"
+
+and replace it with
+
+    DatabaseDir "/pathtomyhomedir/.vnstat"
+
+Next, locate the following lines:
+
+    UseLogging 2
+    LogFile "/var/log/vnstat/vnstat.log"
+    PidFile "/var/run/vnstat/vnstat.pid"
+
+and replace them with
+
+    UseLogging 1
+    LogFile "/pathtomyhomedir/.vnstat/.log"
+    PidFile "/pathtomyhomedir/.vnstat/.pid"
+
+Finally, save the file. If you are unsure about your home directory path, execute
+
+    cd ; pwd
+
+The ouput should tell your home directory.
+
+Now it's time to add a crontab entry for vnStat in order to get the daemon
+running automatically after a system startup. Do that by executing the
+command `crontab -e` and add the following line (without leading spaces,
+remember to change the path):
+
+    @reboot ~/bin/vnstatd -d
+
+If you found yourself using a strange editor then `man vi` may help.
+
+Make sure the configuration file (`~/.vnstatrc`) has the log option either
+disabled or set to a file that is located in a place where you have write
+permissions, such as your home dir. Then try starting the daemon with
+
+    vnstatd -d
+
+After that wait for (or generate) at least 1024 bytes of network traffic
+(and 5 min for the next database file save).
+
+    vnstat
+
+Now you should get some stats about your network usage. See the config
+file `~/.vnstatrc` for interface and other settings.
+
+
+# Appendix: Running the test suite
+
+This step isn't mandatory for using vnStat.
+
+The source package includes a test suite for validating many of the
+functionalities provided by the executables. The test suite requires the
+Check unit testing framework ( https://libcheck.github.io/check/ ) to be
+installed and available. Depending on the used distribution, the necessary
+package to be installed is usually called `check` and may also require
+`check-devel` to be installed if available. After the configure script has
+been executed the test suite can be executed with:
+
+    make check
+
+The output should show a non-zero number of tests executed if all the
+necessary packages were available. A more detailed list of executed tests
+can be seen from the `check_vnstat.log` file after execution.
diff --git a/INSTALL_BSD b/INSTALL_BSD
deleted file mode 100644 (file)
index e54cff5..0000000
+++ /dev/null
@@ -1,154 +0,0 @@
-
-tl;dr: ./configure && make && make install
-
-
-Prerequisites
-:::::::::::::
-
- - make or gmake
- - C compiler
- - user with access to kernel interface statistics
-   - usually available by default but may be restricted by security settings
- - databases/sqlite3
- - graphics/gd       (optional, image output)
- - devel/check       (optional, test suite)
- - devel/pkg-config  (optional, for check detection)
- - devel/autotools   (optional, for recreating configure and makefiles)
-
-
-Compiling the binaries
-::::::::::::::::::::::
-
- This source package contains the required source files for vnStat including
- the daemon (vnstatd) and image output (vnstati). Executing
-
-     ./configure && make
-
- will compile 'vnstat' and 'vnstatd' without requiring additional libraries.
- The optional image output capable binary 'vnstati' will also be compiled if
- the required additional libgd2 library is found to be available and
- --disable-image-output isn't given as parameter for ./configure.
-
- An example cgi ('vnstat.cgi') to be used with a http server with the image
- output support has been provided in the 'examples' directory. Configuration
- options for the cgi are in the beginning of the file. Additional examples
- for using the json output are also available in the same directory.
-
- For executing the optional test suite, see the appendix at the end of this
- file.
-
-
-Installing as root
-::::::::::::::::::
-
- Login as root and run the following command:
-
-     make install
-
- If there were no errors, vnStat binaries, man pages and a configuration
- file should now be installed. The configuration file will be upgraded using
- previously configured values if it is found already to exist. A backup
- of the previous configuration file will be named as vnstat.conf.old.
-
- The configuration file /usr/local/etc/vnstat.conf should be checked at
- this point. See the vnstat.conf man page for documentation about available
- options.
-
- Finally make vnStat monitor the selected interface(s). Configure init
- scripts so that the following command is executed once during system
- startup:
-
-     /usr/local/sbin/vnstatd -d
-
- One suitable place is for example /etc/rc.local.
-
- During first startup, the daemon (vnstatd) should list and add all
- available interfaces for monitoring. The command can also be executed
- manually at this point in order to avoid having to reboot the system
- Depending on configuration, it may take some minutes for the 'vnstat'
- command to begin showing results as the entries in the database aren't
- updated constantly.
-
- Monitoring of unwanted interfaces can be stopped with:
-
-     vnstat --remove -i ethunwanted
-
-
-Installing without root access
-::::::::::::::::::::::::::::::
-
- Copy all needed binaries to some directory included in your PATH
- (~/bin/ is an example) and create the database directory.
-
-     cp -v vnstat vnstatd vnstati ~/bin/
-     cp -v cfg/vnstat.conf ~/.vnstatrc
-     mkdir ~/.vnstat
-
- Next open the configuration file ~/.vnstatrc with your favorite text editor
- and locate the following line:
-
-     DatabaseDir "/var/lib/vnstat"
-
- and replace it with
-
-     DatabaseDir "/pathtomyhomedir/.vnstat"
-
- Next, locate the following lines:
-
-     UseLogging 2
-     LogFile "/var/log/vnstat/vnstat.log"
-     PidFile "/var/run/vnstat/vnstat.pid"
-
- and replace them with
-
-     UseLogging 1
-     LogFile "/pathtomyhomedir/.vnstat/.log"
-     PidFile "/pathtomyhomedir/.vnstat/.pid"
-
- Finally, save the file. If you are unsure about your home directory path, execute
-
-     cd ; pwd
-
- The ouput should tell your home directory.
-
- Now it's time to add a crontab entry for vnStat. Do that by executing the
- command 'crontab -e' and add the following line (without leading spaces,
- remember to change the path):
-
-     @reboot ~/bin/vnstatd -d
-
- If you found yourself using a strange editor then 'man vi' may help.
-
- Make sure the configuration file (~/.vnstatrc) has the log option either
- disabled or set to a file that is located in a place where you have write
- permissions, such as your home dir. Then try starting the daemon with
-
-     vnstatd -d
-
- After that wait for (or generate) at least 1024 bytes of network traffic
- (and 5 min for the next database file save).
-
-     vnstat
-
- Now you should get some stats about your network usage. See the config
- file ~/.vnstatrc for interface and other settings.
-
-
-Appendix: Running the test suite
-::::::::::::::::::::::::::::::::
-
- This step isn't mandatory for using vnStat.
-
- The source package includes a test suite for validating many of the
- functionalities provided by the executables. The test suite requires the
- Check unit testing framework ( https://libcheck.github.io/check/ ) to
- be installed and available (usually 'devel/check' in ports). The configure
- script also assumes that the 'pkg-config' command is installed. That command
- is usually part of the 'devel/pkgconf' package. After the configure script has
- been executed the test suite can be executed with:
-
-     make check
-
- The output should show a non-zero number of tests executed if all the
- necessary packages were available. A more detailed list of executed tests
- can be seen from the check_vnstat.log file after execution.
diff --git a/INSTALL_BSD.md b/INSTALL_BSD.md
new file mode 100644 (file)
index 0000000..7b4a09f
--- /dev/null
@@ -0,0 +1,151 @@
+
+# tl;dr
+
+    ./configure && make && make install
+
+
+# Prerequisites
+
+ - make or gmake
+ - C compiler
+ - user with access to kernel interface statistics
+   - usually available by default but may be restricted by security settings
+ - databases/sqlite3
+ - graphics/gd       (optional, image output)
+ - devel/check       (optional, test suite)
+ - devel/pkg-config  (optional, for check detection)
+ - devel/autotools   (optional, for recreating configure and makefiles)
+
+
+# Compiling the binaries
+
+This source package contains the required source files for vnStat including
+the daemon (`vnstatd`) and image output (vnstati). Executing
+
+    ./configure && make
+
+will compile `vnstat` and `vnstatd` without requiring additional libraries.
+The optional image output capable binary `vnstati` will also be compiled if
+the required additional libgd2 library is found to be available and
+`--disable-image-output` isn't given as parameter for `./configure`.
+
+An example cgi (`vnstat.cgi`) to be used with a http server with the image
+output support has been provided in the `examples` directory. Configuration
+options for the cgi are in the beginning of the file. Additional examples
+for using the json output are also available in the same directory.
+
+For executing the optional test suite, see the appendix at the end of this
+file.
+
+
+# Installing as root
+
+Login as root and run the following command:
+
+    make install
+
+If there were no errors, vnStat binaries, man pages and a configuration
+file should now be installed. The configuration file will be upgraded using
+previously configured values if it is found already to exist. A backup
+of the previous configuration file will be named as `vnstat.conf.old`.
+
+The configuration file `/usr/local/etc/vnstat.conf` should be checked at
+this point. See the `vnstat.conf` man page for documentation about available
+options.
+
+Finally make vnStat monitor the selected interface(s). Configure init
+scripts so that the following command is executed once during system
+startup:
+
+    /usr/local/sbin/vnstatd -d
+
+One suitable place is for example `/etc/rc.local`.
+
+During first startup, the daemon (`vnstatd`) should list and add all
+available interfaces for monitoring. The command can also be executed
+manually at this point in order to avoid having to reboot the system
+Depending on configuration, it may take some minutes for the `vnstat`
+command to begin showing results as the entries in the database aren't
+updated constantly.
+
+Monitoring of unwanted interfaces can be stopped with:
+
+    vnstat --remove -i ethunwanted
+
+
+# Installing without root access
+
+Copy all needed binaries to some directory included in your PATH
+(`~/bin/` is an example) and create the database directory.
+
+    cp -v vnstat vnstatd vnstati ~/bin/
+    cp -v cfg/vnstat.conf ~/.vnstatrc
+    mkdir ~/.vnstat
+
+Next open the configuration file `~/.vnstatrc` with your favorite text editor
+and locate the following line:
+
+    DatabaseDir "/var/lib/vnstat"
+
+and replace it with
+
+    DatabaseDir "/pathtomyhomedir/.vnstat"
+
+Next, locate the following lines:
+
+    UseLogging 2
+    LogFile "/var/log/vnstat/vnstat.log"
+    PidFile "/var/run/vnstat/vnstat.pid"
+
+and replace them with
+
+    UseLogging 1
+    LogFile "/pathtomyhomedir/.vnstat/.log"
+    PidFile "/pathtomyhomedir/.vnstat/.pid"
+
+Finally, save the file. If you are unsure about your home directory path, execute
+
+    cd ; pwd
+
+The ouput should tell your home directory.
+
+Now it's time to add a crontab entry for vnStat. Do that by executing the
+command `crontab -e` and add the following line (without leading spaces,
+remember to change the path):
+
+    @reboot ~/bin/vnstatd -d
+
+If you found yourself using a strange editor then `man vi` may help.
+
+Make sure the configuration file (`~/.vnstatrc`) has the log option either
+disabled or set to a file that is located in a place where you have write
+permissions, such as your home dir. Then try starting the daemon with
+
+    vnstatd -d
+
+After that wait for (or generate) at least 1024 bytes of network traffic
+(and 5 min for the next database file save).
+
+    vnstat
+
+Now you should get some stats about your network usage. See the config
+file `~/.vnstatrc` for interface and other settings.
+
+
+# Appendix: Running the test suite
+
+This step isn't mandatory for using vnStat.
+
+The source package includes a test suite for validating many of the
+functionalities provided by the executables. The test suite requires the
+Check unit testing framework ( https://libcheck.github.io/check/ ) to
+be installed and available (usually `devel/check` in ports). The configure
+script also assumes that the `pkg-config` command is installed. That command
+is usually part of the `devel/pkgconf` package. After the configure script has
+been executed the test suite can be executed with:
+
+    make check
+
+The output should show a non-zero number of tests executed if all the
+necessary packages were available. A more detailed list of executed tests
+can be seen from the `check_vnstat.log` file after execution.
index b99ea9f486a4d6871d6f3dfecd707bac0659d374..b1c5173912d2a36e335b73b9c529bf48678ebc9f 100644 (file)
@@ -96,6 +96,18 @@ check_vnstat_SOURCES += tests/image_tests.c tests/image_tests.h \
 endif
 endif
 
+INSTALL:
+       cp -a INSTALL.md INSTALL
+
+INSTALL_BSD:
+       cp -a INSTALL_BSD.md INSTALL_BSD
+
+UPGRADE:
+       cp -a UPGRADE.md UPGRADE
+
+UNINSTALL:
+       cp -a UNINSTALL.md UNINSTALL
+
 setdebug:
        CFLAGS='-Wall -Wextra -g' ./configure
 
@@ -153,7 +165,7 @@ uninstall-hook:
        @echo
 
 clean-local:
-       -rm -fr coverage *.lcov *.gz test*.log test*.xml src/*.gc* tests/*.gc* *.old *.new *check.png
+       -rm -fr coverage *.lcov *.gz test*.log test*.xml src/*.gc* tests/*.gc* *.old *.new *check.png INSTALL INSTALL_BSD UPGRADE UNINSTALL
 
 check-local:
        -tail -n 2 test.log
index 31dd09596f7f1076d04a9cca2b633b7f96003645..36ecf50325426e9543002790152ae007355fdf7d 100644 (file)
@@ -2141,6 +2141,18 @@ uninstall-man: uninstall-man1 uninstall-man5
 .PRECIOUS: Makefile
 
 
+INSTALL:
+       cp -a INSTALL.md INSTALL
+
+INSTALL_BSD:
+       cp -a INSTALL_BSD.md INSTALL_BSD
+
+UPGRADE:
+       cp -a UPGRADE.md UPGRADE
+
+UNINSTALL:
+       cp -a UNINSTALL.md UNINSTALL
+
 setdebug:
        CFLAGS='-Wall -Wextra -g' ./configure
 
@@ -2195,7 +2207,7 @@ uninstall-hook:
        @echo
 
 clean-local:
-       -rm -fr coverage *.lcov *.gz test*.log test*.xml src/*.gc* tests/*.gc* *.old *.new *check.png
+       -rm -fr coverage *.lcov *.gz test*.log test*.xml src/*.gc* tests/*.gc* *.old *.new *check.png INSTALL INSTALL_BSD UPGRADE UNINSTALL
 
 check-local:
        -tail -n 2 test.log
diff --git a/README b/README
index 169b2e33ddb90d635394fb31f5b02caad761c18c..a0b7631e7a0838876e495445eb4a96a5d6b9f479 100644 (file)
--- a/README
+++ b/README
@@ -1,41 +1,38 @@
 
-What is vnStat
-::::::::::::::
+# What is vnStat
 
- vnStat is a console-based network traffic monitor that uses the network
- interface statistics provided by the kernel as information source. This
- means that vnStat won't actually be sniffing any traffic and also ensures
- light use of system resources.
+vnStat is a console-based network traffic monitor that uses the network
+interface statistics provided by the kernel as information source. This
+means that vnStat won't actually be sniffing any traffic and also ensures
+light use of system resources regardless of network traffic rate.
 
- By default, traffic statistics are stored on a five minute level for the last
- 48 hours, on a hourly level for the last 4 days, on a daily level for the
- last 2 full months and on a yearly level forever. The data retention durations
- are fully user configurable. Total seen traffic and a top days listing is also
- provided. Optional png image output is available in systems with the gd
- library installed.
+By default, traffic statistics are stored on a five minute level for the last
+48 hours, on a hourly level for the last 4 days, on a daily level for the
+last 2 full months and on a yearly level forever. The data retention durations
+are fully user configurable. Total seen traffic and a top days listing is also
+provided. Optional png image output is available in systems with the gd
+library installed.
 
- Optional png image output is available in systems with the gd library
- installed.
+Optional png image output is available in systems with the gd library
+installed.
 
- See the webpage https://humdi.net/vnstat/ for output examples.
+See the webpage https://humdi.net/vnstat/ for output examples.
 
 
-Getting started
-:::::::::::::::
+# Getting started
 
- vnStat works best when installed. See the INSTALL or INSTALL_BSD file
- depending on used operating system. These files contain all needed
- information for the installing process. Instructions for upgrading from
- a previous version are included in the UPGRADE file.
+vnStat works best when installed. See the INSTALL or INSTALL_BSD file
+depending on used operating system. These files contain all needed
+information for the installing process. Instructions for upgrading from
+a previous version are included in the UPGRADE file.
 
 
-Available options and documentation
-:::::::::::::::::::::::::::::::::::
+# Available options and documentation
 
- A list of commonly used options is available with 'vnstat --help'. The
- complete list can be accessed with 'vnstat --longhelp'. The following
- man pages are available with more detailed descriptions of each option
- including some usage examples:
+A list of commonly used options is available with `vnstat --help`. The
+complete list can be accessed with `vnstat --longhelp`. The following
+man pages are available with more detailed descriptions of each option
+including some usage examples:
 
     vnstat          general documentation and console query parameters
     vnstatd         daemon documentation
@@ -43,17 +40,16 @@ Available options and documentation
     vnstat.conf     configuration file
 
 
-Contacting the author
-:::::::::::::::::::::
+# Contacting the author
 
- email:    Teemu Toivola <tst at iki dot fi>
- irc:      Vergo (IRCNet)
+email:    Teemu Toivola <tst at iki dot fi>
+irc:      Vergo (IRCNet)
 
- git:      https://github.com/vergoh/vnstat
+git:      https://github.com/vergoh/vnstat
 
- The current version of vnStat is always available from
- https://humdi.net/vnstat/
+The current version of vnStat is always available from
+https://humdi.net/vnstat/
 
- Bug reports, improvement ideas, feature requests and pull requests should
- be sent using the matching features on GitHub as those are harder to miss
- or forget.
+Bug reports, improvement ideas, feature requests and pull requests should
+be sent using the matching features on GitHub as those are harder to miss
+or forget.
index 1586669c58f26296a1a17b5bfd5b322871fc8941..3cb662a72417bf2b658796b7e4707b6c475cb558 100644 (file)
--- a/README.md
+++ b/README.md
@@ -3,7 +3,7 @@
 vnStat is a console-based network traffic monitor that uses the network
 interface statistics provided by the kernel as information source. This
 means that vnStat won't actually be sniffing any traffic and also ensures
-light use of system resources.
+light use of system resources regardless of network traffic rate.
 
 By default, traffic statistics are stored on a five minute level for the last
 48 hours, on a hourly level for the last 4 days, on a daily level for the
@@ -34,10 +34,10 @@ Development version
   1. `git clone https://github.com/vergoh/vnstat`
   2. `cd vnstat`
 
-In both cases, continue with instructions from the [INSTALL](INSTALL) or
-[INSTALL_BSD](INSTALL_BSD) file depending on used operating system.
+In both cases, continue with instructions from the [INSTALL](INSTALL.md) or
+[INSTALL_BSD](INSTALL_BSD.md) file depending on used operating system.
 Instructions for upgrading from a previous version are included in the
-[UPGRADE](UPGRADE) file.
+[UPGRADE](UPGRADE.md) file.
 
 ## Contacting the author
 
similarity index 57%
rename from UNINSTALL
rename to UNINSTALL.md
index 523321faccf934ea16e9e1c9d5de9cc81f3b7ae1..0c9c9b5cfcf8ea5e74f2f87d305b750e0909f261 100644 (file)
--- a/UNINSTALL
@@ -1,6 +1,7 @@
+# Uninstall 
 
- 1. Stop the daemon (vnstatd) if still running
+ 1. Stop the daemon (`vnstatd`) if still running
  2. Remove any manually installed service files or file entries
     used to start the daemon
- 3. Run 'make uninstall' and follow the instructions
+ 3. Run `make uninstall` and follow the instructions
  4. Remove possible database directory if no longer needed
diff --git a/UPGRADE b/UPGRADE
deleted file mode 100644 (file)
index b7e5a7f..0000000
--- a/UPGRADE
+++ /dev/null
@@ -1,52 +0,0 @@
-
-New configuration settings
-::::::::::::::::::::::::::
-
-2.2: 64bitInterfaceCounters
-
-2.1: (none)
-
-2.0: List5Mins, ListHours, ListDays, ListMonths, ListYears, ListTop,
-     5MinuteHours, HourlyDays, DailyDays, MonthlyMonths, YearlyYears,
-     TopDayEntries, MonthRotateAffectsYears, TrafficlessEntries
-
-1.18: TimeSyncWait, DefaultDecimals, HourlyDecimals, HourlySectionStyle
-
-1.17: (none)
-
-1.16: RateUnitMode
-
-1.14 - 1.15: (none)
-
-1.13: BandwidthDetection, BandwidthDetectionInterval
-
-1.12: DaemonUser, DaemonGroup, CreateDirs, UpdateFileOwner
-
-1.10 - 1.11: (none)
-
-1.9: OutputStyle, SummaryLayout, SummaryRate, SaveOnStatusChange,
-     OfflineSaveInterval
-
-1.8: ShowRate, RateUnit, TrafficlessDays, HourlyRate, TransparentBg
-
-1.7: UnitMode + all settings under vnstatd and vnstati
-
-
-Upgrading from versions 1.3 and later
-:::::::::::::::::::::::::::::::::::::
-
-1) Follow the normal install procedure, 'make install' step will upgrade the
-   configuration file if it exists in the usual location. All user settings
-   will be kept. However, unidentified content will get cleaned away.
-
-2) Review the updated configuration file. Refer to the vnstat.conf man page
-   for more detailed documentation regarding each setting.
-
-3) If the daemon (vnstatd) is used then restart the daemon after the
-   configuration file has been updated.
-
-4) Upgrades from 1.x to 2.x will result in data being imported from the
-   legacy databases of each interface during the first start of the new
-   daemon (vnstatd) binary. The vnstat and vnstati commands will not be able
-   to access any data before this part of the upgrade has been completed.
-   The legacy databases will be left untouched by the import.
diff --git a/UPGRADE.md b/UPGRADE.md
new file mode 100644 (file)
index 0000000..cb30389
--- /dev/null
@@ -0,0 +1,52 @@
+
+# New configuration settings
+
+ * 2.2: 64bitInterfaceCounters
+
+ * 2.1: (none)
+
+ * 2.0: List5Mins, ListHours, ListDays, ListMonths, ListYears, ListTop,
+        5MinuteHours, HourlyDays, DailyDays, MonthlyMonths, YearlyYears,
+        TopDayEntries, MonthRotateAffectsYears, TrafficlessEntries
+
+ * 1.18: TimeSyncWait, DefaultDecimals, HourlyDecimals, HourlySectionStyle
+
+ * 1.17: (none)
+
+ * 1.16: RateUnitMode
+
+ * 1.14 - 1.15: (none)
+
+ * 1.13: BandwidthDetection, BandwidthDetectionInterval
+
+ * 1.12: DaemonUser, DaemonGroup, CreateDirs, UpdateFileOwner
+
+ * 1.10 - 1.11: (none)
+
+ * 1.9: OutputStyle, SummaryLayout, SummaryRate, SaveOnStatusChange,
+        OfflineSaveInterval
+
+ * 1.8: ShowRate, RateUnit, TrafficlessDays, HourlyRate, TransparentBg
+
+ * 1.7: UnitMode + all settings under vnstatd and vnstati
+
+
+# Upgrading from versions 1.3 and later
+
+ 1. Follow the normal install procedure, `make install` step will upgrade the
+    configuration file if it exists in the usual location. All user settings
+    will be kept. However, unidentified content will get cleaned away.
+
+ 2. Review the updated configuration file. Refer to the `vnstat.conf` man page
+    for more detailed documentation regarding each setting.
+
+ 3. After the configuration file has been updated, restart the daemon
+    (`vnstatd`) or configure it to use if not previously done already. Note
+    that using cron based updates are no longer supported and such commands
+    should be removed if still existing.
+
+ 4. Upgrades from 1.x to 2.x will result in data being imported from the
+    legacy databases of each interface during the first start of the new
+    daemon (`vnstatd`) binary. The `vnstat` and `vnstati` commands will not
+    be able to access any data before this part of the upgrade has been
+    completed. The legacy databases will be left untouched by the import.
index 2ddf7d630ad873449c950b01f2700d54a05835ce..fd327bf03a5e07bb15640e7c5cf046da2bc369ac 100644 (file)
@@ -76,7 +76,8 @@ However, it isn't a packet sniffer. The traffic information is read from the
 .BR proc (5)
 or
 .B sys
-filesystems depending on availability. That way vnStat can be used even
+filesystems depending on availability resulting in light use of system resources
+regardless of network traffic rate. That way vnStat can be used even
 without root permissions on most systems.
 .PP
 The implementation is divided into two commands. The purpose of the