You can find the Bandwidth usage in cPanel servers using the script given below.
1 |
awk '{sum+=$10} END{printf("MB: %d\n", sum/(1024*1024))}' /usr/local/apache/domlogs/domainname |
Eg:-
1 |
awk '{sum+=$10} END{printf("MB: %d\n", sum/(1024*1024))}' /usr/local/apache/domlogs/example.com |
The output will be like given below.
1 |
MB: 6589 |
This means the bandwidth usage is around 6 GB.