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

Display glitch in the latest macOS homebrew build #2817

Closed
shawnyeager opened this issue Jun 4, 2024 · 15 comments
Closed

Display glitch in the latest macOS homebrew build #2817

shawnyeager opened this issue Jun 4, 2024 · 15 comments

Comments

@shawnyeager
Copy link

Describe the bug
Prior to this release, the frame around the core CPU/MEM/SWAP/etc. stats was whitespace. Now it's a misrendered character (see screenshot).

To Reproduce
Steps to reproduce the behavior:

  1. Start Glances

Expected behavior
Divider characters render properly

Screenshots
CleanShot 2024-06-04 at 14 51 41@2x

Environement (please complete the following information)

  • macOS 14.5 (23F79)
  • Glances 4.0.7 installed via homebrew
===============================================================================
Glances 4.0.7 (/opt/homebrew/Cellar/glances/4.0.7/libexec/lib/python3.12/site-packages/glances/__init__.py)
Python 3.12.3 (/opt/homebrew/Cellar/glances/4.0.7/libexec/bin/python)
PsUtil 5.9.8 (/opt/homebrew/Cellar/glances/4.0.7/libexec/lib/python3.12/site-packages/psutil/__init__.py)
===============================================================================
alert         [OK]    0.00006s
[]
amps          [OK]    0.00024s
[]
cloud         [OK]    0.00007s
{}
connections   [OK]    0.00313s
{'net_connections_enabled': False, 'nf_conntrack_enabled': True}
containers    [OK]    0.00005s
{}
core          [OK]    0.00006s
{'log': 8, 'phys': 8}
cpu           [OK]    0.00027s
{'cpucore': 8,
'ctx_switches': 0,
'ctx_switches_gauge': 7913,
'idle': 90.7,
'interrupts': 0,
'interrupts_gauge': 160902,
'nice': 0.0,
'soft_interrupts': 0,
'soft_interrupts_gauge': 447814565,
'syscalls': 0,
'syscalls_gauge': 286333,
'system': 3.1,
'time_since_update': 2.0798439979553223,
'total': 0.0,
'user': 6.2}
diskio        [OK]    0.00117s key=disk_name
[{'disk_name': 'disk0',
 'key': 'disk_name',
 'read_bytes': 0,
 'read_bytes_gauge': 602160398336,
 'read_count': 0,
 'read_count_gauge': 23682732,
 'time_since_update': 2.082267999649048,
 'write_bytes': 0,
 'write_bytes_gauge': 253776216064,
 'write_count': 0,
 'write_count_gauge': 11305070}, ...]
folders       [OK]    0.00004s
[]
fs            [OK]    0.00189s key=mnt_point
[{'device_name': '/dev/disk3s1s1',
 'free': 148584849408,
 'fs_type': 'apfs',
 'key': 'mnt_point',
 'mnt_point': '/',
 'percent': 6.5,
 'size': 494384795648,
 'used': 10263076864}, ...]
gpu           [OK]    0.00008s
[]
help          [OK]    0.00001s
None
ip            [OK]    0.00003s
{}
irq           [OK]    0.00002s
[]
load          [OK]    0.00005s
{'cpucore': 8, 'min1': 1.4091796875, 'min15': 2.6171875, 'min5': 2.173828125}
mem           [OK]    0.00010s
{'active': 4750376960,
'available': 4820975616,
'free': 4820975616,
'inactive': 4692164608,
'percent': 71.9,
'total': 17179869184,
'used': 12358893568,
'wired': 2636218368}
memswap       [OK]    0.00009s
{'free': 1802043392,
'percent': 44.1,
'sin': 442553073664,
'sout': 8265269248,
'time_since_update': 2.087575674057007,
'total': 3221225472,
'used': 1419182080}
network       [OK]    0.00321s key=interface_name
[{'alias': None,
 'bytes_all': 2048,
 'bytes_all_gauge': 1493684224,
 'bytes_all_rate_per_sec': 1015.0,
 'bytes_recv': 1024,
 'bytes_recv_gauge': 746842112,
 'bytes_recv_rate_per_sec': 507.0,
 'bytes_sent': 1024,
 'bytes_sent_gauge': 746842112,
 'bytes_sent_rate_per_sec': 507.0,
 'interface_name': 'lo0',
 'key': 'interface_name',
 'speed': 0,
 'time_since_update': 2.0176279544830322}, ...]
now           [OK]    0.00007s
{'custom': '2024-06-04 14:55:00 CDT', 'iso': '2024-06-04T14:55:00-05:00'}
percpu        [OK]    0.00006s key=cpu_number
[{'cpu_number': 0, 'idle': 0.0, 'key': 'cpu_number', 'nice': 0.0, 'system': 0.0, 'total': 100.0, 'user': 0.0}, ...]
ports         [OK]    0.00028s
[]
processcount  [OK]    0.07289s
{'pid_max': 0, 'running': 683, 'sleeping': 0, 'thread': 2903, 'total': 683}
processlist   [OK]    0.00030s
[]
psutilversion [OK]    0.00002s
'5.9.8'
quicklook     [OK]    0.00008s
{'cpu': 0.0,
'cpu_hz': 3504000000.0,
'cpu_hz_current': 3504000000.0,
'cpu_log_core': 8,
'cpu_name': 'CPU',
'cpu_phys_core': 8,
'load': 32.7,
'mem': 71.9,
'percpu': [{...}, {...}, {...}, {...}, {...}, {...}, {...}, {...}],
'swap': 44.1}
raid          [OK]    0.00001s
{}
sensors       [OK]    0.00000s key=label
[{'key': 'label',
 'label': 'Battery',
 'status': 'Discharging',
 'type': <SensorType.BATTERY: 'battery'>,
 'unit': '%',
 'value': 38}, ...]
smart         [NA]
system        [OK]    0.00000s
{'hostname': 'atlas.local',
'hr_name': 'Darwin 14.5 64bit',
'os_name': 'Darwin',
'os_version': '14.5',
'platform': '64bit'}
uptime        [OK]    0.00003s
{'seconds': 679828}
version       [OK]    0.00001s
'4.0.7'
wifi          [OK]    0.00001s
[]
===============================================================================
Total time to update all stats: 0.08743s
===============================================================================
@nicolargo
Copy link
Owner

Strange...

A first workaround is possible (remove the separators line):

[outputs]
separator=False

or a second one (change the separator to an simple ascii char):

glances --disable_unicode

But had to understand why the separator character is not display in MacOS terminal (it works fine on Linux).

Can you please open a Python terminal and copy/paste the result of the followings commands line (example on my Linux system):

image

@nicolargo nicolargo changed the title Display glitch in the latest macOS homebrew build (v4.0.7) Display glitch in the latest macOS homebrew build Jun 8, 2024
@crishoj
Copy link

crishoj commented Jun 8, 2024

Can you please open a Python terminal and copy/paste the result of the followings commands line (example on my Linux system):

On my Mac (which also exhibits the incorrectly rendered line in Glances):

image

@nicolargo
Copy link
Owner

Do you run Glances with sudo ?

@ChillarAnand
Copy link

I was facing the same issue in older glances.

With the latest version, I am not able to reproduce this issue. It's working fine now.

Screenshot 2024-06-08 at 21 15 09

@crishoj
Copy link

crishoj commented Jun 8, 2024

Do you run Glances with sudo ?

No, as a regular user.

@nicolargo
Copy link
Owner

With the latest version, I am not able to reproduce this issue. It's working fine now.

Glances 4.0.8 displays the good separator char ?

@crishoj
Copy link

crishoj commented Jun 8, 2024

Bad separator char with Glances 4.0.8 here:

image

(BTW, this is iTerm 2. Good separator appears in iTerm 2 when I SSH to a Linux host though.)

@ChillarAnand
Copy link

ChillarAnand commented Jun 8, 2024

It is working for me at least. I am using iTerm2 as well.

Screenshot 2024-06-08 at 21 53 11

glances version:

Screenshot 2024-06-08 at 21 54 50

@ChillarAnand
Copy link

@shawnyeager screenshot shows CPU, MEM usage on top right corner. Is it shown by some other software(not glances I guess)?

@shawnyeager
Copy link
Author

shawnyeager commented Jun 8, 2024

Thanks, @nicolargo.

glances --disable-unicode (note it needs to be a -, not a _) does work.

python3 output is as follows:

❯ python3
Python 3.12.3 (main, Apr  9 2024, 08:09:14) [Clang 15.0.0 (clang-1500.3.9.4)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> print('\u23af')
⎯

@shawnyeager
Copy link
Author

@shawnyeager screenshot shows CPU, MEM usage on top right corner. Is it shown by some other software(not glances I guess)?

This is a feature of iTerm2, unrelated to glances.

@shawnyeager
Copy link
Author

shawnyeager commented Jun 8, 2024

My OP is wrt to glances running on my M2 MacBook. I do notice that ssh'ing into my Intel MacBook shows “correctly,” as below.

CleanShot 2024-06-08 at 11 35 44@2x

@RazCrimson
Copy link
Collaborator

@shawnyeager @crishoj

Can anyone of you try out the latest develop branch and see if the fixes work?

@crishoj
Copy link

crishoj commented Jul 11, 2024

@RazCrimson confirmed fixed in 4.2.0_beta03

image

@RazCrimson
Copy link
Collaborator

Closing issue as its fixed

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

No branches or pull requests

5 participants