Best Way to Monitor/Measure Real-time Bandwidth on Site - Background Video Issue?

Operating System & Version
CloudLinux 7.9
cPanel & WHM Version
98.0.9

jethrodesign

Well-Known Member
Feb 17, 2012
60
2
58
cPanel Access Level
Root Administrator
Hi, we have 1 account/site that is currently still in development on our dedicated server. So I am the only one viewing and accessing this site. But it is using VERY large amounts of bandwidth periodically (1GB+/day), with JUST ME working on it or it sitting idle in my browser tab.

We know it has something to do with a background video that auto-plays on the Home page. But need some tools to help better diagnose the specific issue, as lots of websites have background videos, so we want to see if something is not configured properly.

The default bandwidth/metrics apps that come with cPanel seem too general or geared towards reviewing after-the-fact (like looking at bandwidth for yesterday, last week, etc.). Plus, they all give different results (sometimes drastically different). We're wondering if there is anything that would show the real-time bandwidth as we're trying different things, or even when the site is sitting idle in my browser window?

For reference, the video is an .mp4 file that is 8MB. It is 12 seconds long, 720p, 5Mbps. But it auto-repeats in the background. It was added as a basic video background on a WordPress site using a default Cover block, if that helps at all.

We have not enabled the caching plugin on the site yet, as that is one of the things we want to be able to monitor to see if it is as simple as that.

- Does a single 8MB video being viewed by a single viewer generating 1GB+/day bandwidth sound reasonable?!? I can't imagine what it might be when publicly viewable.

Let me know
 
Last edited by a moderator:

andrew.n

Well-Known Member
Jun 9, 2020
674
209
43
EU
cPanel Access Level
Root Administrator
If you login to cPanel you will have the option to review stats there. Choose AwStats which will show you exactly where the bandwidth coming from.
 

jethrodesign

Well-Known Member
Feb 17, 2012
60
2
58
cPanel Access Level
Root Administrator
Hi, thanks for the replies. Yes, I am familiar with AWStats, Webalizer, Bandwidth, etc. And these did help me verify that it was the video that was causing the bandwidth, and that it was coming from my IP. I do wonder they they vary so much from each other, though. For instance, AWStats says total bandwidth for Oct = 17GB. Webalizer = less than 10GB; viewing bandwidth usage in WHM = 7.7GB (where limit is set as 9.77GB); etc.

But they are more daily/monthly snapshot type of reviews. I guess I was hoping for something a bit more realtime. That way I could immediately see if just having the video visible in an open tab was causing a steady stream, and if enabling caching or some other configuration change on the video would cause it to immediately stop.

I'm open to anything additional in WHM, possibly command-line (with decent instructions), or even a separate service or tool.

- Thanks.
 

jethrodesign

Well-Known Member
Feb 17, 2012
60
2
58
cPanel Access Level
Root Administrator
Hi, was just wondering what exactly running 'Process Statistics for User' in WHM (see: https://support.cpanel.net/hc/en-us/articles/360052575514-How-to-run-stats-for-a-user-manually) actually does, and if that could be utilized with one or more of the default cPanel bandwidth tools to give me a more 'immediate snapshot' of current bandwidth usage?

- Does this force one or more of the default bandwidth apps (e.g., AWStats, Webalizer, Bandwidth, etc.) to do an 'instant refresh' of the measurements, which would then be available to see right away in the app?

Was just wondering if I could run the 'Process Statistics' command to give a 'baseline' bandwidth for the day at that specific time, then do some settings changes or modifications and run it again to see how much it had increased?!? It would have to be relatively precise/accurate to tell exactly what was making a difference, I suppose.

- If I do this, what would be a reasonable minimum interval to run? Every 30min? Every 60min? Etc. Would want enough bandwidth to be stored to see any difference, but not have to spend all day doing it.

Thanks!
 

cPanelAnthony

Administrator
Staff member
Oct 18, 2021
533
47
103
Houston, TX
cPanel Access Level
Root Administrator
Hello! Stats and bandwidth may be related, but they are also separate. Running 'Process Statistics for User' will pull data from the Apache logs to determine usage. It will gather the "current stats" as explained here.


The following article might help as well.


It would be possible to set up a cronjob to update the statistics more often. However, I cannot safely say what a good interval for this would be; it might be worth doing some testing to see how long the process takes each time, and how much server resources get devoted to the process.
 

jethrodesign

Well-Known Member
Feb 17, 2012
60
2
58
cPanel Access Level
Root Administrator
OK, thanks for the insight. I had always wondered why the different bandwidth metrics tools varied so greatly in what they were showing (they are usually ALL pretty different). That article seemed to indicate that the Bandwidth app would be the most accurate. Unfortunately, it only breaks down stats per day, so probably not going to be too useful to me.

I'll keep searching for an easy-to-use tool that will offer more real-time bandwidth statistics to help me get to the bottom of my issue.
 
  • Like
Reactions: cPanelAnthony