Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not working on Ubuntu 19.10 ? #71

Closed
millsoft opened this issue Nov 13, 2020 · 18 comments
Closed

Not working on Ubuntu 19.10 ? #71

millsoft opened this issue Nov 13, 2020 · 18 comments

Comments

@millsoft
Copy link

Hi, Installed it with cargo. (my os is 64 bit)
when I do gping somehost I only see the blinking cursor in the top left. Normal ping works.
Also tested it as root / with sudo.
here is a demo video: https://youtu.be/RusyEIyL_K4

@orf
Copy link
Owner

orf commented Nov 13, 2020

Would you mind running ping -O -i0.2 google.com and sending me the output here? 5-10 lines will suffice.

@lzivadinovic
Copy link

ping -O -i0.2 google.com 
ping: bad timing interval: 0.2

I dont think ping on ubuntu supports decimal timing intervals at all.

tested on 20.04, and gping also shows blank screen, installed via cargo

@enaut
Copy link

enaut commented Nov 14, 2020

Same Problem on Fedora 33 installed via cargo black screen, blinking cursor, however I can use decimal timing:

❯ ping -O -i0.2 google.com
PING google.com (172.217.22.206) 56(84) bytes of data.
64 Bytes von muc11s01-in-f14.1e100.net (172.217.22.206): icmp_seq=1 ttl=118 Zeit=15.9 ms
64 Bytes von muc11s01-in-f14.1e100.net (172.217.22.206): icmp_seq=2 ttl=118 Zeit=15.7 ms
64 Bytes von muc11s01-in-f14.1e100.net (172.217.22.206): icmp_seq=3 ttl=118 Zeit=15.4 ms
64 Bytes von muc11s01-in-f14.1e100.net (172.217.22.206): icmp_seq=4 ttl=118 Zeit=15.4 ms
64 Bytes von muc11s01-in-f14.1e100.net (172.217.22.206): icmp_seq=5 ttl=118 Zeit=15.4 ms
64 Bytes von muc11s01-in-f14.1e100.net (172.217.22.206): icmp_seq=6 ttl=118 Zeit=15.9 ms
64 Bytes von muc11s01-in-f14.1e100.net (172.217.22.206): icmp_seq=7 ttl=118 Zeit=16.2 ms

@orf
Copy link
Owner

orf commented Nov 14, 2020

🤦 I’ve hard-coded English field names in the regex. I’ll push a fix later today, should be simple enough.

Thank you both for sharing the output

@enaut
Copy link

enaut commented Nov 14, 2020

Yep thats it the following works:

LANG=C gping google.com

@bitwave
Copy link

bitwave commented Nov 15, 2020

works

@alecgirman
Copy link

Works in WSL2 with Ubuntu 20.04

@enaut
Copy link

enaut commented Nov 16, 2020

those comments look like it is fixed but it is not for non english languages... #71 (comment) is a workaround.

@irexiz
Copy link

irexiz commented Nov 16, 2020

LANG=C gping google.com
Doesn't work on ubuntu 20.04 LTS in fish shell

LANG=C ping -O -i0.2 google.com doesn't work either for me, neither in bash nor fish?
ping: bad timing interval: 0.2

@enaut
Copy link

enaut commented Nov 16, 2020

@irexiz mhm you could try ping --help - it might be that you have a non-default ping program (I tried with 18.4 which works as intended)

@irexiz
Copy link

irexiz commented Nov 16, 2020

@enaut I am using iputils ping program, is it not the default?
ping -V
ping from iputils s20190709

@irexiz
Copy link

irexiz commented Nov 16, 2020

Alright I found the issue :D

My environment is set up to have a decimal delimiter defined as , not . The following works:

ping -O -i0,2 google.com

@orf
Copy link
Owner

orf commented Nov 16, 2020

I've come to significantly dislike ping after working on this project 😂. I guess I need to explicitly pass all the locale environment variables to ensure that the output is parsable. Can you possibly try this:

LC_ALL=C LANG=C ping -O -i0.2 google.com and see if that fixes it? I need to find the correct set of variables to pass.

Running localectl status and putting the output here would also help.

@irexiz
Copy link

irexiz commented Nov 16, 2020

The issue is in pinger crate :) https://github.com/orf/pinger/blob/master/src/linux.rs#L11
Although I don't know if calling it an issue is right. Different LC_NUMERIC cause the problem. I had it set to pl_PL.UTF-8. Changing it locally to en_US.UTF-8 fixes everything.

Edit: With LC_ALL=C LANG=C ping -O -i0.2 google.com, it works as intended even with different LC_NUMERIC env variables

@orf
Copy link
Owner

orf commented Nov 16, 2020

Yep, but there are a large number of LC_ variables (https://pubs.opengroup.org/onlinepubs/007908799/xbd/envvar.html).

Ok, thanks for the feedback. LC_ALL seems to take precidence, so I'll modify pinger to pass that on UNIX systems. Thanks!

@orf orf closed this as completed in 712b671 Nov 16, 2020
@orf
Copy link
Owner

orf commented Nov 16, 2020

Hey all,
Thank you for the feedback here. I've fixed the issue by passing the two environment variables, and I'm releasing 0.1.7 to fix it. It will be on crates.io and homebrew soon, I'd love it if you could test it out and confirm it works 👍

@muuki88
Copy link

muuki88 commented Nov 17, 2020

I can confirm it works on

  • Ubuntu 20.04.1 LTS
  • echo $LANG = de_DE.UTF-8

Thanks for the fast fix ❤️

@enaut
Copy link

enaut commented Nov 19, 2020

Works on Fedora 33 too

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants