Robert Milkowski
2009-Aug-04 02:34 UTC
[crossbow-discuss] flowadm -i 1 - shows only first flow
Hi, OSOL, b118> milek at r600:~# flowadm show-flow > FLOW LINK IPADDR PROTO PORT > DSFLD > local_25 iwh0 -- tcp 25 -- > local_22 iwh0 -- tcp 22 -- > milek at r600:~# flowadm show-flow -s -i 1 > FLOW IPACKETS RBYTES IERRORS OPACKETS OBYTES OERRORS > local_25 0 0 0 0 0 0 > local_25 0 0 0 0 0 0 > ^C > milek at r600:~#So show-flow -s -i 1 displays only statistics for one flow. The man page says: flowadm(1M)> flowadm show-flow [-pP] [-s [-i interval]] [-o field[,...]] > [-l link] [flow] > > Show flow configuration information (the default) or > statistics, either for all flows, all flows on a link, > or for the specified flow.[...]> -s, --statistics > > Displays flow statistics. > > -i interval, --interval=interval > > Used with the -s option to specify an interval, in > seconds, at which statistics should be displayed. If > this option is not specified, statistics are > displayed once.Which rather suggest it will display statistics for all flows and not only first one. Looking at the code of flowadm.c from b120: flow_stats() [...]> /* > * If an interval is specified, continuously show the stats > * for only the first flow. > */ > state->fs_firstonly = (interval != 0);Is there a reason why only first flow is displayed? If one wants stats for only one flow one can specify it... shouldn''t all flow stats be displayed if not flow is specified? -- Robert Milkowski http://milek.blogspot.com
venugopal iyer
2009-Aug-04 15:41 UTC
[crossbow-discuss] flowadm -i 1 - shows only first flow
On Tue, 4 Aug 2009, Robert Milkowski wrote:> Hi, > > OSOL, b118 > >> milek at r600:~# flowadm show-flow >> FLOW LINK IPADDR PROTO PORT DSFLD >> local_25 iwh0 -- tcp 25 -- >> local_22 iwh0 -- tcp 22 -- >> milek at r600:~# flowadm show-flow -s -i 1 >> FLOW IPACKETS RBYTES IERRORS OPACKETS OBYTES OERRORS >> local_25 0 0 0 0 0 0 >> local_25 0 0 0 0 0 0 >> ^C >> milek at r600:~# > > So show-flow -s -i 1 displays only statistics for one flow. The man page > says: > > > flowadm(1M) >> flowadm show-flow [-pP] [-s [-i interval]] [-o field[,...]] >> [-l link] [flow] >> >> Show flow configuration information (the default) or >> statistics, either for all flows, all flows on a link, >> or for the specified flow. > [...] >> -s, --statistics >> >> Displays flow statistics. >> >> -i interval, --interval=interval >> >> Used with the -s option to specify an interval, in >> seconds, at which statistics should be displayed. If >> this option is not specified, statistics are >> displayed once. > > > Which rather suggest it will display statistics for all flows and not only > first one. > > Looking at the code of flowadm.c from b120: > > flow_stats() > [...] >> /* >> * If an interval is specified, continuously show the stats >> * for only the first flow. >> */ >> state->fs_firstonly = (interval != 0); > > > Is there a reason why only first flow is displayed?to keep it consistent with the behavior of the existing dladm show-link -s -i.. -venu> If one wants stats for only one flow one can specify it... shouldn''t all flow > stats be displayed if not flow is specified? > > > > -- > Robert Milkowski > http://milek.blogspot.com > > _______________________________________________ > crossbow-discuss mailing list > crossbow-discuss at opensolaris.org > http://mail.opensolaris.org/mailman/listinfo/crossbow-discuss >
Robert Milkowski
2009-Aug-08 09:03 UTC
[crossbow-discuss] flowadm -i 1 - shows only first flow
venugopal iyer wrote:> > > > On Tue, 4 Aug 2009, Robert Milkowski wrote: > >> Hi, >> >> OSOL, b118 >> >>> milek at r600:~# flowadm show-flow >>> FLOW LINK IPADDR PROTO >>> PORT DSFLD >>> local_25 iwh0 -- tcp >>> 25 -- >>> local_22 iwh0 -- tcp >>> 22 -- >>> milek at r600:~# flowadm show-flow -s -i 1 >>> FLOW IPACKETS RBYTES IERRORS OPACKETS OBYTES >>> OERRORS >>> local_25 0 0 0 0 0 0 >>> local_25 0 0 0 0 0 0 >>> ^C >>> milek at r600:~# >> >> So show-flow -s -i 1 displays only statistics for one flow. The man >> page says: >> >> >> flowadm(1M) >>> flowadm show-flow [-pP] [-s [-i interval]] [-o field[,...]] >>> [-l link] [flow] >>> >>> Show flow configuration information (the default) or >>> statistics, either for all flows, all flows on a link, >>> or for the specified flow. >> [...] >>> -s, --statistics >>> >>> Displays flow statistics. >>> >>> -i interval, --interval=interval >>> >>> Used with the -s option to specify an interval, in >>> seconds, at which statistics should be displayed. If >>> this option is not specified, statistics are >>> displayed once. >> >> >> Which rather suggest it will display statistics for all flows and not >> only first one. >> >> Looking at the code of flowadm.c from b120: >> >> flow_stats() >> [...] >>> /* >>> * If an interval is specified, continuously show the stats >>> * for only the first flow. >>> */ >>> state->fs_firstonly = (interval != 0); >> >> >> Is there a reason why only first flow is displayed? > > to keep it consistent with the behavior of the existing dladm > show-link -s -i.. >So maybe both of them should be changed? The current behavior is counter-intuitive and to be honest doesn''t really make sense - why would I want a stats for a random flow? -- Robert Milkowski http://milek.blogspot.com