Hi, Pleas add the netcount Package to portage. netcount is a command line tool to display PPP network connection statistics. netcount is a package for logging and displaying PPP network traffic on Linux machines. Logging is done via a small shell script which is called during the ip-up, ip-down and system startup processes and from cron, while analysis and printing is done by a program written in Python. The following snippet shows an example of its typical output: Date Time Rx Bytes Tx Bytes Rx Tx Length Mon -02-03 8:53:46 2.412 0.114MB 9.77 0.46kB/s 0:04:07h Mon -02-03 10:43:33 0.009 0.005MB 0.04 0.02kB/s 0:03:41h [...] Mon -02-03 20:54:16 0.851 0.181MB 0.93 0.20kB/s 0:15:17h Mon -02-03 21:14:51 0.719 0.120MB 0.79 0.13kB/s 0:15:08h Mon -02-03 22:37:29 0.267 0.045MB 0.70 0.12kB/s 0:06:18h Mon -02-03 22:55:11 0.050 0.008MB 0.21 0.03kB/s 0:03:51h Mon -02-03 23:04:50 0.152 0.022MB 0.49 0.07kB/s 0:05:12h Mon -02-03 23:10:29 0.091 0.020MB 0.35 0.08kB/s 0:04:19h Mon -02-03 23:37:31 2.011 0.100MB 5.80 0.29kB/s 0:05:47h Mon -02-03 23:43:18 0.000 0.000MB 0.00 0.00kB/s 0:00:01h ------------------------------------------------------------------------------- Mon -02-03 11.619 1.149MB 1.48 0.15kB/s 2:10:39h 7.92% 67.50% The display is highly customizable. You can select from different types of records as well as from different columns to print. netcount shows, among other things, network uptime, byte counts and transmission speeds (either as Tx and Rx bytes or summed up). Command line options also allow you to select from per-connection summaries as well as from daily and monthly summaries and from uptime and byte count percentages with respect to a daily and monthly total. These Logfile = /var/log/netcount/netcount.log MANDIR = /usr/share/man
Created attachment 28470 [details] netcount-0.8c_pre.ebuild (new Package)
please test netcount
Created attachment 30593 [details] installation bug cleaned netcount-0.8c_pre1 installation bugs cleaned.
Created attachment 31262 [details] netcount-0.8c.ebuild i wrote another ebuild for the unmodified sources from heike zimmerer. i added the dialup scripts to docs because i don't know what elso to do with them. Please give a hint. Should the user add them to their startup/down scripts or is there an appropriate place? i don't think that they should be added to ip-up.local and ip-down.local, or?
Created attachment 31263 [details] netcount
Created attachment 31264 [details] glitches
Created attachment 31265 [details] config.make.diff
Created attachment 31266 [details] Makefile.diff
Thank you for the new ebuild it was my first ebuild so I did it not wery well .. The netcount will not be startet by boot but by the start of the dsl connection therefore it is necessary to have the ip-up.local and ip-down.local scripts. This is important to log the traffic if the dsl connection is lost an reconection is stated by the pppoe deamon again. For better understan below a part of the log file /var/log/netcount/netcount.log So the /etc/default/netcount ist not necessary. the lines marked by boot-up and boot-down are results of ip-up.local and ip-down.local. 2004-05-01 17:00:00 sec: 3600 Rx: 151142 Tx: 29467 snap 2004-05-01 18:00:00 sec: 3600 Rx: 5391 Tx: 5953 snap 2004-05-01 18:37:44 sec: 0 Rx: 168276700 Tx: 11159364 boot-down 2004-05-02 11:39:45 sec: 0 Rx: 3005 Tx: 1259 boot-up 2004-05-02 11:45:01 sec: 316 Rx: 371823 Tx: 69060 snap 2004-05-02 12:00:00 sec: 899 Rx: 359935 Tx: 61650 snap 2004-05-02 13:00:00 sec: 3600 Rx: 60852 Tx: 31016 snap 2004-05-02 13:32:11 sec: 0 Rx: 917736 Tx: 210993 boot-down 2004-05-03 07:31:57 sec: 0 Rx: 3012 Tx: 1259 boot-up 2004-05-03 07:45:01 sec: 784 Rx: 6347988 Tx: 957081 snap 2004-05-03 08:00:00 sec: 899 Rx: 2362057 Tx: 52739 snap 2004-05-03 09:00:00 sec: 3600 Rx: 23003240 Tx: 673772 snap
ip-up / ip-down in the file /etc/ppp/ip-up should be added: /usr/local/netcount/netcount-ip-up-local in the file /etc/ppp/ip-down should be added: /usr/local/netcount/netcount-ip-down-local
Hi, - "The netcount will not be startet by boot" INSTALL says: "netcount-init.d netcount-init One of these must be executed on system startup." It only deletes an old nc-sample from $logdir. - "netcount-ip-{up,down}-local" i don't know if i should add them to ip-{up-down}.local. so i didn't change theses files. instead i added the einfo part. i dont't know what's the gentoo way here.
netcount-init: if the pppd has the same pid after a reboot i might happen that the counter will be wrong if the file nc-sample isn't removed. (It seems that this doesn't happen to often.)
By testing the new ebuild I get this error Message. ------------------------------------------------ # emerge netcount-0.8c.ebuild Calculating dependencies ...done! >>> emerge (1 of 1) net-dialup/netcount-0.8c to / >>> md5 src_uri ;-) netcount-0.8c.tar.gz >>> Unpacking source... >>> Unpacking netcount-0.8c.tar.gz to /var/tmp/portage/netcount-0.8c/work gzip: stdin: not in gzip format tar: Child returned status 1 tar: Error exit delayed from previous errors !!! ERROR: net-dialup/netcount-0.8c failed. !!! Function unpack, Line 332, Exitcode 2 !!! failure unpacking netcount-0.8c.tar.gz --------------------------------------------- Before doing this emerge I did the digest: # ebuild netcount-0.8c.ebuill digest and the folder files was created. The Problem seams to be the Download of the tar file, the download does not complete. Traying the wget this happens: # wget http://www.hczim.de/software/netcount-0.8c.tar.gz --18:05:27-- http://www.hczim.de/software/netcount-0.8c.tar.gz => `netcount-0.8c.tar.gz' Resolving www.hczim.de... 212.227.118.101 Connecting to www.hczim.de[212.227.118.101]:80... connected. HTTP request sent, awaiting response... 200 OK Length: unspecified [text/html] [ <=> ] 447 --.--K/s 18:05:27 (4.26 MB/s) - `netcount-0.8c.tar.gz' saved [447] -------------------------------------------------------------------- Trying the text Browser Lynx: # lynx http://www.hczim.de/software/netcount-0.8c.tar.gz the download work perfect. Does somewone know how to fix it.