About this list Date view Thread view Subject view Author view Attachment view

From: Herbert Poetzl (herbert_at_13thfloor.at)
Date: Thu 25 Jul 2002 - 02:26:11 BST


maybe I'm completely wrong, but for my simple
setup all I needed to do for traffic accounting
per ip/vserver was ...

iptables -A INPUT -i eth0 -d <ip1>
iptables -A OUTPUT -o eth0 -s <ip1>
iptables -A INPUT -i eth0 -d <ip2>
iptables -A OUTPUT -o eth0 -s <ip2>
        ....

and
iptables -xvL
which gives me ...

Chain INPUT (policy ACCEPT 7157991 packets, 932430425 bytes)
    pkts bytes target prot opt in out source destination
     246 19163 all -- eth0 any anywhere domain1
    3298 230541 all -- eth0 any anywhere domain2
    5158 339958 all -- eth0 any anywhere domain3
        ....

Chain OUTPUT (policy ACCEPT 7574898 packets, 3080985747 bytes)
    pkts bytes target prot opt in out source destination
    2054 344237 all -- any eth0 domain1 anywhere
    2634 466259 all -- any eth0 domain2 anywhere
    4059 734240 all -- any eth0 domain3 anywhere
        ....

hope it helps,
Herbert

PS: if not, please ignore, because
it's late and I'm tired ...

On Wed, Jul 24, 2002 at 05:56:51PM -0700, Cathy Sarisky wrote:
> Hi Peter,
>
> I'm not sure if I entirely understand your answer. I have the IP used by my
> main (not virtual) server set for eth0 (using linuxconf), with the IP for the
> virtual server listed in the virtual server section. The result from an
> ifconfig -a is that the IP for the main server is listed for eth0, and the IP
> for the virtual server is listed twice. Once for eth0:0, and once for
> eth0:serv (it's a virtual server named serv1...)
>
> The iptables list has both IPs listed in the bandmin rules. I did see some
> traffic logged earlier when I ssh'd to the IP of the vserver but got the main
> server. (I had forgotten to correct my sshd.conf file.) With a vserver
> running and connections going to the vserver properly, I don't see any traffic
> being recorded by bandmin.
>
> If you have another minute to spare for my problem, could you please explain
> what you meant by pre-binding an IP?
>
> Thanks in advance,
> Cathy Sarisky
>
> On Wednesday, July 24, 2002 5:02 PM, Peter Kwan Chan [SMTP:peterkwanchan_at_yah
> oo.com] wrote:
> > Let me venture a guess. You don't have IP pre-binded on the main server,
> > and instead rely on vserver to bind the IP for you?
> >
> > If this is the case, bandmin won't know about your IP, and thus won't
> > record the traffic.
> >
> > Peter
> >
> > -----Original Message-----
> > From: Cathy Sarisky [mailto:sarisky_at_caltech.edu]
> > Sent: Wednesday, July 24, 2002 5:44 PM
> > To: 'vserver_at_solucorp.qc.ca'
> > Subject: [vserver] bandmin?
> >
> > I need to track bandwidth usage per vserver (which is per ip, since I'm
> > not
> > using the multi-ip functionality).
> >
> > I thought I'd use bandmin for this, since my dedicated server provider
> > says
> > that I can't use their router to track individual IPs with mrtg.
> >
> > Bandmin is doing fine with the IP assigned to the main server, but isn't
> > seeing
> > traffic to the vserver.
> >
> > Does someone have this working with bandmin, or some other solution?
> > Thanks!
> >
> > Cathy Sarisky


About this list Date view Thread view Subject view Author view Attachment view
[Next/Previous Months] [Main vserver Project Homepage] [Howto Subscribe/Unsubscribe] [Paul Sladen's vserver stuff]
Generated on Wed 06 Nov 2002 - 07:03:41 GMT by hypermail 2.1.3