nschloe / tiptop

:desktop_computer: Command-line system monitoring
MIT License
1.77k stars 70 forks source link

fixes to make tiptop work on macOS #7

Closed jkbecker closed 3 years ago

jkbecker commented 3 years ago

These are just some basic fixes and a WIP, not ready for merging yet.

Turns out some neat features have to be solved differently for macOS specifically, or are specifically Linux-only, which will make them either go missing or have weird values on non-Linux OSes.

Fixes #6.

jkbecker commented 3 years ago
Screenshot 2021-11-13 at 20 06 26

The changes above result in this runtime behavior - it's definitely suboptimal because some crucial information is missing, but I believe this can be added by looking into how glances gets these values (for example). Without these changes, none of the panels are able to run, as there are exceptions thrown in _cpu.py, _mem.py, _info.py, and _proc_list.py.

nschloe commented 3 years ago

I'd already merge it now because the PR adds functionality and removes nothing, but let me know when you yourself are happy with it.

jkbecker commented 3 years ago

Sure, maybe that's a good idea - I can't promise that I'll be able to work on any of the more extensive fixes any time soon, so it's probably better to not hold this here artificially if you're ok with the changes.

nschloe commented 3 years ago

I've now merged a bunch of PRs which should fix most (?) of the issues. Could you try again with v0.0.6?

jkbecker commented 3 years ago

All merged changes are an improvement except for the memory change

        values = [mem.used, mem.available, mem.cached if hasattr(mem, 'cached') else 0, mem.free]

which seems to be reverted in the other PRs. Should I add it back or do you prefer a different way of mitigating this?

nschloe commented 3 years ago

This is handled differently now.

jkbecker commented 3 years ago

Ah, I see what you were doing there... it's missing the values, which still break. Fix coming up, I think that should be it then.

nschloe commented 3 years ago

A more fitting fix is in #18.

nschloe commented 3 years ago

I think all of the issues here are fixed now.