Ok so in some spare time i have developed a nodejs/socketio application that streams video but i would like to know what sort of stats its running at, i have my activity monitor running and currently with 2 users sending each other data streams and the stats are as follows:
%CPU: 6.0
Threads: 5
Real Memory: 59.6mb
How can i work out the total MB/GB of data sent on the server?
To keep track of the bandwidth usage of a Windows Server in real-time, you can use the SolarWinds Bandwidth Gauges. This tool is part of the Engineer's Toolset and you can set it up to monitor any of the devices on your network that you have identified with SNMP.
One way to assess a network's bandwidth usage is to run a network internet speed test. This allows you to view your network download and upload speeds in near real time. Running a test like this during several points in the day can give a general idea of overall usage and help with measuring bandwidth usage trends.
Bandwidth utilization is calculated via SNMP polls. Furthermore, it is calculated using the difference between two timestamps. Therefore, the calculations to manually perform this are considered time consuming.
My suggestion would be to add a counter in your app.
You should be able to add something like the following:
socket.on('message', function(message, callback) { myCounter += sizeof(message); })
The key here would be identifying the sizeof
the message you are sending. If it's a buffer, then you can just count bytes. I'm not clear what type of packing they use when sending JSON.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With