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

⬆️ Update glances to v4 #474

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

⬆️ Update glances to v4 #474

wants to merge 1 commit into from

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented May 12, 2024

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
glances ==3.4.0.5 -> ==4.1.2 age adoption passing confidence

Release Notes

nicolargo/glances (glances)

v4.1.2

Compare Source

v4.1.1: Glances 4.1.1

Compare Source

Version 4.1.1

Bug corrected:

  • Sensors data is not exported using InfluxDB2 exporter #​2856

Version 4.1.0

Enhancements:

  • Call process_iter.clear_cache() (PsUtil 6+) when Glances user force a refresh (F5 or CTRL-R) #​2753
  • PsUtil 6+ no longer check PID reused #​2755
  • Add support for automatically hiding network interfaces that are down or that don't have any IP addresses #​2799

Bug corrected:

  • API: Network module is disabled but appears in endpoint "all" #​2815
  • API is not compatible with requests containing spcial/encoding char #​2820
  • 'j' hot key crashs Glances #​2831
  • Raspberry PI - CPU info is not correct #​2616
  • Graph export is broken if there is no graph section in Glances configuration file #​2839
  • Glances API status check returns Error 405 - Method Not Allowed #​2841
  • Rootless podman containers cause glances to fail with KeyError #​2827
  • --export-process-filter Filter using complete command #​2824
  • Exception when Glances is ran with limited plugin list #​2822
  • Disable separator option do not work #​2823

Continious integration and documentation:

  • test test_107_fs_plugin_method fails on aarch64-linux #​2819

Thanks to all contibutors and bug reporters !

Special thanks to:

  • Bharath Vignesh J K
  • RazCrimson
  • Vadim Smal

v4.1.0

Compare Source

v4.0.8: Glances 4.0.8

Compare Source

Version 4.0.8

  • Make CORS option configurable security webui #​2812
  • When Glances is installed via venv, default configuration file is not used documentation packaging #​2803
  • GET /1272f6e9e8f9d6bfd6de.png results in 404 bug webui #​2781 by Emporea was closed May 25, 2024
  • Screen frequently flickers when outputting to local display bug needs test #​2490
  • Retire ujson for being in maintenance mode dependencies enhancement #​2791

v4.0.7: Glances 4.0.7

Compare Source

Version 4.0.7

  • cpu_hz_current not available on NetBSD #​2792
  • SensorType change in REST API breaks compatibility in 4.0.4 #​2788

Version 4.0.6

Version 4.0.5

  • SensorType change in REST API breaks compatibility in 4.0.4 #​2788
  • Please make pydantic optional dependency, not required one #​2777
  • Update the Grafana dashboard #​2780
  • 4.0.4 - On Glances startup "ERROR -- Can not init battery class #​2776
  • In codeSpace (with Python 3.8), an error occurs in ./unittest-restful.py #​2773

Use Ruff as default Linter.

Version 4.0.4

Hostfix release for support sensors plugin on python 3.8

Version 4.0.3

Additional fixes for Sensor plugin

Version 4.0.2

  • hotfix: plugin(sensors) - race conditions btw fan_speed & temperature… #​2766
  • fix: include requirements.txt and SECURITY.md for pypi dist #​2761

Thanks to RazCrimson for the sensors patch !

Version 4.0.1

Correct issue with CI (miss pydantic dep).

Version 4.0.0

New Features

Export individual processes stats

Thanks to the new software architecture it is now possible to export individual processes stats.

You should define the processes to export from the configuration file (section processlist /option export)
or via the --export-process-filter option on the command line.

Those options are a comma separated list of Glances filter (example bellow):

  • python.*: Filter processes name or command line starting with python
  • .python.: Filter processes name or command line containing python
  • username:nicolargo: Processes belong to nicolargo user
  • cmdline:/usr/bin.*: Processes starting by /usr/bin

The following example exports all processes with the name 'python' or 'bash':

[processlist]
export=.*python.*,.*bash.*

Note: or the --export-process-filter ".python.,.bash." option in the command line.

Another example exports all processes belong to 'nicolargo' user:

[processlist]
export=username:nicolargo

Note: or the --export-process-filter "username:nicolargo" option in the command line.

Last example with the output result in a CSV file, with the following command line example:

glances -C ./conf/glances.conf --export csv --export-csv-file /tmp/glances.csv --disable-plugin all --enable-plugin processlist --quiet

the output CSV file (with the PID as primary key) will look like:

timestamp,845992.memory_percent,845992.status,845992.num_threads,845992.cpu_timesuser,845992.cpu_timessystem,845992.cpu_timeschildren_user,845992.cpu_timeschildren_system,845992.cpu_timesiowait,845992.memory_inforss,845992.memory_infovms,845992.memory_infoshared,845992.memory_infotext,845992.memory_infolib,845992.memory_infodata,845992.memory_infodirty,845992.name,845992.io_counters,845992.nice,845992.cpu_percent,845992.pid,845992.gidsreal,845992.gidseffective,845992.gidssaved,845992.key,845992.time_since_update,845992.cmdline,845992.username,total,running,sleeping,thread,pid_max
2024-04-03 18:39:55,3.692938041968513,S,138,1702.88,567.89,1752.79,244.18,0.0,288919552,12871561216,95182848,856064,0,984535040,0,firefox,1863281664,0,0.5,845992,1000,1000,1000,pid,2.2084147930145264,/snap/firefox/3836/usr/lib/firefox/firefox,nicolargo,403,1,333,1511,0
2024-04-03 18:39:57,3.692938041968513,S,138,1702.88,567.89,1752.79,244.18,0.0,288919552,12871561216,95182848,856064,0,984535040,0,firefox,1863281664,0,0.5,845992,1000,1000,1000,pid,2.2084147930145264,/snap/firefox/3836/usr/lib/firefox/firefox,nicolargo,403,1,333,1511,0

Note: more details in issue #​794.

GPU plugin now support AMD GPU

Lasts Linux Kernel expose the GPU stats in the /sys/class/drm folder.

So, additionally to NVidia cards and without any external lib, Glances can display AMD GPU stats:

image

GPU plugin software architecture has been re-factorized in order to easily add others cards in the future (Intel).

Note: more details in issue #​993.

Wifi plugin is back

As Glances version 4 is no longer supported Python 2, Wifi plugin has been refactor and do not need any external library.

Glances parses the /proc/net/wireless file on new Linux kernel.

image

Note: more details in issue #​1377.

Refactor alias configuration

Alias has been completely refactor for all plugins in order to make it easier to configure.

Glances version 3.x and lower:

sda1_alias=InternalDisk 
sdb1_alias=ExternalDisk

Glances version 4.x and higher:

alias=sda1:InternalDisk,sdb1:ExternalDisk

Note: more details in issue #​1735.

Fields descriptions and units are now available through the API

You can now get stat description and unit through the Glances version 4 API.

$ curl http://0.0.0.0:61208/api/4/cpu/total
{"total":6.3}
$ curl http://0.0.0.0:61208/api/4/cpu/total/description
"Sum of all CPU percentages (except idle)."
$ curl http://0.0.0.0:61208/api/4/cpu/total/unit
"percent"

Note: more details in issue #​2630.

Make the left menu configurable

It is now possible to configure the plugins list displayed in the Curses and Web interfaces thanks to the left_menu option in the outputs section of the Glances configuration file:

[outputs]
left_menu=network,diskio

Display:

image

Quick look plugin is now configurable

By default it displays CPU, Memory and Load information.

image

Example to cam back to the Glances version 3.0 configuration (with swap instead of load):

[quicklook]

Stats list (default is cpu,mem,load)

Available stats are: cpu,mem,load,swap

list=cpu,mem,swap

Graphical bar char used in the terminal user interface (default is |)

bar_char=|

Note: More information in issue #​2662.

Enhance per CPU display

Number of cores increase, so the "Per CPU" plugin has been adpated in order to display the top 'n' CPU consuption ('n' is configurable from the Glances configuration file through the max_cpu_display option in the percpu section (default is 4 CPUs).

image

Note: see more details in issue #​2734.

Display guest CPU statistic in the CPU plugin

On Linux, guest CPU is percentage of time a virtual CPU spends servicing another virtual CPU under the control of the kernel.

image

  • Ability to hide Engine and Pod columns in Containers #​2423

A new logo !

Last and not least, thanks to Elad @​eBarazi...

image

a new logo is released...

image

Improvements

Speed up Glances launch

Glances version 3 takes between 2 and 3 seconds to start.
Glances version 4 takes less than 1 seconds to start, with all plugins.

See #​1534 for more information.

Huge improvement of the Restful API documentation

More example and information available in the single page documentation: https://github.com/nicolargo/glances/blob/develop/docs/api.rst

Breaking changes

Python version

Support of Python 2 has been removed. Glances needs Python 3.8 or higher.

Python dependencies

For package maintainers, please note that standards dependencies have changed.

Minimal requirements for Glances version 4 are:

  • psutil
  • defusedxml
  • packaging
  • ujson
  • pydantic
  • fastapi (for WebUI / RestFull API)
  • uvicorn (for WebUI / RestFull API)
  • jinja2 (for WebUI / RestFull API)

Majors changes between Glances version 3 and version 4:

  • Bottle has been replaced by FastAPI and Uvicorn
  • CouchDB has been replaced by PyCouchDB
  • nvidia-ml-py has been replaced by py3nvml
  • pysnmp has been replaced by pysnmp-lextudio

APIs

  • XML/RPC API have changed between Glances 3 and Glances 4. It is not possible to use a Glances 3.x client with a Glances 4.x.
  • Restful API upgraded to version 4 (default entry point is http://localhost:61208/api/4).

Alias definition change in the configuration file

Glances version 3.x and lower:

sda1_alias=InternalDisk
sdb1_alias=ExternalDisk

Glances version 4.x and higher:

alias=sda1:InternalDisk,sdb1:ExternalDisk

More details in issue #​1735.

Others

  • Alert data model change from a list of list to a list of dict #​2633
  • Docker memory usage uses the same algorithm than docker stats #​2637

All the issues corrected in this version

Enhancements:

  • Export individual processes stats #​794
  • [WebUI] Feature Request: Ability to hide Engine and Pod columns in Containers #​2423
  • [IP plugin] Make the public ip information more configurable (not only from the Censys service) #​2732
  • Getting field information (description, unit) from the API #​2630
  • Refactor alias configuration and allow alias for fs devices #​1735
  • Improve alert with mininimal interval/duration configuration keys #​2558
  • --stdout plugin.attr is not compliant with plugins returning list of dicts #​2446
  • Lot's of log messages when a proxy is used with the Podman plugin #​2714
  • [WEBUI & CURSES] Make the left menu configurable #​2648
  • [WEBUI] Custom system header information #​2695
  • [CURSES] Use normal color for normal text instead of an arbitrary color #​2687
  • [WEBUI] Showing the full arguments on the command column of the TASKS #​2634
  • Add graph export for GPU plugin (related to #​2542)
  • Refactor Alert data model from list of list to list of dict #​2633
  • Use enum instead of int for callback API version. #​2712
  • Make the alerts number configurable (related to #​2558)
  • [WebUI] Added smart plugin support #​2435
  • No more threshold display in the WebUI cpu/mem and memswap plugins #​2420
  • Refactor Glances curses code #​2580
  • Replace Bottle by FastAPI #​2181
  • Replace py3nvml with nvidia-ml-py #​2688

Bug corrected:

  • Crash when reading timezone for generating alert #​2659
  • Newline in container command corrupts display / hides container #​2733
  • RAID plugin not showing up in Glances web UI (Docker install) #​2716
  • Alerts showing different time than time plugin #​2214
  • OpenBSD crash on start without a swap file/partition #​2719
  • Folders plugin always fails on special directories #​2518
  • Update dependency urllib3 to v2 #​2397
  • Crach when ENTER key is pressed in the Alpine minimal image #​2658
  • Crash when a process is pinned in the develop branch of Glances #​2639
  • TERM setting causes glances to crash #​2598
  • macOS: Read user config from ~/.config/glances #​2641
  • Docker Prometheus issue with IRQ plugin #​2564
  • Remove systemd from Curses (related to #​2595)
  • Screen frequently flickers when outputting to local display #​2490
  • Incorrect linux_distro in docker version glances #​2439
  • Influxdb2 export not working #​2407
  • Ignore/detect symlink loops in folders plugin #​2494
  • Remove Clear-text logging of sensitive information - Code Scanning #​36
  • Cannot start Glances 3.4.0.1 on Windows 10: SIGHUP not defined #​2408
  • 3.4.0 crash on startupwith minimal deps #​2401

CI and documentation:

  • New logo for Glances version 4.0 #​2713
  • Update api.rst documentation #​2496
  • Change Renovate config #​2729
  • Docker compose password unrecognized arguments when applying docs #​2698
  • Docker includes OS Release Volume mount info #​2473
  • Update prometheus.rst, fix minor typos #​2640
  • Fix typos and make grammatical and stylistic edits in project documentation #​2625
  • MongoDB and CouchDB documentation flipped #​2565
  • No module named 'influxdb' on the snap version of glances #​1738

Many thinks to the contributors:

  • Bharath Vignesh J K
  • Christoph Zimmermann
  • RazCrimson
  • Robin Candau
  • Github GPG acces
  • Continuous Integration
  • Georgiy Timchenko
  • turbocrime
  • Kiskae
  • snyk-bot
  • Alexander Grigoryev
  • Claes Hallström
  • Francois Pires
  • Maarten Kossen (mpkossen)
  • Osama Albahrani
  • csteiner
  • k26pl
  • kdkd
  • monochromec
  • and all the beta testers !

Ready to install/upgrade ?

Have a look to the documentation.

v4.0.6: Glances 4.0.6

Compare Source


New Features

Export individual processes stats

Thanks to the new software architecture it is now possible to export individual processes stats.

You should define the processes to export from the configuration file (section processlist /option export)
or via the --export-process-filter option on the command line.

Those options are a comma separated list of Glances filter (example bellow):

  • python.*: Filter processes name or command line starting with python
  • .python.: Filter processes name or command line containing python
  • username:nicolargo: Processes belong to nicolargo user
  • cmdline:/usr/bin.*: Processes starting by /usr/bin

The following example exports all processes with the name 'python' or 'bash':

[processlist]
export=.*python.*,.*bash.*

Note: or the --export-process-filter ".python.,.bash." option in the command line.

Another example exports all processes belong to 'nicolargo' user:

[processlist]
export=username:nicolargo

Note: or the --export-process-filter "username:nicolargo" option in the command line.

Last example with the output result in a CSV file, with the following command line example:

glances -C ./conf/glances.conf --export csv --export-csv-file /tmp/glances.csv --disable-plugin all --enable-plugin processlist --quiet

the output CSV file (with the PID as primary key) will look like:

timestamp,845992.memory_percent,845992.status,845992.num_threads,845992.cpu_timesuser,845992.cpu_timessystem,845992.cpu_timeschildren_user,845992.cpu_timeschildren_system,845992.cpu_timesiowait,845992.memory_inforss,845992.memory_infovms,845992.memory_infoshared,845992.memory_infotext,845992.memory_infolib,845992.memory_infodata,845992.memory_infodirty,845992.name,845992.io_counters,845992.nice,845992.cpu_percent,845992.pid,845992.gidsreal,845992.gidseffective,845992.gidssaved,845992.key,845992.time_since_update,845992.cmdline,845992.username,total,running,sleeping,thread,pid_max
2024-04-03 18:39:55,3.692938041968513,S,138,1702.88,567.89,1752.79,244.18,0.0,288919552,12871561216,95182848,856064,0,984535040,0,firefox,1863281664,0,0.5,845992,1000,1000,1000,pid,2.2084147930145264,/snap/firefox/3836/usr/lib/firefox/firefox,nicolargo,403,1,333,1511,0
2024-04-03 18:39:57,3.692938041968513,S,138,1702.88,567.89,1752.79,244.18,0.0,288919552,12871561216,95182848,856064,0,984535040,0,firefox,1863281664,0,0.5,845992,1000,1000,1000,pid,2.2084147930145264,/snap/firefox/3836/usr/lib/firefox/firefox,nicolargo,403,1,333,1511,0

Note: more details in issue #​794.

GPU plugin now support AMD GPU

Lasts Linux Kernel expose the GPU stats in the /sys/class/drm folder.

So, additionally to NVidia cards and without any external lib, Glances can display AMD GPU stats:

image

GPU plugin software architecture has been re-factorized in order to easily add others cards in the future (Intel).

Note: more details in issue #​993.

Wifi plugin is back

As Glances version 4 is no longer supported Python 2, Wifi plugin has been refactor and do not need any external library.

Glances parses the /proc/net/wireless file on new Linux kernel.

image

Note: more details in issue #​1377.

Refactor alias configuration

Alias has been completely refactor for all plugins in order to make it easier to configure.

Glances version 3.x and lower:

sda1_alias=InternalDisk 
sdb1_alias=ExternalDisk

Glances version 4.x and higher:

alias=sda1:InternalDisk,sdb1:ExternalDisk

Note: more details in issue #​1735.

Fields descriptions and units are now available through the API

You can now get stat description and unit through the Glances version 4 API.

$ curl http://0.0.0.0:61208/api/4/cpu/total
{"total":6.3}
$ curl http://0.0.0.0:61208/api/4/cpu/total/description
"Sum of all CPU percentages (except idle)."
$ curl http://0.0.0.0:61208/api/4/cpu/total/unit
"percent"

Note: more details in issue #​2630.

Make the left menu configurable

It is now possible to configure the plugins list displayed in the Curses and Web interfaces thanks to the left_menu option in the outputs section of the Glances configuration file:

[outputs]
left_menu=network,diskio

Display:

image

Quick look plugin is now configurable

By default it displays CPU, Memory and Load information.

image

Example to cam back to the Glances version 3.0 configuration (with swap instead of load):

[quicklook]

Stats list (default is cpu,mem,load)

Available stats are: cpu,mem,load,swap

list=cpu,mem,swap

Graphical bar char used in the terminal user interface (default is |)

bar_char=|

Note: More information in issue #​2662.

Enhance per CPU display

Number of cores increase, so the "Per CPU" plugin has been adpated in order to display the top 'n' CPU consuption ('n' is configurable from the Glances configuration file through the max_cpu_display option in the percpu section (default is 4 CPUs).

image

Note: see more details in issue #​2734.

Display guest CPU statistic in the CPU plugin

On Linux, guest CPU is percentage of time a virtual CPU spends servicing another virtual CPU under the control of the kernel.

image

  • Ability to hide Engine and Pod columns in Containers #​2423

A new logo !

Last and not least, thanks to Elad @​eBarazi...

image

a new logo is released...

image

Improvements

Speed up Glances launch

Glances version 3 takes between 2 and 3 seconds to start.
Glances version 4 takes less than 1 seconds to start, with all plugins.

See #​1534 for more information.

Huge improvement of the Restful API documentation

More example and information available in the single page documentation: https://github.com/nicolargo/glances/blob/develop/docs/api.rst

Breaking changes

Python version

Support of Python 2 has been removed. Glances needs Python 3.8 or higher.

Python dependencies

For package maintainers, please note that standards dependencies have changed.

Minimal requirements for Glances version 4 are:

  • psutil
  • defusedxml
  • packaging
  • ujson
  • pydantic
  • fastapi (for WebUI / RestFull API)
  • uvicorn (for WebUI / RestFull API)
  • jinja2 (for WebUI / RestFull API)

Majors changes between Glances version 3 and version 4:

  • Bottle has been replaced by FastAPI and Uvicorn
  • CouchDB has been replaced by PyCouchDB
  • nvidia-ml-py has been replaced by py3nvml
  • pysnmp has been replaced by pysnmp-lextudio

APIs

  • XML/RPC API have changed between Glances 3 and Glances 4. It is not possible to use a Glances 3.x client with a Glances 4.x.
  • Restful API upgraded to version 4 (default entry point is http://localhost:61208/api/4).

Alias definition change in the configuration file

Glances version 3.x and lower:

sda1_alias=InternalDisk
sdb1_alias=ExternalDisk

Glances version 4.x and higher:

alias=sda1:InternalDisk,sdb1:ExternalDisk

More details in issue #​1735.

Others

  • Alert data model change from a list of list to a list of dict #​2633
  • Docker memory usage uses the same algorithm than docker stats #​2637

All the issues corrected in this version

Enhancements:

  • Export individual processes stats #​794
  • [WebUI] Feature Request: Ability to hide Engine and Pod columns in Containers #​2423
  • [IP plugin] Make the public ip information more configurable (not only from the Censys service) #​2732
  • Getting field information (description, unit) from the API #​2630
  • Refactor alias configuration and allow alias for fs devices #​1735
  • Improve alert with mininimal interval/duration configuration keys #​2558
  • --stdout plugin.attr is not compliant with plugins returning list of dicts #​2446
  • Lot's of log messages when a proxy is used with the Podman plugin #​2714
  • [WEBUI & CURSES] Make the left menu configurable #​2648
  • [WEBUI] Custom system header information #​2695
  • [CURSES] Use normal color for normal text instead of an arbitrary color #​2687
  • [WEBUI] Showing the full arguments on the command column of the TASKS #​2634
  • Add graph export for GPU plugin (related to #​2542)
  • Refactor Alert data model from list of list to list of dict #​2633
  • Use enum instead of int for callback API version. #​2712
  • Make the alerts number configurable (related to #​2558)
  • [WebUI] Added smart plugin support #​2435
  • No more threshold display in the WebUI cpu/mem and memswap plugins #​2420
  • Refactor Glances curses code #​2580
  • Replace Bottle by FastAPI #​2181
  • Replace py3nvml with nvidia-ml-py #​2688

Bug corrected:

  • Crash when reading timezone for generating alert #​2659
  • Newline in container command corrupts display / hides container #​2733
  • RAID plugin not showing up in Glances web UI (Docker install) #​2716
  • Alerts showing different time than time plugin #​2214
  • OpenBSD crash on start without a swap file/partition #​2719
  • Folders plugin always fails on special directories #​2518
  • Update dependency urllib3 to v2 #​2397
  • Crach when ENTER key is pressed in the Alpine minimal image #​2658
  • Crash when a process is pinned in the develop branch of Glances #​2639
  • TERM setting causes glances to crash #​2598
  • macOS: Read user config from ~/.config/glances #​2641
  • Docker Prometheus issue with IRQ plugin #​2564
  • Remove systemd from Curses (related to #​2595)
  • Screen frequently flickers when outputting to local display #​2490
  • Incorrect linux_distro in docker version glances #​2439
  • Influxdb2 export not working #​2407
  • Ignore/detect symlink loops in folders plugin #​2494
  • Remove Clear-text logging of sensitive information - Code Scanning #​36
  • Cannot start Glances 3.4.0.1 on Windows 10: SIGHUP not defined #​2408
  • 3.4.0 crash on startupwith minimal deps #​2401

CI and documentation:

  • New logo for Glances version 4.0 #​2713
  • Update api.rst documentation #​2496
  • Change Renovate config #​2729
  • Docker compose password unrecognized arguments when applying docs #​2698
  • Docker includes OS Release Volume mount info #​2473
  • Update prometheus.rst, fix minor typos #​2640
  • Fix typos and make grammatical and stylistic edits in project documentation #​2625
  • MongoDB and CouchDB documentation flipped #​2565
  • No module named 'influxdb' on the snap version of glances #​1738

Many thinks to the contributors:

  • Bharath Vignesh J K
  • Christoph Zimmermann
  • RazCrimson
  • Robin Candau
  • Github GPG acces
  • Continuous Integration
  • Georgiy Timchenko
  • turbocrime
  • Kiskae
  • snyk-bot
  • Alexander Grigoryev
  • Claes Hallström
  • Francois Pires
  • Maarten Kossen (mpkossen)
  • Osama Albahrani
  • csteiner
  • k26pl
  • kdkd
  • monochromec
  • and all the beta testers !

Ready to install/upgrade ?

Have a look to the documentation.

v4.0.5

Compare Source

v4.0.4: Glances 4.0.4

Compare Source


New Features

Export individual processes stats

Thanks to the new software architecture it is now possible to export individual processes stats.

You should define the processes to export from the configuration file (section processlist /option export)
or via the --export-process-filter option on the command line.

Those options are a comma separated list of Glances filter (example bellow):

  • python.*: Filter processes name or command line starting with python
  • .python.: Filter processes name or command line containing python
  • username:nicolargo: Processes belong to nicolargo user
  • cmdline:/usr/bin.*: Processes starting by /usr/bin

The following example exports all processes with the name 'python' or 'bash':

[processlist]
export=.*python.*,.*bash.*

Note: or the --export-process-filter ".python.,.bash." option in the command line.

Another example exports all processes belong to 'nicolargo' user:

[processlist]
export=username:nicolargo

Note: or the --export-process-filter "username:nicolargo" option in the command line.

Last example with the output result in a CSV file, with the following command line example:

glances -C ./conf/glances.conf --export csv --export-csv-file /tmp/glances.csv --disable-plugin all --enable-plugin processlist --quiet

the output CSV file (with the PID as primary key) will look like:

timestamp,845992.memory_percent,845992.status,845992.num_threads,845992.cpu_timesuser,845992.cpu_timessystem,845992.cpu_timeschildren_user,845992.cpu_timeschildren_system,845992.cpu_timesiowait,845992.memory_inforss,845992.memory_infovms,845992.memory_infoshared,845992.memory_infotext,845992.memory_infolib,845992.memory_infodata,845992.memory_infodirty,845992.name,845992.io_counters,845992.nice,845992.cpu_percent,845992.pid,845992.gidsreal,845992.gidseffective,845992.gidssaved,845992.key,845992.time_since_update,845992.cmdline,845992.username,total,running,sleeping,thread,pid_max
2024-04-03 18:39:55,3.692938041968513,S,138,1702.88,567.89,1752.79,244.18,0.0,288919552,12871561216,95182848,856064,0,984535040,0,firefox,1863281664,0,0.5,845992,1000,1000,1000,pid,2.2084147930145264,/snap/firefox/3836/usr/lib/firefox/firefox,nicolargo,403,1,333,1511,0
2024-04-03 18:39:57,3.692938041968513,S,138,1702.88,567.89,1752.79,244.18,0.0,288919552,12871561216,95182848,856064,0,984535040,0,firefox,1863281664,0,0.5,845992,1000,1000,1000,pid,2.2084147930145264,/snap/firefox/3836/usr/lib/firefox/firefox,nicolargo,403,1,333,1511,0

Note: more details in issue #​794.

GPU plugin now support AMD GPU

Lasts Linux Kernel expose the GPU stats in the /sys/class/drm folder.

So, additionally to NVidia cards and without any external lib, Glances can display AMD GPU stats:

image

GPU plugin software architecture has been re-factorized in order to easily add others cards in the future (Intel).

Note: more details in issue #​993.

Wifi plugin is back

As Glances version 4 is no longer supported Python 2, Wifi plugin has been refactor and do not need any external library.

Glances parses the /proc/net/wireless file on new Linux kernel.

image

Note: more details in issue #​1377.

Refactor alias configuration

Alias has been completely refactor for all plugins in order to make it easier to configure.

Glances version 3.x and lower:

sda1_alias=InternalDisk 
sdb1_alias=ExternalDisk

Glances version 4.x and higher:

alias=sda1:InternalDisk,sdb1:ExternalDisk

Note: more details in issue #​1735.

Fields descriptions and units are now available through the API

You can now get stat description and unit through the Glances version 4 API.

$ curl http://0.0.0.0:61208/api/4/cpu/total
{"total":6.3}
$ curl http://0.0.0.0:61208/api/4/cpu/total/description
"Sum of all CPU percentages (except idle)."
$ curl http://0.0.0.0:61208/api/4/cpu/total/unit
"percent"

Note: more details in issue #​2630.

Make the left menu configurable

It is now possible to configure the plugins list displayed in the Curses and Web interfaces thanks to the left_menu option in the outputs section of the Glances configuration file:

[outputs]
left_menu=network,diskio

Display:

image

Quick look plugin is now configurable

By default it displays CPU, Memory and Load information.

image

Example to cam back to the Glances version 3.0 configuration (with swap instead of load):

[quicklook]

Stats list (default is cpu,mem,load)

Available stats are: cpu,mem,load,swap

list=cpu,mem,swap

Graphical bar char used in the terminal user interface (default is |)

bar_char=|

Note: More information in issue #​2662.

Enhance per CPU display

Number of cores increase, so the "Per CPU" plugin has been adpated in order to display the top 'n' CPU consuption ('n' is configurable from the Glances configuration file through the max_cpu_display option in the percpu section (default is 4 CPUs).

image

Note: see more details in issue #​2734.

Display guest CPU statistic in the CPU plugin

On Linux, guest CPU is percentage of time a virtual CPU spends servicing another virtual CPU under the control of the kernel.

image

  • Ability to hide Engine and Pod columns in Containers #​2423

A new logo !

Last and not least, thanks to Elad @​eBarazi...

image

a new logo is released...

image

Improvements

Speed up Glances launch

Glances version 3 takes between 2 and 3 seconds to start.
Glances version 4 takes less than 1 seconds to start, with all plugins.

See #​1534 for more information.

Huge improvement of the Restful API documentation

More example and information available in the single page documentation: https://github.com/nicolargo/glances/blob/develop/docs/api.rst

Breaking changes

Python version

Support of Python 2 has been removed. Glances needs Python 3.8 or higher.

Python dependencies

For package maintainers, please note that standards dependencies have changed.

Minimal requirements for Glances version 4 are:

  • psutil
  • defusedxml
  • packaging
  • ujson
  • pydantic
  • fastapi (for WebUI / RestFull API)
  • uvicorn (for WebUI / RestFull API)
  • jinja2 (for WebUI / RestFull API)

Majors changes between Glances version 3 and version 4:

  • Bottle has been replaced by FastAPI and Uvicorn
  • CouchDB has been replaced by PyCouchDB
  • nvidia-ml-py has been replaced by py3nvml
  • pysnmp has been replaced by pysnmp-lextudio

APIs

  • XML/RPC API have changed between Glances 3 and Glances 4. It is not possible to use a Glances 3.x client with a Glances 4.x.
  • Restful API upgraded to version 4 (default entry point is http://localhost:61208/api/4).

Alias definition change in the configuration file

Glances version 3.x and lower:

sda1_alias=InternalDisk
sdb1_alias=ExternalDisk

Glances version 4.x and higher:

alias=sda1:InternalDisk,sdb1:ExternalDisk

More details in issue #​1735.

Others

  • Alert data model change from a list of list to a list of dict #​2633
  • Docker memory usage uses the same algorithm than docker stats #​2637

All the issues corrected in this version

Enhancements:

  • Export individual processes stats #​794
  • [WebUI] Feature Request: Ability to hide Engine and Pod columns in Containers #​2423
  • [IP plugin] Make the public ip information more configurable (not only from the Censys service) #​2732
  • Getting field information (description, unit) from the API #​2630
  • Refactor alias configuration and allow alias for fs devices #​1735
  • Improve alert with mininimal interval/duration configuration keys #​2558
  • --stdout plugin.attr is not compliant with plugins returning list of dicts #​2446
  • Lot's of log messages when a proxy is used with the Podman plugin #​2714
  • [WEBUI & CURSES] Make the left menu configurable #​2648
  • [WEBUI] Custom system header information #​2695
  • [CURSES] Use normal color for normal text instead of an arbitrary color #​2687
  • [WEBUI] Showing the full arguments on the command column of the TASKS #​2634
  • Add graph export for GPU plugin (related to #​2542)
  • Refactor Alert data model from list of list to list of dict #​2633
  • Use enum instead of int for callback API version. #​2712
  • Make the alerts number configurable (related to #​2558)
  • [WebUI] Added smart plugin support #​2435
  • No more threshold display in the WebUI cpu/mem and memswap plugins #​2420
  • Refactor Glances curses code #​2580
  • Replace Bottle by FastAPI #​2181
  • Replace py3nvml with nvidia-ml-py #​2688

Bug corrected:

  • Crash when reading timezone for generating alert #​2659
  • Newline in container command corrupts display / hides container #​2733
  • RAID plugin not showing up in Glances web UI (Docker install) #​2716
  • Alerts showing different time than time plugin #​2214
  • OpenBSD crash on start without a swap file/partition #​2719
  • Folders plugin always fails on special directories #​2518
  • Update dependency urllib3 to v2 #​2397
  • Crach when ENTER key is pressed in the Alpine minimal image #​2658
  • Crash when a process is pinned in the develop branch of Glances #​2639
  • TERM setting causes glances to crash #​2598
  • macOS: Read user config from ~/.config/glances #​2641
  • Docker Prometheus issue with IRQ plugin #​2564
  • Remove systemd from Curses (related to #​2595)
  • Screen frequently flickers when outputting to local display #​2490
  • Incorrect linux_distro in docker version glances #​2439
  • Influxdb2 export not working #​2407
  • Ignore/detect symlink loops in folders plugin #​2494
  • Remove Clear-text logging of sensitive information - Code Scanning #​36
  • Cannot start Glances 3.4.0.1 on Windows 10: SIGHUP not defined #​2408
  • 3.4.0 crash on startupwith minimal deps #​2401

CI and documentation:

  • New logo for Glances version 4.0 #​2713
  • Update api.rst documentation #​2496
  • Change Renovate config #​2729
  • Docker compose password unrecognized arguments when applying docs #​2698
  • Docker includes OS Release Volume mount info #​2473
  • Update prometheus.rst, fix minor typos #​2640
  • Fix typos and make grammatical and stylistic edits in project documentation #​2625
  • MongoDB and CouchDB documentation flipped #​2565
  • No module named 'influxdb' on the snap version of glances #​1738

Many thinks to the contributors:

  • Bharath Vignesh J K
  • Christoph Zimmermann
  • RazCrimson
  • Robin Candau
  • Github GPG acces
  • Continuous Integration
  • Georgiy Timchenko
  • turbocrime
  • Kiskae
  • snyk-bot
  • Alexander Grigoryev
  • Claes Hallström
  • Francois Pires
  • Maarten Kossen (mpkossen)
  • Osama Albahrani
  • csteiner
  • k26pl
  • kdkd
  • monochromec
  • and all the beta testers !

Ready to install/upgrade ?

Have a look to the documentation.

v4.0.3

Compare Source

  • Bug fixes for sensors plugin

Full Changelog: nicolargo/glances@v4.0.2...v4.0.3

v4.0.2: Glances 4.0.2

Compare Source

DRAFT UNDER CONSTRUCTION


New Features

Export individual processes stats

Thanks to the new software architecture it is now possible to export individual processes stats.

You should define the processes to export from the configuration file (section processlist /option export)
or via the --export-process-filter option on the command line.

Those options are a comma separated list of Glances filter (example bellow):

  • python.*: Filter processes name or command line starting with python
  • .python.: Filter processes name or command line containing python
  • username:nicolargo: Processes belong to nicolargo user
  • cmdline:/usr/bin.*: Processes starting by /usr/bin

The following example exports all processes with the name 'python' or 'bash':

[processlist]
export=.*python.*,.*bash.*

Note: or the --export-process-filter ".python.,.bash." option in the command line.

Another example exports all processes belong to 'nicolargo' user:

[processlist]
export=username:nicolargo

Note: or the --export-process-filter "username:nicolargo" option in the command line.

Last example with the output result in a CSV file, with the following command line example:

glances -C ./conf/glances.conf --export csv --export-csv-file /tmp/glances.csv --disable-plugin all --enable-plugin processlist --quiet

the output CSV file (with the PID as primary key) will look like:

timestamp,845992.memory_percent,845992.status,845992.num_threads,845992.cpu_timesuser,845992.cpu_timessystem,845992.cpu_timeschildren_user,845992.cpu_timeschildren_system,845992.cpu_timesiowait,845992.memory_inforss,845992.memory_infovms,845992.memory_infoshared,845992.memory_infotext,845992.memory_infolib,845992.memory_infodata,845992.memory_infodirty,845992.name,845992.io_counters,845992.nice,845992.cpu_percent,845992.pid,845992.gidsreal,845992.gidseffective,845992.gidssaved,845992.key,845992.time_since_update,845992.cmdline,845992.username,total,running,sleeping,thread,pid_max
2024-04-03 18:39:55,3.692938041968513,S,138,1702.88,567.89,1752.79,244.18,0.0,288919552,12871561216,95182848,856064,0,984535040,0,firefox,1863281664,0,0.5,845992,1000,1000,1000,pid,2.2084147930145264,/snap/firefox/3836/usr/lib/firefox/firefox,nicolargo,403,1,333,1511,0
2024-04-03 18:39:57,3.692938041968513,S,138,1702.88,567.89,1752.79,244.18,0.0,288919552,12871561216,95182848,856064,0,984535040,0,firefox,1863281664,0,0.5,845992,1000,1000,1000,pid,2.2084147930145264,/snap/firefox/3836/usr/lib/firefox/firefox,nicolargo,403,1,333,1511,0

Note: more details in issue #​794.

GPU plugin now support AMD GPU

Lasts Linux Kernel expose the GPU stats in the /sys/class/drm folder.

So, additionally to NVidia cards and without any external lib, Glances can display AMD GPU stats:

image

GPU plugin software architecture has been re-factorized in order to easily add others cards in the future (Intel).

Note: more details in issue #​993.

Wifi plugin is back

As Glances version 4 is no longer supported Python 2, Wifi plugin has been refactor and do not need any external library.

Glances parses the /proc/net/wireless file on new Linux kernel.

image

Note: more details in issue #​1377.

Refactor alias configuration

Alias has been completely refactor for all plugins in order to make it easier to configure.

Glances version 3.x and lower:

sda1_alias=InternalDisk 
sdb1_alias=ExternalDisk

Glances version 4.x and higher:

alias=sda1:InternalDisk,sdb1:ExternalDisk

Note: more details in issue #​1735.

Fields descriptions and units are now available through the API

You can now get stat description and unit through the Glances version 4 API.

$ curl http://0.0.0.0:61208/api/4/cpu/total
{"total":6.3}
$ curl http://0.0.0.0:61208/api/4/cpu/total/description
"Sum of all CPU percentages (except idle)."
$ curl http://0.0.0.0:61208/api/4/cpu/total/unit
"percent"

Note: more details in issue #​2630.

Make the left menu configurable

It is now possible to configure the plugins list displayed in the Curses and Web interfaces thanks to the left_menu option in the outputs section of the Glances configuration file:

[outputs]
left_menu=network,diskio

Display:

image

Quick look plugin is now configurable

By default it displays CPU, Memory and Load information.

image

Example to cam back to the Glances version 3.0 configuration (with swap instead of load):

[quic

Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate renovate bot added dependencies Upgrade or downgrade of project dependencies. no-stale This issue or PR is exempted from the stable bot. python labels May 12, 2024
@github-actions github-actions bot removed the python label May 13, 2024
@renovate renovate bot force-pushed the renovate/glances-4.x branch 4 times, most recently from c35c9f4 to 133c399 Compare May 20, 2024 20:02
Copy link

coderabbitai bot commented May 20, 2024

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Walkthrough

The change involves upgrading the glances package from version 3.4.0.5 to 4.1.2 in the requirements.txt file. This upgrade signifies a transition to a newer version of the monitoring tool for system resources, which may include enhancements or alterations in functionality. Specific implications of these updates are not detailed, but the modification reflects a version change in the dependency management.

Changes

Files Change Summary
glances/requirements.txt Updated glances version from 3.4.0.5 to 4.1.2

Poem

🐇 In the meadow, joy does dance,
A new glances sings its chance.
With version four, the features bloom,
Let's hop along and clear the gloom!
A tool refined, to help us see,
System health, as bright as can be! 🌼


🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@renovate renovate bot force-pushed the renovate/glances-4.x branch 9 times, most recently from 2e1d7d3 to fd9b86c Compare May 28, 2024 05:44
@renovate renovate bot force-pushed the renovate/glances-4.x branch 2 times, most recently from 131c809 to eadc413 Compare June 1, 2024 18:09
@renovate renovate bot force-pushed the renovate/glances-4.x branch 4 times, most recently from ba7a6ff to 9d0eb78 Compare June 29, 2024 16:12
@renovate renovate bot force-pushed the renovate/glances-4.x branch 2 times, most recently from 42467a5 to b9b855d Compare July 3, 2024 18:34
@renovate renovate bot force-pushed the renovate/glances-4.x branch 2 times, most recently from a0f84ed to a18d325 Compare July 12, 2024 18:52
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 3f1ad24 and 6f78e7c.

Files selected for processing (1)
  • glances/requirements.txt (1 hunks)
Additional comments not posted (1)
glances/requirements.txt (1)

3-3: Verify compatibility and impact of the glances update.

The update to glances==4.1.2 introduces several enhancements and breaking changes, including the removal of Python 2 support and API modifications. Ensure that:

  • The codebase is compatible with Python 3.8 or higher.
  • Any dependent systems or scripts are updated to accommodate API changes.
  • The new features and enhancements are tested to confirm they meet your requirements.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 6f78e7c and 9ef5b27.

Files selected for processing (1)
  • glances/requirements.txt (1 hunks)
Files skipped from review as they are similar to previous changes (1)
  • glances/requirements.txt

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 9ef5b27 and e5b7a2c.

Files selected for processing (1)
  • glances/requirements.txt (1 hunks)
Files skipped from review as they are similar to previous changes (1)
  • glances/requirements.txt

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between e5b7a2c and 0484a77.

Files selected for processing (1)
  • glances/requirements.txt (1 hunks)
Files skipped from review due to trivial changes (1)
  • glances/requirements.txt

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 0484a77 and ad9b5a5.

Files selected for processing (1)
  • glances/requirements.txt (1 hunks)
Files skipped from review as they are similar to previous changes (1)
  • glances/requirements.txt

@renovate renovate bot force-pushed the renovate/glances-4.x branch 5 times, most recently from 1473682 to 5f28120 Compare September 12, 2024 16:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Upgrade or downgrade of project dependencies. no-stale This issue or PR is exempted from the stable bot.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0 participants