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

No graphs displayed #8

Closed
xxxserxxx opened this issue Feb 15, 2020 · 13 comments
Closed

No graphs displayed #8

xxxserxxx opened this issue Feb 15, 2020 · 13 comments
Labels
bug Something isn't working

Comments

@xxxserxxx
Copy link
Owner

Make sure gotop is updated and the issue still persists before creating an issue.
Check current version with gotop -v and check the latest version from the releases tab on GitHub.
$./gotop -v
1.4.1
Please give the following info when creating an issue:

  • The output of uname -a
    Linux neuro 4.15.0-29-generic #31-Ubuntu SMP Tue Jul 17 15:39:52 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
  • Terminal shell (like zsh or bash)
    zsh
  • Terminal emulator (like iTerm or gnome terminal)
    Xterm
  • Using tmux?
    Nope

I installed gotop as stated in the README.md file, however after running it I do not see the cpu/men usage or network graph.

screenshot_2018-07-24_09-11-11

@xxxserxxx xxxserxxx added the bug Something isn't working label Feb 15, 2020
@xxxserxxx
Copy link
Owner Author

Hmm, it seems like there might be an issue rendering the braille characters for the graphs. Could you try a different terminal emulator and see if the problem still occurs?

@xxxserxxx
Copy link
Owner Author

I have the same issue when using xterm, but no problem when using sakura term. Is there any way to make it work with xterm?

@xxxserxxx
Copy link
Owner Author

Not that I know of. It works for me on xterm although the braille characters for the graphs don't look right. There might be an issue with font patching so you could try playing around with adding font packages and seeing if that changes anything.

@xxxserxxx
Copy link
Owner Author

Network graph won't work on the Linux console as well (which is an unfortunate thing to happen in a system without a graphic terminal). CPU and memory graphs are discernible (in a lower resolution), but network looks really funny. I didn't find any console font with the required braille characters -- perhaps it's time to make our own font?

@xxxserxxx
Copy link
Owner Author

Works here on xterm. Probably a font issue 🤔

@xxxserxxx
Copy link
Owner Author

Certainly a font issue. I'll see how to add the appropriate characters to the console font.

image

@xxxserxxx
Copy link
Owner Author

Fixed by creating an appropriate Linux console font with the required Unicode code points (braille and block characters). @cjbassi, I can contribute the psf font to the project to allow console users to see the graphs correctly if you think it could be useful.

image

@xxxserxxx
Copy link
Owner Author

@cmatsuoka That would be great if you could contribute the font! I run into the same issue in the Linux console so I'm glad you got that working. Would this also fix issues for terminal emulators?

@xxxserxxx
Copy link
Owner Author

So I also found https://github.com/wiktor-b/leggie, which might work too. I'll have to figure out how to get it to work on Arch Linux, but if anyone wants to give it a try, let me know if it works for them.

edit: Couldn't seem to get that one to work for me.

@xxxserxxx
Copy link
Owner Author

I'll refine the font file and issue a pull request. The font is a 512-glyph 16x8 fixed size psf for console, and I'm not sure if you can use it on graphic terminal emulators (but I can verify that).

@xxxserxxx
Copy link
Owner Author

The PSF font is in PR #135. (I apologize for taking so long to send such a simple PR, but things were a bit busy here in the last few weeks.)

@xxxserxxx
Copy link
Owner Author

@cmatsuoka, I was looking over this again, and trying to see if there was a way for gotop to use the font directly. I'm thinking that if we I can't build it in, the best approach for X users would be to recommend that they install a font using their distribution's package manager -- unless there's a global command to enable a font for every terminal, e.g., through Xresources. I'm not sure that Xresources works universally, though, as I think it doesn't work with st for example.

For Linux console users, I will include your PR and provide instructions. If you have a recommendation for the X users, please let me know.

I'm going to leave this open for a bit.

@xxxserxxx
Copy link
Owner Author

9f4f1e6 merged the font, and I've since added instructions to the README on how to use them. I'm tempted to bundle the PSF and add code to 1) detect if running in a Linux console, 2) write out the PSF to /tmp, 3) exec setfont on the PSF, and 4) relauch. Tempted. This is a lot of code and bulk to gotop for an edge case that has a 2-line shell workaround, so I'm closing this for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant