Project Nayuki

NetPerSec (Nayuki’s version)


NetPerSec is a lightweight Windows application that displays the current rate of network traffic being received and sent by your computer. The mini speed graph in the system tray (notification area) is especially useful for catching network problems at a glance, such as a sudden pause in data transfer.

Originally written by Mark Sweeney in year , NetPerSec is distributed by PC Magazine and Ziff Davis Media. The official product page is NetPerSec (a paid download).

This page features an updated version of the program by Nayuki in – the functionality is slightly improved and the source code is heavily cleaned up. Despite the work I contributed to this project, this is considered to be only a maintenance update to the NetPerSec application. Windows C++ programming still confounds me enough that there is little hope of adding or modifying any non-trivial part of the software.


New standalone application program: NetPerSec-20160516.exe (Windows 32-bit EXE, 3.0 MB)

Usage notes:

  • Unlike the original version, this doesn’t one come with an installer. You will need to put the EXE in any folder of your choice. On the first run, it will generate the configuration file NetPerSec.ini in the same folder.

  • The “Start with Windows” option works in Windows XP but seems to do nothing in Windows Vista/7/8 (probably due to UAC?). So you need to manually create a shortcut in the Start menu’s “Startup” folder. Automatically starting NetPerSec is an excellent choice, according to my experience.

Old version setup program (year ): NetPerSec-1.1-setup.exe (32-bit installer, 0.8 MB)
(The inner contents are original, but the outer EXE is packed by me.)

Source code repository at GitHub (for developers):

Improvements and changes

Windows visual styles (themes)

Themed widgets are now supported (example screenshot on Windows XP, on Windows 7). The old version renders the controls only in the flat-looking Windows Classic theme.

Histogram tray icon

The histogram icon is now borderless, has a gradient background, and has antialiasing for the graph. (The bar icon option is unchanged.)
New: Old:

Data units

The unit of “Bytes” is changed to “B”, “bits” is changed to “bit”, and binary prefixes (according to the IEC 60027-2 standard) are used when measuring in bytes (e.g. KiB, MiB, GiB).

Default colors

The average color was changed from teal to yellow, and the graph background color was changed from white to light gray.

Bug fixes
  • The histogram graph display was needlessly one sample delayed from the available data. (Fixed in commit 4feac92b3f44.)

  • An instantaneous transfer rate above 65.536 MB/s (~524 Mb/s) is now drawn properly in the main graph. (Previously it drew bars that were way too high.) (Fixed in commit 3a7e2b9e883e.)

  • When a network adapter resets (due to Ethernet or Wi-Fi disconnect/reconnect, sleep/hibernate, etc.), there is no longer a moment of spurious 4 GiB data transfer. (Fixed in commit aae7d5943f03.)

  • When NetPerSec starts up, the received and sent totals now start at zero. (Previously it was an essentially arbitrary number, which was the data transfer of the current network uptime session modulo 232 bytes.) (Also fixed in commit aae7d5943f03.)

  • Calculating the average speed of an interval with over 2 GB of data transferred (e.g. 100 MB/s sustained for 20 seconds) is now correct – it no longer resulted in integer overflow or unreasonably high graphs at 4 GB/s. (Fixed in commit c23d743efa99.)

  • When sleeping/waking a computer system, this event sometimes results in a glitch spike of high network transfer rate (even though no such data transfer actually took place). Now the data-gathering logic has been amended so that a computer with a single active network adapter will no longer see such glitch spikes. (Fixed in commit 5951b6cda175.)

Decimal places

Numbers are now shown with 2 or 3 decimal places, instead of 1 decimal place previously. This is especially useful for watching small increments in the total data transferred.

Auto scale

The auto scale uses exponentially increasing preferred numbers, e.g. 10, 15, 25, 40, 60, 100, 150, etc.

Manual scale

The manual scale also uses preferred numbers (1, 3, 10, 30, 100, 300, etc.) and adds more range on the high end.

About tab

The text was rearranged and credits were added for Nayuki.

File size

The EXE file is 3028 KB, whereas the official old version is only 193 KB. This is a slightly unfortunate regression, and I don’t know why it happened.

Help button

The Help button no longer functions properly. Moreover, no help file (.hlp) is included.

Source code

The entire collection of source code was massively reformatted and simplified by Nayuki. The code was made stylistically consistent, and redundant pieces of logic were removed. As a result, the original ~10000 lines of code were cut down by a decent 30%. For descriptions and details of the clean-up effort, see the project repository’s commit log.

Build notes

  • The Win32 C++ source code was included in the official NetPerSec distribution package, which is what made it possible to produce this new version of the software.

  • I compiled the code using Microsoft Visual Studio Community 2015. I’m sure many other versions of Visual Studio will work too, since NetPerSec was probably developed in Visual Studio 6 (which is now very old).

  • You need to install Microsoft Help Workshop (hcwsetup.exe) and add the program’s folder to your PATH environment variable, because the build invokes hcw.exe.

  • To support Windows visual styles, you need to add the manifest file (manifest.xml) to the build.