Re: [Flent-users] [tohojo/flent] ss_iterate.sh yields corrupted output (#204)
On 26 April 2020 21:23:10 CEST, "Dave Täht" wrote: >I note if you are running into heisenbugs, patches exist for both tc >and ss to let it poll on an interval. Exist where? -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/tohojo/flent/issues/204#issuecomment-619636898___ Flent-users mailing list Flent-users@flent.org http://flent.org/mailman/listinfo/flent-users_flent.org
Re: [Flent-users] [tohojo/flent] ss_iterate.sh yields corrupted output (#204)
I'd also really like this to work on osx. /me hides -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/tohojo/flent/issues/204#issuecomment-619612239___ Flent-users mailing list Flent-users@flent.org http://flent.org/mailman/listinfo/flent-users_flent.org
Re: [Flent-users] [tohojo/flent] ss_iterate.sh yields corrupted output (#204)
I note if you are running into heisenbugs, patches exist for both tc and ss to let it poll on an interval. Much better than a script, not accepted upstream -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/tohojo/flent/issues/204#issuecomment-619610436___ Flent-users mailing list Flent-users@flent.org http://flent.org/mailman/listinfo/flent-users_flent.org
Re: [Flent-users] [tohojo/flent] ss_iterate.sh yields corrupted output (#204)
Closed #204 via 7cd5c3aa2dccf30957423013da2f0fc223d03dca. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/tohojo/flent/issues/204#event-3272803966___ Flent-users mailing list Flent-users@flent.org http://flent.org/mailman/listinfo/flent-users_flent.org
Re: [Flent-users] [tohojo/flent] ss_iterate.sh yields corrupted output (#204)
Olivier Tilmans writes: > I am running on a pretty-much bare host, where I have > ```bash > $ ss -V > ss utility, iproute2-ss191125 > ``` > > It turns out that when `ss_iterate.sh` runs `ss -ntp [...]`, `ss` does > not output a new line at the very end. This causes `ss_iterate.sh` to > collate the output with the `Time` field, resulting in the socket stat > records being all empty as the runner fails to parse a timestamp. Thank you for the report! I seems this was already fixed in iproute2 - see commit: 9eee92a41ae6 ("ss: fix end-of-line printing in misc/ss.c") This is dated Dec 4th, 2019, so I guess it's just after the version you're running. > I resolved this locally by tweaking `ss_iterate.sh` to output a new > line between w/e output ss prints, and the timestamp, i.e., I changed > the command string generation to: > > ```diff > command_string=$(cat < for i in \$(seq $count); do > ss -t -i -p -n state connected "dst $target $filter" > + echo '' > date '+Time: %s.%N'; > echo "---"; > sleep $interval || exit 1; > done > EOF > ) > ``` > > I don't have the time to test whether this would have any impact on > hosts where `ss` prints a proper ouput, hence why this is not a PR. An > alternate way could be to put the timestamp generation _before_ the > invocation of `ss`. In both cases, the only issue would be if the > output was parsed without regex--which did not seem to be the case > from a quick glance. Yeah, the Flent parser for Ss output is entirely regex-based, so it just needs the timestamp at the beginning of a line. So I'm fine with adding your change as well :) -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/tohojo/flent/issues/204#issuecomment-619526509___ Flent-users mailing list Flent-users@flent.org http://flent.org/mailman/listinfo/flent-users_flent.org