Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Outpkts is zero, while "ipvsadm -Ln --stats" this field is non-zero #3

Closed
lewislyou opened this issue Sep 28, 2016 · 4 comments
Closed

Comments

@lewislyou
Copy link

No description provided.

@lewislyou lewislyou changed the title Outpkts is zero, while "ipvsadm -Ln --stats" this field is no-zero Outpkts is zero, while "ipvsadm -Ln --stats" this field is non-zero Sep 28, 2016
@tehnerd
Copy link
Owner

tehnerd commented Sep 28, 2016

will look in two -three days

@lewislyou
Copy link
Author

i review the code and find you make a mistake.
func (stats *Stats) InitFromAttrList(list map[string]SerDes) { //not tested conns := list["CONNS"].(*U32Type) inpkts := list["INPKTS"].(*U32Type) outpkts := list["OUTPKTS"].(*U32Type) inbytes := list["INBYTES"].(*U64Type) outbytes := list["OUTBYTES"].(*U64Type) cps := list["CPS"].(*U32Type) inpps := list["INPPS"].(*U32Type) outpps := list["OUTPPS"].(*U32Type) inbps := list["INBPS"].(*U32Type) outbps := list["OUTBPS"].(*U32Type) stats.Conns = uint32(*conns) stats.Inpkts = uint32(*inpkts) stats.Outpps = uint32(*outpkts) stats.Inbytes = uint64(*inbytes) stats.Outbytes = uint64(*outbytes) stats.Cps = uint32(*cps) stats.Inpps = uint32(*inpps) stats.Outpps = uint32(*outpps) stats.Inbps = uint32(*inbps) stats.Outbps = uint32(*outbps) }

you see, you don't update the field Outpkts

@tehnerd
Copy link
Owner

tehnerd commented Sep 29, 2016

yeah seems like a misspell
stats.Outpps = uint32(*outpkts)
must by Outpkts instead.
will test/fix tomorrow

@tehnerd
Copy link
Owner

tehnerd commented Sep 30, 2016

fixed in 56a2363

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants