One of the things folks like to have on their desktop is a skin to monitor the behavior and traffic of their network.
The NetIn / NetOut / NetTotal measures in Rainmeter can be used to monitor all traffic in and out of the NIC (Network Interface Card) on your computer.
However, there are a few considerations you should keep in mind to have a skin that is useful, accurate and informative.
The Interface option
One of the options that can be set on the Net measures is Interface. It will almost always be correct to set this to
Smoothing out the traffic values
The network measures in Rainmeter measure the average number of Bytes sent through the interface every second. However, the nature of network traffic is that it can be very "spiky". Many people find that a network skin has a more useful behavior if we "smooth out" these spikes a bit. So the traffic values "ramp up" and "ramp down" as the values change, rather than having a very jerky behavior.
This can be done by using the AverageSize option on the measure(s). This will cause the measure(s) to average the returned values over the number of skin updates specified in the
Using Network values as a percentage
While it is simple enough to just display the number of Bytes / kBytes / MBytes from the measures in a String meter using AutoScale to format the numbers, you may want to display the traffic in a meter that requires a percentage. This would include the Bar, Bitmap, Histogram, Line, Rotator and Roundline meters.
As discussed in the percentage manual entry, these meters will require that a "range" of values is provided, so the meter knows where in the scale of 0% to 100% the current value of the measure lies.
Some measures, like FreeDiskSpace for instance, automatically set this "range", based on examining the resource being measured. The Network measures also attempt to do this, but with some serious limitations. What the measures do is dynamically set the maximum value for the range to the highest value the measure has been since the skin was loaded or refreshed. This can cause really undesirable behavior on these "percentage" meters until your skin has been running for a while and you have done things to use a large percentage of your total bandwidth.
Note: The Net measures internally measure the traffic data in bits per second. The measures automatically divide both this internal measurement, and any MinValue / MaxValue options by 8, in order to use and display the values as bytes in meters. This means that any MinValue and MaxValue options should be set in bits, not bytes. Rainmeter will do the conversion to bytes automatically when the value(s) are used.
Setting the MinValue / MaxValue options:
The way to correct this behavior is to manually set the MinValue and MaxValue options on the network measure(s). This will explicitly set the possible "range" of values for the measure so that meters requiring a percentage will immediately and correctly know where in the range of 0% to 100% the current value lies.
Finding your maximum download and upload bandwidth:
What we want to do is find and enter the maximum bandwidth your network connection supports. There are a couple of things to keep in mind:
- The maximum bandwidth your ISP told you is a baldfaced lie.
- Rainmeter measures network traffic in bytes per second, while most descriptions of network traffic in other contexts (Wikipedia articles about network traffic, the amount your ISP advertises, many online testing sites, etc.) describe network traffic in bits, or generally Megabits / Mbps per second. A byte is 8 bits. The good news is that Rainmeter will handle this conversion for you.
One of the better places to get a reasonably accurate measurement of your maximum download and upload bandwidth is the SpeedTest site. Simply go to this site, click on Begin Test, and wait. In less than a minute, you will be given the maximum speeds the site sees for your computer.
An alternative, so you can test at more than one place and compare is speedof.me.
As you can see from the image, the values returned by SpeedTest are in Mbps or Megabits per second. This is just what we need for Rainmeter.
So to use these values in your skin, you simply need to plug them into the
MaxValue options for your measures.
There is one more little calculation you need to do though. Remember that Rainmeter measures network traffic in bytes, and although it will handle any conversion from bits (the Mbps from SpeedTest) to bytes, we are talking about Mega or million bits/bytes. Simple enough, a Megabyte is 1048576 bytes.
Let's put it together:
I set my Interface to "Best", my maximum download speed from SpeedTest is "33.12" and my maximum upload speed is "11.71" I want to smooth out the traffic by averaging the results every "5" skin updates:
I have put all this together in a reasonably simple little skin that:
- Tests your network connection to be sure it is active.
- Gets and displays both your LAN (local) IP address and WAN (Internet) IP address. Simply move the mouse over the skin to toggle the value between them. Click the skin to copy your WAN IP address to the Windows clipboard.
- Displays an image that dynamically indicates Downloading/Uploading/Both/Neither/Error as appropriate.
- Displays the current download and upload traffic in bytes/kbytes/Mbytes, scaling automatically.
- Displays a Bar meter for download and upload values, as a percentage of the total bandwidth your connection supports.
I have put some things in
[Variables] to make them easy to change. Be SURE to change the values for your maximum download and upload bandwidth. Feel free to either use this skin as is, or tear it apart to make it your own.