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.
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 <<EOF
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.
For reference, this is an example output from `ss_iterate.sh` without that
hotfix:
```
State Recv-Q Send-Q Local Address:Port Peer
Address:Port Process
ESTAB 5882764 0 127.0.0.1:5001
127.0.0.1:57192 users:(("iperf",pid=409625,fd=4))
cubic wscale:7,7 rto:203.333 rtt:0.012/0.006 ato:40 mss:32768
pmtu:65535 rcvmss:65483 advmss:65483 cwnd:10 bytes_received:8207120107
segs_out:102998 segs_in:179272 data_segs_in:179270 send 218453333333bps
lastsnd:1544 lastack:10 pacing_rate 436906666664bps delivered:1 rcv_rtt:0.033
rcv_space:4784075 rcv_ssthresh:3112347 minrtt:0.012Time: 1587807728.735334444
```
Note the unfortunate location of the timestamp.
--
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
_______________________________________________
Flent-users mailing list
Flent-users@flent.org
http://flent.org/mailman/listinfo/flent-users_flent.org