* [LARTC] tc qdisc show - statistics truncated
@ 2003-01-03 3:35 Jingsong Fu
2003-01-03 3:39 ` Patrick McHardy
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Jingsong Fu @ 2003-01-03 3:35 UTC (permalink / raw)
To: lartc
I am trying to show PRIO qdisc stats, and always get statistics truncated as follows, could someone help to explain why and how correct it?
Thanks,
Jingsong
# tc -s qdisc show dev eth0
qdisc prio 1: bands 8 priomap 7 6 5 4 3 2 1 0 7 7 7 7 7 7 7 7
statistics truncated
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [LARTC] tc qdisc show - statistics truncated
2003-01-03 3:35 [LARTC] tc qdisc show - statistics truncated Jingsong Fu
@ 2003-01-03 3:39 ` Patrick McHardy
2003-01-07 1:34 ` Jingsong Fu
2003-01-07 1:53 ` Patrick McHardy
2 siblings, 0 replies; 4+ messages in thread
From: Patrick McHardy @ 2003-01-03 3:39 UTC (permalink / raw)
To: lartc
On Thu, 2 Jan 2003, Jingsong Fu wrote:
>
> I am trying to show PRIO qdisc stats, and always get statistics truncated as follows, could someone help to explain why and how correct it?
> Thanks,
> Jingsong
>
> # tc -s qdisc show dev eth0
> qdisc prio 1: bands 8 priomap 7 6 5 4 3 2 1 0 7 7 7 7 7 7 7 7
> statistics truncated
Your tc binary is not matching your kernel version, i would say.
Install a new tc version, preferably from source.
Patrick
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
^ permalink raw reply [flat|nested] 4+ messages in thread
* RE: [LARTC] tc qdisc show - statistics truncated
2003-01-03 3:35 [LARTC] tc qdisc show - statistics truncated Jingsong Fu
2003-01-03 3:39 ` Patrick McHardy
@ 2003-01-07 1:34 ` Jingsong Fu
2003-01-07 1:53 ` Patrick McHardy
2 siblings, 0 replies; 4+ messages in thread
From: Jingsong Fu @ 2003-01-07 1:34 UTC (permalink / raw)
To: lartc
I have tried the new tc source, however it still complains on "statistics truncated".
By looking into the function print_qdisc() of iproute2/tc/tc_qdisc.c, shown as follows,
if (RTA_PAYLOAD(tb[TCA_STATS]) < sizeof(struct tc_stats))
fprintf(fp, "statistics truncated");
struct tc_stats
{
__u64 bytes; /* NUmber of enqueues bytes */
__u32 packets; /* Number of enqueued packets */
__u32 drops; /* Packets dropped because of lack of resources */
__u32 overlimits; /* Number of throttle events when this
* flow goes out of allocated bandwidth */
__u32 bps; /* Current flow byte rate */
__u32 pps; /* Current flow packet rate */
__u32 qlen;
__u32 backlog;
#ifdef __KERNEL__
spinlock_t *lock;
#endif
};
RTA_PAYLOAD() is 36 bytes, which is __u32 aligned.
sizeof(struct tc_stats) is 40 bytes which is __u64 aligned.
Has anyone had the same issue, and what's the easy way to resolve it?
Thanks,
Jingsong
-----Original Message-----
From: Patrick McHardy [mailto:kaber@stinky.trash.net]
Sent: Thursday, January 02, 2003 7:39 PM
To: Jingsong Fu
Cc: lartc@mailman.ds9a.nl
Subject: Re: [LARTC] tc qdisc show - statistics truncated
On Thu, 2 Jan 2003, Jingsong Fu wrote:
>
> I am trying to show PRIO qdisc stats, and always get statistics truncated as follows, could someone help to explain why and how correct it?
> Thanks,
> Jingsong
>
> # tc -s qdisc show dev eth0
> qdisc prio 1: bands 8 priomap 7 6 5 4 3 2 1 0 7 7 7 7 7 7 7 7
> statistics truncated
Your tc binary is not matching your kernel version, i would say.
Install a new tc version, preferably from source.
Patrick
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [LARTC] tc qdisc show - statistics truncated
2003-01-03 3:35 [LARTC] tc qdisc show - statistics truncated Jingsong Fu
2003-01-03 3:39 ` Patrick McHardy
2003-01-07 1:34 ` Jingsong Fu
@ 2003-01-07 1:53 ` Patrick McHardy
2 siblings, 0 replies; 4+ messages in thread
From: Patrick McHardy @ 2003-01-07 1:53 UTC (permalink / raw)
To: lartc
Jingsong Fu wrote:
>I have tried the new tc source, however it still complains on "statistics truncated".
>
>By looking into the function print_qdisc() of iproute2/tc/tc_qdisc.c, shown as follows,
>
> if (RTA_PAYLOAD(tb[TCA_STATS]) < sizeof(struct tc_stats))
> fprintf(fp, "statistics truncated");
>
>struct tc_stats
>{
> __u64 bytes; /* NUmber of enqueues bytes */
> __u32 packets; /* Number of enqueued packets */
> __u32 drops; /* Packets dropped because of lack of resources */
> __u32 overlimits; /* Number of throttle events when this
> * flow goes out of allocated bandwidth */
> __u32 bps; /* Current flow byte rate */
> __u32 pps; /* Current flow packet rate */
> __u32 qlen;
> __u32 backlog;
>#ifdef __KERNEL__
> spinlock_t *lock;
>#endif
>};
>
>RTA_PAYLOAD() is 36 bytes, which is __u32 aligned.
>sizeof(struct tc_stats) is 40 bytes which is __u64 aligned.
>
On which platform are you trying ? on i386 i get sizeof(struct tc_stats)
= 36 in userspace (without __KERNEL__ defined).
>
>Has anyone had the same issue, and what's the easy way to resolve it?
>
The easy way is just replacing sizeof(...) by 36 and hoping that it works.
Bye,
Patrick
>
>Thanks,
>
>Jingsong
>
>-----Original Message-----
>From: Patrick McHardy [mailto:kaber@stinky.trash.net]
>Sent: Thursday, January 02, 2003 7:39 PM
>To: Jingsong Fu
>Cc: lartc@mailman.ds9a.nl
>Subject: Re: [LARTC] tc qdisc show - statistics truncated
>
>
>On Thu, 2 Jan 2003, Jingsong Fu wrote:
>
>
>
>>I am trying to show PRIO qdisc stats, and always get statistics truncated as follows, could someone help to explain why and how correct it?
>>Thanks,
>>Jingsong
>>
>># tc -s qdisc show dev eth0
>>qdisc prio 1: bands 8 priomap 7 6 5 4 3 2 1 0 7 7 7 7 7 7 7 7
>>statistics truncated
>>
>>
>
>Your tc binary is not matching your kernel version, i would say.
>Install a new tc version, preferably from source.
>
>Patrick
>
>
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2003-01-07 1:53 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-01-03 3:35 [LARTC] tc qdisc show - statistics truncated Jingsong Fu
2003-01-03 3:39 ` Patrick McHardy
2003-01-07 1:34 ` Jingsong Fu
2003-01-07 1:53 ` Patrick McHardy
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox