Compare commits

...
Sign in to create a new pull request.

4 commits

Author SHA1 Message Date
Fedora Release Engineering
b2f23e95b7 dist-git conversion 2010-07-29 15:07:31 +00:00
Bill Nottingham
30909fad7d Fix typo that causes a failure to update the common directory. (releng
#2781)
2009-11-26 01:15:15 +00:00
a510359522 - updated to 1.6
- added vnstat.conf to %{_sysconfdir}
- fixed a few rpmlint warnings
2008-01-15 21:12:21 +00:00
070040c754 Initialize branch EL-5 for vnstat 2008-01-13 18:38:09 +00:00
6 changed files with 41 additions and 125 deletions

View file

@ -1 +0,0 @@
vnstat-1.4.tar.gz

1
.gitignore vendored Normal file
View file

@ -0,0 +1 @@
vnstat-1.6.tar.gz

View file

@ -1,79 +0,0 @@
vnStat FAQ (for version 1.4+, 15.4.2004)
1. How should dialup users use vnStat? There's some errors
because the interface isn't available when offline.
That's all explained at the end of the README. The idea
is to include vnStat with enable/disable parameters in
scripts related with the used interface. Example scripts
can be found from the pppd directory that came with the
source package.
2. Does vnStat work for PPPOE users?
Although I haven't tested it, it's been reported to work
if the supplied ppp scripts are installed correctly. As
always, see the README and the man page.
3. How do I uninstall vnStat?
You only need to run 'make uninstall' in the directory that
comes when the .tar.gz is extracted. Just make sure it's
the same version you have installed.
4. What does the 'estimated' value mean?
The estimated value is an calculated average that tries to
guess the total traffic for the current day/month based on
previous traffic. This estimate works fairly well if the
monitored interface has constant traffic of the same
magnitude (like game servers). It can't predic peaks but
the accuracy usually gets better by the end of the day/month.
5. Why isn't the estimated value shown with --dumpdb?
That features only dumps the database and since the estimate
is always calculated in realtime, there's no reason to write
it into the database.
6. How is the estimated value calculated?
estimate = ( x / y ) * z
x = traffic so far for the day/month
y = passed minutes/hours ...
z = total minutes/hours ...
7. Why does vnStat show sometimes multiple GB of traffic although
my network connection can't even transfer that much?
OR
Each update adds the complete amount of traffic and 'vnstat -u -D'
claims that the system has been rebooted between updates.
That's most likely a broken kernel. Run with --testkernel
(version 1.2+ required) and see the result. See the next question
for some explanation.
8. Why is there problems with most 2.4.18 kernels?
Every current kernel has a btime (boot time) value in /proc/stat
that indicates when the system was booted. vnStat uses this to
know when the interface counters in the database should be
reseted. Unfortunately, some kernels don't keep the btime value
static even when the system isn't rebooted.
9. warning: integer constant is too large for "long" type -messages
during compiling with gcc 3.xx?
Like that message says, that's only a warning, not an error.
10. About bug reports
Any bug report should at least include an explanation about
how the bug can be reproduced. Having output dumps usually
helps and the --dumpdb feature should be used if there's some
reason to assume the bug has something to do with the database.
Also include information about the used distribution, kernel
(uname -a), compiler (gcc --version) and network interface
card. Read the report again before sending it. :)

View file

@ -1,21 +0,0 @@
# Makefile for source rpm: vnstat
# $Id$
NAME := vnstat
SPECFILE = $(firstword $(wildcard *.spec))
define find-makefile-common
for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done
endef
MAKEFILE_COMMON := $(shell $(find-makefile-common))
ifeq ($(MAKEFILE_COMMON),)
# attept a checkout
define checkout-makefile-common
test -f CVS/Root && { cvs -Q -d $$(cat CVS/Root) checkout common && echo "common/Makefile.common" ; } || { echo "ERROR: I can't figure out how to checkout the 'common' module." ; exit -1 ; } >&2
endef
MAKEFILE_COMMON := $(shell $(checkout-makefile-common))
endif
include $(MAKEFILE_COMMON)

View file

@ -1 +1 @@
9184f79b5e60499bc059f670032291e5 vnstat-1.4.tar.gz
ccaffe8e70d47e0cf2f25e52daa25712 vnstat-1.6.tar.gz

View file

@ -1,23 +1,25 @@
Summary: Console-based network traffic monitor
Name: vnstat
Version: 1.4
Release: 8%{?dist}
Version: 1.6
Release: 1%{?dist}
License: GPL
License: GPLv2
Group: System Environment/Daemons
URL: http://humdi.net/vnstat/
Source0: http://humdi.net/vnstat/vnstat-%{version}.tar.gz
Source1: FAQ.vnstat
Source: http://humdi.net/vnstat/vnstat-%{version}.tar.gz
Requires(pre): /usr/sbin/useradd
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
%description
vnStat is a console-based network traffic monitor that uses the
/proc -filesystem to get the needed information. This means that vnStat wont
actually be sniffing any traffic. See the webpage for few 'screenshots'.
vnStat is a console-based network traffic monitor that keeps a log of daily
network traffic for the selected interface(s). vnStat isn't a packet sniffer.
The traffic information is analyzed from the /proc-filesystem, so vnStat can
be used without root permissions. See the webpage for few 'screenshots'.
%prep
%setup -q
%{__cp} %{SOURCE1} FAQ
# disable maximum bandwidth setting
%{__sed} -i -e "s,MaxBandwidth 100,MaxBandwidth 0,g" cfg/vnstat.conf
%build
%{__make} %{?_smp_mflags} CFLAGS="$RPM_OPT_FLAGS"
@ -31,17 +33,22 @@ actually be sniffing any traffic. See the webpage for few 'screenshots'.
%{__mkdir_p} $RPM_BUILD_ROOT%{_sysconfdir}/cron.d
%{__mkdir_p} $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig
%{__install} -m 644 man/vnstat.1 $RPM_BUILD_ROOT%{_mandir}/man1
%{__install} -m 755 src/vnstat $RPM_BUILD_ROOT%{_bindir}
%{__install} -p -m 644 man/vnstat.1 $RPM_BUILD_ROOT%{_mandir}/man1
%{__install} -p -m 755 src/vnstat $RPM_BUILD_ROOT%{_bindir}
%{__install} -p -m 644 cfg/vnstat.conf $RPM_BUILD_ROOT%{_sysconfdir}
%{__cat} >> $RPM_BUILD_ROOT%{_sysconfdir}/cron.d/%{name} << END
MAILTO=root
# to enable intrerface monitoring via vnstat remove comment on next line
# to enable interface monitoring via vnstat remove comment on next line
# */5 * * * * vnstat %{_sbindir}/%{name}.cron
END
%{__cat} >> $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/%{name} << END
# see also: vnstat(1)
#
# starting with vnstat-1.6 vnstat can also be
# configured via %{_sysconfdir}/vnstat.conf
#
# the following sets vnstat up to monitor eth0
VNSTAT_OPTIONS="-u -i eth0"
END
@ -57,7 +64,7 @@ END
VNSTAT_CONF=%{_sysconfdir}/sysconfig/%{name}
if [ ! -f $VNSTAT_CONF ]; then
exit 0
exit 0
fi
. \$VNSTAT_CONF
@ -69,16 +76,13 @@ END
%{__rm} -rf $RPM_BUILD_ROOT
%pre
useradd -r -s /sbin/nologin -d %{_localstatedir}/lib/%{name} -c 'vnstat user' %{name} >/dev/null 2>&1 ||:
%preun
if [ "$1" -eq "0" ]; then
userdel %{name}
fi
%{_sbindir}/useradd -r -s /sbin/nologin -d %{_localstatedir}/lib/%{name} \
-M -c "vnStat user" %{name} > /dev/null 2>&1 || :
%files
%defattr(-,root,root,-)
%doc CHANGES COPYING FAQ README INSTALL cron pppd
%config(noreplace) %{_sysconfdir}/%{name}.conf
%config(noreplace) %{_sysconfdir}/cron.d/%{name}
%config(noreplace) %{_sysconfdir}/sysconfig/%{name}
%{_mandir}/man1/*
@ -87,6 +91,18 @@ fi
%attr(-,vnstat,vnstat)%{_localstatedir}/lib/%{name}
%changelog
* Sun Jan 13 2008 Adrian Reber <adrian@lisas.de> - 1.6-1
- updated to 1.6
- added vnstat.conf to %%{_sysconfdir}
- fixed a few rpmlint warnings
* Thu Oct 11 2007 Adrian Reber <adrian@lisas.de> - 1.4-10
- rebuilt for BuildID
- updated license tag
* Mon Feb 26 2007 Adrian Reber <adrian@lisas.de> - 1.4-9
- applied patch for spec file cleanup (#229037)
* Fri Sep 15 2006 Adrian Reber <adrian@lisas.de> - 1.4-8
- rebuilt
@ -104,16 +120,16 @@ fi
* Mon Feb 28 2005 Adrian Reber <adrian@lisas.de> 1.4-3
- removed occurences of VNSTAT_DISABLED in
%{_sysconfdir}/sysconfig/%{name} and
%{_sbindir}/%{name}.cron
%%{_sysconfdir}/sysconfig/%%{name} and
%%{_sbindir}/%{name}.cron
* Thu Feb 24 2005 Adrian Reber <adrian@lisas.de> 1.4-2
- removed "#--------------"
- added %%{version} to Source0
- replaced almost empty FAQ with the one from the web
- added INSTALL to %%doc
- added %{_sysconfdir}/sysconfig/%{name}
and %{_sbindir}/%{name}.cron to allow flexible configuration
- added %%{_sysconfdir}/sysconfig/%%{name}
and %%{_sbindir}/%%{name}.cron to allow flexible configuration
- cron script and configuration file defaults to vnstat disabled
- added example scripts from cron/* and pppd/* to %%doc