About NetLog

NetLog is a simple perl program that allows you to monitor the uptime and the network traffic of your computer. Therefor it keeps log of these data in a database. It can show the uptime and network traffic for each day, week or month and in many other different ways. It is also able to generate a summary of the shown data and a prognosis for the current month or week.

NetLog gets all information about uptime and network traffic from the /sys and /proc filesystems, it is not a packet sniffer. It is only running on Linux systems with activated sysfs, so you need at least a 2.6.x kernel. You also need perl and the perl module Date::Calc.

If you have ideas, comments or if you found a bug in NetLog, please feel free to contact me via email.


Installing NetLog is very simple. Just unpack the downloaded archive, change to the created directory and type these three commands:

perl Makefile.PL
make install

NetLog does not require installing via this mechanism. You can also copy the 'netlog' script to the place you want to have it.

If you want NetLog to update the database automatically you have to create a cronjob. By typing "crontab -e" (you should do this as root, because Netlog will create it's databases in "/var/lib/netlog" by default) you can edit your crontab. It is also possibily to edit "/etc/crontab". Append a line like that which updates the database every five minutes:

*/5 * * * * <path_to_netlog>/netlog -u <interfaces>

Replace <path_to_netlog> by the path of the directory where you have netlog installed in. If you don't know where netlog is installed in, try the commands "which netlog" or "type netlog". Normally it is installed in "/usr/bin/".
Replace <interfaces> by the names of the interfaces you want to observe (for example "eth0"). Multiple interfaces have to be seperated by commas.

See "man 5 crontab" for further information about crontabs.


To see the traffic of all days in the database you have only to type "netlog". If you want to see only the traffic of the current month use "netlog -c". For the traffic of a specific day, month or year use the options "--day", "--month" or "--year". Netlog has some more features, the flag "-h" and the manpage shoud help you.


You can download the latest version of NetLog at the download page of NetLog.
If you need further information about NetLog, please read it's manpage.


These Screenshots are showing NetLog running on my computer in konsole, the terminal emulation of the KDE project.

NetLog showing uptime and network traffic of the current month:

Screenshot of NetLog

The daily average for each month:

Screenshot of NetLog

Only the days in August 2006:

Screenshot of NetLog

Copyright © 2007 by Severin Lüst. All rights reserved.