Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Shells Virtual Desktop
BMail.ag - Secure Email Service
Server.net
CPLicense.net
VPS Server
Buy VPN
Vultr
VMs for AI
HostDare
HostDare
ReliableSite White-Label Dedicated Hosting for Resellers
25% Recurring Discount on NVMe VPS
InterServer VPS
BMail.ag - Secure Email Service
Best VPN
High-Performance Bare Metal Server Solutions
Karvl.com
Server Mania Cloud Hosting
DataWagon Hosting
AlphaVPS Hosting
Evoxt.com
Clouvider
VPS Hosting with NVMe
Residential IPs in the US & 4G Mobile Proxies in EU & US with Unlimited Bandwidth
ReliableSite White-Label Dedicated Hosting for Resellers
Rabisu - Hosting Solutions
Shells Virtual Desktop
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

Monitor bandwidth use of an openvz container, from shell?

DroidzoneDroidzone Member
edited October 2013 in Help

I have a system to monitor multiple openvz containers distributed across different hosts, and report their live status to a central service. At the moment, the program can ping IPs, get port open status, live RAM, CPU and disk use. What I dont have at the moment is traffic use monitoring. I'm wondering if you know of methods to monitor traffic use (data use) so that I can integrate such a function into the script.

Since my worker script is perl based, I'd ideally like to have a command that can be run on a shell instance, and get an output.

Comments

  • http://openvz.org/Monitoring_bandwidth_of_containers

    You can probably edit that or take the parts out that you need to serve your purpose.

    Thanked by 1Droidzone
  • DroidzoneDroidzone Member
    edited October 2013

    @WebSearchingPro said:
    http://openvz.org/Monitoring_bandwidth_of_containers

    You can probably edit that or take the parts out that you need to serve your purpose.

    Awesome. Just what I wanted. Now if I could only find out whether I can get the bandwidth quota from within the container...

  • @joelgm said:
    Awesome. Just what I wanted. Now if I could only find out whether I can get the bandwidth quota from within the container...

    You can use the ifconfig data or iptables of the container within the container, you cannot access the hostnode's data from within the container unfortunately.

  • you can use vnstat

    vnstat -h : hourly
    vnstat -d : days and so on

  • @5n1p said:
    you can use vnstat

    vnstat -h : hourly
    vnstat -d : days and so on

    Just make sure you set the interface to venet0 in /etc/vnstat.conf so that live traffic monitoring works, vnstat -l.

  • In my experience vnstat isn't very accurate anymore. It used to be and I even wrote a guide on installing it on my site. But for some reason newer versions are no longer accurate.

Sign In or Register to comment.