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

Can't kill process. Standalone, Ubuntu 24.04 #2942

Open
psychochemist opened this issue Sep 15, 2024 · 0 comments
Open

Can't kill process. Standalone, Ubuntu 24.04 #2942

psychochemist opened this issue Sep 15, 2024 · 0 comments
Labels

Comments

@psychochemist
Copy link

psychochemist commented Sep 15, 2024

Check the bug

Didn't find one here, only a mention on bugzilla https://bugzilla.redhat.com/show_bug.cgi?id=2282299

Describe the bug

Can't kill a process. When I am choosing the process and pressing 'k', the error occurs.

To Reproduce

Steps to reproduce the behavior:

  1. Start Glances
  2. Press the key ''k" on the chosen process
  3. See error

Expected behavior

A pop-up menu where I confirm kill of the process

Screenshots

I added a screenshot of the error because of bad formatting of the error.
Screenshot from 2024-09-15 07-49-42

Environment

  • Operating System :
    No LSB modules are available.
    Distributor ID: Ubuntu
    Description: Ubuntu 24.04.1 LTS
    Release: 24.04
    Codename: noble
  • Glances & psutil versions:
    Glances v3.4.0.3 with PsUtil v5.9.8
  • How do you install Glances (Pypi package, script, package manager, source):
    Ubuntu package manager
  • Glances test:
Output glances test
===============================================================================
Glances` 3.4.0.3 (/usr/lib/python3/dist-packages/glances/__init__.py)
Python 3.12.3 (/usr/bin/python3)
PsUtil 5.9.8 (/usr/lib/python3/dist-packages/psutil/__init__.py)
===============================================================================
alert         [OK]    0.00001s 
[]
amps          [OK]    0.00011s key=name 
[{'count': 0,
  'countmax': None,
  'countmin': 1.0,
  'key': 'name',
  'name': 'Dropbox',
  'refresh': 3.0,
  'regex': True,
  'result': None,
  'timer': 2.130171298980713}, ...]
cloud         [NA]
connections   [NA]
containers    [OK]    0.00006s 
[]
core          [OK]    0.00112s 
{'log': 16, 'phys': 8}
cpu           [OK]    0.00049s 
{'cpucore': 16,
 'ctx_switches': 43820,
 'guest': 0.0,
 'guest_nice': 0.0,
 'idle': 93.7,
 'interrupts': 27237,
 'iowait': 0.1,
 'irq': 0.0,
 'nice': 0.0,
 'soft_interrupts': 6897,
 'softirq': 0.0,
 'steal': 0.0,
 'syscalls': 0,
 'system': 2.2,
 'time_since_update': 2.130281686782837,
 'total': 12.2,
 'user': 4.0}
diskio        [OK]    0.00109s key=disk_name 
[{'disk_name': 'sda',
  'key': 'disk_name',
  'read_bytes': 0,
  'read_count': 0,
  'time_since_update': 2.127974510192871,
  'write_bytes': 0,
  'write_count': 0}, ...]
folders       [OK]    0.00002s 
[]
fs            [OK]    0.00083s key=mnt_point 
[{'device_name': '/dev/nvme0n1p2',
  'free': 99250122752,
  'fs_type': 'ext4',
  'key': 'mnt_point',
  'mnt_point': '/',
  'percent': 89.3,
  'size': 974365782016,
  'used': 825545068544}, ...]
gpu           [OK]    0.00001s 
[]
help          [OK]    0.00000s 
None
ip            [NA]
irq           [NA]
load          [OK]    0.00002s 
{'cpucore': 16, 'min1': 0.4921875, 'min15': 0.462890625, 'min5': 0.59326171875}
mem           [OK]    0.00008s 
{'active': 7761768448,
 'available': 26385731584,
 'buffers': 455950336,
 'cached': 5090516992,
 'free': 26385731584,
 'inactive': 2960654336,
 'percent': 21.3,
 'shared': 142225408,
 'total': 33537908736,
 'used': 7152177152}
memswap       [OK]    0.00013s 
{'free': 8589930496,
 'percent': 0.0,
 'sin': 0,
 'sout': 0,
 'time_since_update': 2.134084463119507,
 'total': 8589930496,
 'used': 0}
network       [OK]    0.00052s key=interface_name 
[{'alias': None,
  'cumulative_cx': 375668,
  'cumulative_rx': 187834,
  'cumulative_tx': 187834,
  'cx': 0,
  'interface_name': 'lo',
  'is_up': True,
  'key': 'interface_name',
  'rx': 0,
  'speed': 0,
  'time_since_update': 2.0058088302612305,
  'tx': 0}, ...]
now           [OK]    0.00001s 
'2024-09-15 07:54:39 CEST'
percpu        [OK]    0.00005s key=cpu_number 
[{'cpu_number': 0,
  'guest': 0.0,
  'guest_nice': 0.0,
  'idle': 19.0,
  'iowait': 0.0,
  'irq': 0.0,
  'key': 'cpu_number',
  'nice': 0.0,
  'softirq': 0.0,
  'steal': 0.0,
  'system': 0.0,
  'total': 81.0,
  'user': 1.0}, ...]
ports         [OK]    0.00000s 
[{'description': 'DefaultGateway',
  'host': '172.18.0.1',
  'indice': 'port_0',
  'port': 0,
  'refresh': 30,
  'rtt_warning': None,
  'status': 0.002237,
  'timeout': 3}]
processcount  [OK]    0.08299s 
{'pid_max': 0, 'running': 1, 'sleeping': 348, 'thread': 2023, 'total': 497}
processlist   [OK]    0.00021s key=pid 
[{'cmdline': ['/snap/thunderbird/509/usr/lib/thunderbird/thunderbird-bin'],
  'cpu_percent': 37.2,
  'cpu_times': pcputimes(user=27.75, system=4.64, children_user=0.06, children_system=0.28, iowait=0.0),
  'gids': pgids(real=1001, effective=1001, saved=1001),
  'io_counters': [178844672, 2662400, 178844672, 2662400, 1],
  'key': 'pid',
  'memory_info': pmem(rss=668966912, vms=3533742080, shared=221024256, text=651264, lib=0, data=767578112, dirty=0),
  'memory_percent': 1.9946589910119314,
  'name': 'thunderbird-bin',
  'nice': 0,
  'num_threads': 83,
  'pid': 4612,
  'status': 'S',
  'time_since_update': 2.1034443378448486,
  'username': 'ziber6'}, ...]
psutilversion [OK]    0.00001s 
(5, 9, 8)
quicklook     [OK]    0.00025s 
{'cpu': 12.2,
 'cpu_hz': 3600000000.0,
 'cpu_hz_current': 2800290750.0,
 'cpu_name': 'AMD Ryzen 7 3700X 8-Core Processor',
 'mem': 21.4,
 'percpu': [{...}, {...}, {...}, {...}, {...}, {...}, {...}, {...}, {...}, {...}, {...}, {...}, {...}, {...}, {...},
            {...}],
 'swap': 0.0}
raid          [NA]
sensors       [OK]    0.00000s key=label 
[{'critical': None,
  'key': 'label',
  'label': 'acpitz 0',
  'type': 'temperature_core',
  'unit': 'C',
  'value': 57,
  'warning': None}, ...]
smart         [NA]
system        [OK]    0.00000s 
{'hostname': 'nexExp9',
 'hr_name': 'Ubuntu 24.04 64bit',
 'linux_distro': 'Ubuntu 24.04',
 'os_name': 'Linux',
 'os_version': '6.8.4-060804-generic',
 'platform': '64bit'}
uptime        [OK]    0.00010s 
{'seconds': 710}
wifi          [NA]
===============================================================================
Total time to update all stats: 0.09014s
===============================================================================

Additional context

I have tried the newer version of glances which I installed via pipx. The error is the same, the difference only in folder, since it install glances in .local/share/

Error
Traceback (most recent call last):
2 File "/usr/local/bin/glances", line 8, insys.exit(main())
^^^^^^
File "/usr/lib/python3/dist-packages/glances/init.py", line 185, in main
start(config=core.get_config(), args=core.get_args())
File "/usr/lib/python3/dist-packages/glances/init.py", line 131, in start
mode.serve_forever()
File "/usr/lib/python3/dist-packages/glances/standalone.py", line 168, in serve_forever
while self.__serve_once():
^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/glances/standalone.py", line 152, in __serve_once
ret = not self.screen.update(self.stats, duration=adapted_refresh)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/glances/outputs/glances_curses.py", line 1186, in update
self.flush(stats, cs_status=cs_status)
File "/usr/lib/python3/dist-packages/glances/outputs/glances_curses.py", line 1133, in flush
self.display(stats, cs_status=cs_status)
File "/usr/lib/python3/dist-packages/glances/outputs/glances_curses.py", line 714, in display
self.kill(stats.get_plugin('processlist').get_raw()[self.args.cursor_position])
File "/usr/lib/python3/dist-packages/glances/outputs/glances_curses.py", line 748, in kill
confirm = self.display_popup(
^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/glances/outputs/glances_curses.py", line 976, in display_popup
popup.addnstr(2 + y, 2, m, len(m))
_curses.error: addnwstr() returned ERR

@nicolargo nicolargo added the bug label Sep 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants