MyGit

v4.0.2

nicolargo/glances

版本发布时间: 2024-05-14 05:03:55

nicolargo/glances最新发布版本:v4.1.2.1(2024-07-04 15:48:17)

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):

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

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:

Majors changes between Glances version 3 and version 4:

APIs

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

All the issues corrected in this version

Enhancements:

Bug corrected:

CI and documentation:

Many thinks to the contributors:

Ready to install/upgrade ?

Have a look to the documentation.

相关地址:原始地址 下载(tar) 下载(zip)

查看:2024-05-14发行的版本