flux-core icon indicating copy to clipboard operation
flux-core copied to clipboard

flux-ping: include hostname in output

Open garlick opened this issue 3 years ago • 2 comments

High level comment

0!broker.ping pad=0 seq=1 time=0.198 ms (1c36d225!b4330dc7!b6026d87)

If user input hostname should that be output instead of the rank 0? Might make things clearer?

If we're consistent to how ping works, then it should output rank (i.e. ping outputs IP address). But it does help that ping outputs a "header":

PING www.google.com (142.250.81.228) 56(84) bytes of data.
64 bytes from lga25s74-in-f4.1e100.net (142.250.81.228): icmp_seq=1 ttl=111 time=76.5 ms

so perhaps

FLUX-PING systemd76-pc (rank 0)
0!broker.ping pad=0 seq=1 time=0.198 ms (1c36d225!b4330dc7!b6026d87)

??? just a thought

Originally posted by @chu11 in https://github.com/flux-framework/flux-core/issues/4105#issuecomment-1030570748

garlick avatar Feb 05 '22 15:02 garlick

But it does help that ping outputs a "header":

@grondo commented:

I like that idea, flux ping could always output rank and hostname (when available) in a header. (though I'd drop the FLUX-PING and use flux-ping: to match logging output of all other commands) This would be interesting information when pinging by rank, though it wouldn't work when pinging a service on "any" rank (in that case maybe the right approach is to output the hostname along with rank/service in each line.)

garlick avatar Feb 05 '22 15:02 garlick

though it wouldn't work when pinging a service on "any" rank

One idea would be to have the ping handler tack on the rank to the response, then we could make the output consistent however the target was specified.

garlick avatar Feb 05 '22 16:02 garlick