Red Hat Bugzilla – Bug 53244
rpc.rstatd reports wrong opackets statistics
Last modified: 2015-03-04 20:09:41 EST
From Bugzilla Helper:
User-Agent: Mozilla/4.77 [en] (X11; U; Linux 2.4.3-12 i686)
Description of problem:
using rpc_rstat_3 call allways 0 outgoing packets are reported,
with rpc_rstat_1 call a number much too high is returned
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. use rpc.rstatd to report outgoing packets of a hosts
Expected Results: the sum of transmitted packets from /proc/net/dev should
I think there is an error in rpc.rstatd/rstat_proc.c:
the three structures for the different rstat calls are packed into a
c "union" and thus the if_opackets field of version 1 (struct stats) is
overwriten by the field v_swtch (struct statstime).
Created attachment 30934 [details]
just a test-patch (only works for rstat_3 rpc calls!)
Fixed correctly. Using a struct instead of a union separates the 3 different
structs for data storage and so they won't get overwritten anymore.
Package rusers-0.17-14 should appear in rawhide soon.
Read ya, Phil