Commit Graph

244 Commits

Author SHA1 Message Date
nicolargo
dabe2d61e3 Move now plugin in the header in the TUI 2026-07-25 11:17:15 +02:00
nicolargo
53a262fe7e Change CPU ctx-switch events computation 2026-07-25 10:50:31 +02:00
nicolargo
8330c483dc Correct events for ports plugin 2026-07-25 10:25:02 +02:00
nicolargo
76de23b640 Merge branch 'develop' into develop-v5 2026-07-25 09:16:26 +02:00
Martin Ďurana
3f3210d0fb Fix get_ip_address() returning the last interface instead of the first
The outer loop over network interfaces had no break, so ip_address was
overwritten by every subsequent up/non-loopback interface with a
matching address family. On hosts with Docker, this meant the bridge
IP (e.g. 172.18.0.1) was returned instead of the actual LAN address,
because virtual interfaces can sort after the real one in dict order.

Add a break once a match is found so the function returns the first
qualifying interface, plus regression tests covering the Docker case,
loopback/down-interface skipping, and the no-match case.

Fixes #3617

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015NJfi2d6yvmmDzvPmm4eof
2026-07-24 17:33:06 +02:00
nicolargo
de38569163 Improve CPU consumption 2026-07-19 16:15:34 +02:00
nicolargo
4876ecc3c3 Improve first refresh 2026-07-19 15:15:28 +02:00
nicolargo
4ff5386496 Connection and Folder plugins migration 2026-07-19 14:50:58 +02:00
nicolargo
29d3217e60 Correct issues in TUI 2026-07-18 18:26:20 +02:00
nicolargo
f42e5d6853 Merge branch 'develop' into develop-v5 2026-07-18 09:29:34 +02:00
nicolargo
11d66bc6e8 Lint the code 2026-07-18 09:29:06 +02:00
Nicolas Hennion
a0bf70bddc Merge pull request #3609 from yogendrarau/fix/csv-network-desync-3606
Fix CSV export column desync when list-plugin items change at runtime…
2026-07-18 09:24:46 +02:00
nicolargo
a991427785 Implement containers and vms plugins 2026-07-14 22:46:46 +02:00
nicolargo
2d6a5767a2 Merge branch 'develop' into develop-v5 2026-07-14 10:01:35 +02:00
nicolargo
3c016eb215 VideoCore (v3d) memory shows ~93% on Raspberry Pi 5 with gpu_mem=4M — misleading denominator from drm-total-memory #3611 2026-07-14 09:59:20 +02:00
nicolargo
5f6b84db65 Correct TUI init display in Alerts plugin 2026-07-14 09:37:28 +02:00
nicolargo
d80553029e Add raid/smart/wifi/ip plugins 2026-07-13 19:22:21 +02:00
nicolargo
a1ab5f1114 Add unit to Sensors TUI 2026-07-13 10:46:17 +02:00
nicolargo
2521617163 Add global mean option 2026-07-13 10:34:39 +02:00
nicolargo
5fc117b31a Merge branch 'develop-v5' of github.com:nicolargo/glances into develop-v5 2026-07-11 17:53:44 +02:00
nicolargo
714c1c56a6 Migrate sensors plugin 2026-07-11 17:53:20 +02:00
yogendrarau
af6a48695f Wrap long test lines (#3606)
Signed-off-by: yogendrarau <yogendra.rautela7@gmail.com>
2026-07-09 17:10:03 -04:00
yogendrarau
3500044454 Align CSV blocks by header field names to handle variable interface field counts (#3606)
Signed-off-by: yogendrarau <yogendra.rautela7@gmail.com>
2026-07-09 17:04:36 -04:00
yogendrarau
0dd4b1b94b Fix CSV export column desync when list-plugin items change at runtime (#3606)
Signed-off-by: yogendrarau <yogendra.rautela7@gmail.com>
2026-07-09 12:48:56 -04:00
github-actions[bot]
1a858a38eb chore(v5): weekly merge from develop (2026-07-06) 2026-07-06 07:38:07 +00:00
nicolargo
57969218b7 Add GPU/NPU plugins 2026-07-05 11:47:16 +02:00
nicolargo
e37d3d389e Improve alert ongoing message with the alert duration 2026-07-05 10:19:11 +02:00
nicolargo
9580c38a9b Remove Quicklook plugin from alert list 2026-07-05 10:15:46 +02:00
nicolargo
9c280eae54 Command injection bypass of action-template sanitizer via cross-field shell-operator reconstruction 2026-07-05 09:46:55 +02:00
nicolargo
5c260ace31 Merge branch 'develop' of github.com:nicolargo/glances into develop 2026-07-04 17:26:50 +02:00
nicolargo
890858944a REST API CORS Credentials Guard Uses Exact-Match Instead of Membership Test — Bypassed by Any Multi-Origin Allowlist Containing the Wildcard 2026-07-04 17:26:38 +02:00
Nicolas Hennion
d02c730c9c Merge pull request #3579 from lphuc2250gma/maint/20260606064548
chore: improve glances maintenance path
2026-07-04 17:01:24 +02:00
nicolargo
5c07c0d964 Advisory draft — does not cover on-alert action commands (incomplete fix of GHSA-3vwc-qwhc-3mj7 / CVE-2026-53925) 2026-07-04 15:49:52 +02:00
nicolargo
ea4cf2f54f Incomplete fix of CVE-2026-32608: action-template sanitizer is bypassed by nested stat values (process 'cmdline') → OS command injection 2026-06-28 22:29:01 +02:00
nicolargo
a6c1c419ea Implement phase v2: Add qucklook plugin and responsive design for TUI 2026-06-20 19:49:28 +02:00
nicolargo
9ee229d069 Merge branch 'develop' into develop-v5 2026-06-14 09:34:57 +02:00
Gabriel St. Angel
3107c6ac51 feat(gpu): support NVIDIA Jetson (Tegra) integrated GPU via sysfs fallback
On Jetson (Tegra) the integrated GPU is enumerated by NVML
(nvidia-l4t-nvml) and reports its name (e.g. "Orin (nvgpu)"), but the
per-metric NVML queries return NVML_ERROR_NOT_SUPPORTED, so the GPU
plugin only ever showed N/A for proc/mem/temperature.

Add a Tegra sysfs backend (glances/plugins/gpu/cards/tegra.py) and wire
it into the NVIDIA card as a per-metric fallback: when NVML returns None
for a device detected as Tegra (name contains "nvgpu", or the Tegra GPU
sysfs node exists), read:

- proc:        /sys/devices/platform/gpu.0/load  (per-mille -> percent)
- temperature: the gpu-thermal /sys/class/thermal zone (milli-C -> C)

Memory stays N/A by design: the Tegra GPU shares system RAM, already
reported by the MEM plugin. Scales verified against tegrastats
(GR3D_FREQ and gpu@).

Adds unit tests with committed sysfs fixtures, a NEWS.rst entry and a
docs note.

Verified on JetPack 6.2.1 (L4T R36.4.7) and JetPack 7.2 (L4T R39.2):
identical sysfs node layout and gpu-thermal zone selection on both, with
temperature cross-checked against tegrastats on each.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-07 06:59:59 +00:00
nicolargo
ee24b03742 feat(v5): TUI separator rule between header and top row (─ default, [outputs] separator)
Mirror v4: a horizontal rule now sits between the header line (system/uptime)
and the top row, in addition to the existing top↔body rule. Both use the ─
box-drawing glyph by default (v4 paints curses.ACS_HLINE). The [outputs]
separator config key (default True) governs both; when False the rule rows
are left blank rather than collapsed, preserving the vertical rhythm.
2026-06-06 19:19:39 +02:00
nicolargo
ca1e96d312 docs(v5): G1 — mark trivials migrated in TUI catalogue + registry integration test
Add end-to-end test asserting that uptime/system/now appear in the TUI
registry while core/version/psutilversion are discovered (REST-served)
but filtered out of TUI rendering. Add system/uptime/now sections to
the tui-v4-rendering-patterns.md catalogue with v4 layout notes and v5
source pointers.
2026-06-06 18:03:30 +02:00
nicolargo
8588c6d047 feat(v5): G1 — port version + psutilversion plugins to v5 (REST-only)
Both plugins are scalar, constant-data, DISPLAY_IN_TUI=False.
_grab_stats() returns the live symbol value directly (no psutil call,
no asyncio.to_thread). 4 tests added; round-trip verified via the real
glances.__version__ and psutil_version_info imports.
2026-06-06 17:59:11 +02:00
nicolargo
de7b4da19f feat(v5): G1 — port core plugin to v5 (phys/log counts, REST-only)
DISPLAY_IN_TUI=False mirrors v4 display_curse=False — the load plugin
surfaces the core count in the TUI; core data remains accessible via
REST and exporters. Tolerates psutil.cpu_count() failure (OSError,
RuntimeError, NameError) with an empty-payload fallback.
2026-06-06 17:55:46 +02:00
nicolargo
44121b9481 feat(v5): G1 — port now plugin to v5 (iso + custom date, left-sidebar render)
Fix config_v5 interpolation bug: use ConfigParser(interpolation=None) to
prevent strftime format strings (e.g. %Y) from tripping BasicInterpolation,
matching v4 behaviour (glances/config.py uses the same flag).
2026-06-06 17:54:05 +02:00
nicolargo
7ff6c846f5 feat(v5): G1 — port system plugin to v5 (host/OS metadata + header-left render) 2026-06-06 17:43:37 +02:00
nicolargo
e1a4bd388d feat(v5): G1 — port uptime plugin to v5 (seconds since boot + header-right render)
Implements the v5 scalar uptime plugin:
- model_v5: _grab_stats returns {seconds: int} from psutil.boot_time(),
  tolerates OSError with empty payload, matches v4 get_export contract.
- render_curses_v5: single "Uptime: <value>" Row for the header slot,
  using format_seconds (e.g. 273840 → "3d04h"); empty payload yields [].
TDD: 4 model tests + 2 renderer tests, all green. Discovery smoke check passes.
2026-06-06 17:38:39 +02:00
nicolargo
22244913fb feat(v5): paint the TUI header line (system left, uptime right) on row 0
Add `_paint_header` method that places the first block flush-left and the
last block flush-right (v4 fidelity). Update `_paint` to call it first and
shift the top row + separator + sidebars down by `header_height` (0 when
`frame.header` is empty, so existing layout is unchanged). Covered by three
new TDD tests (fail→pass order verified before implementation).
2026-06-06 17:32:57 +02:00
nicolargo
f077345025 feat(v5): TUI header slot — route system + uptime to a dedicated header line
Add HEADER_SLOT = ("system", "uptime"), update slot_for() to check header
first, extend Frame with a header list (first field, keyword-only default so
no positional-arg regression), dispatch in build_frame, and sort on
HEADER_SLOT order. system/uptime no longer leak into left/top/right.
2026-06-06 17:30:30 +02:00
nicolargo
072835137a feat(v5): DISPLAY_IN_TUI base flag — exclude REST-only plugins from the TUI
Add ClassVar[bool] DISPLAY_IN_TUI = True to GlancesPluginBase (mirrors v4
display_curse=False). Filter the TUI registry in assemble() to skip plugins
with DISPLAY_IN_TUI=False; REST registration is unaffected.
2026-06-06 17:25:06 +02:00
nicolargo
80e328ace6 Add help screen to the TUI 2026-06-06 15:25:16 +02:00
nicolargo
81b3fb677a Merge branch 'develop' into develop-v5 2026-06-06 14:50:42 +02:00
Noa Levi
528aea6cd6 chore: improve glances maintenance path 2026-06-06 06:46:24 +00:00