Version 3.2.6.4

This commit is contained in:
nicolargo 2022-05-26 10:27:21 +02:00
parent 2d9bf175d0
commit d0fde6904c
7 changed files with 331 additions and 297 deletions

View File

@ -211,7 +211,7 @@ Available versions on the Docker Hub repository:
- *nicolargo/glances:latest-full* for a full Debian Glances image version with all dependencies - *nicolargo/glances:latest-full* for a full Debian Glances image version with all dependencies
- *nicolargo/glances:alpine-latest-full* for a full Alpine Glances image version with all dependencies - *nicolargo/glances:alpine-latest-full* for a full Alpine Glances image version with all dependencies
You can also specify a version by replacing latest by 3.2.6.3 (for example). You can also specify a version by replacing latest by 3.2.6.4 (for example).
Run last version of Glances container in *console mode*: Run last version of Glances container in *console mode*:

View File

@ -54,6 +54,8 @@ RUN CASS_DRIVER_NO_CYTHON=1 pip3 install --no-cache-dir --user -r optional-requi
FROM build as dev FROM build as dev
ARG PYTHON_VERSION ARG PYTHON_VERSION
COPY --from=remoteInstall /root/.local/bin /usr/local/bin/
COPY --from=remoteInstall /root/.local/lib/python${PYTHON_VERSION}/site-packages /usr/lib/python${PYTHON_VERSION}/site-packages/
COPY --from=additional-packages /root/.local/lib/python${PYTHON_VERSION}/site-packages /usr/lib/python${PYTHON_VERSION}/site-packages/ COPY --from=additional-packages /root/.local/lib/python${PYTHON_VERSION}/site-packages /usr/lib/python${PYTHON_VERSION}/site-packages/
COPY . /glances COPY . /glances
COPY ./docker-compose/glances.conf /etc/glances.conf COPY ./docker-compose/glances.conf /etc/glances.conf
@ -85,8 +87,8 @@ COPY --from=remoteInstall /root/.local/bin /usr/local/bin/
COPY --from=remoteInstall /root/.local/lib/python${PYTHON_VERSION}/site-packages /usr/lib/python${PYTHON_VERSION}/site-packages/ COPY --from=remoteInstall /root/.local/lib/python${PYTHON_VERSION}/site-packages /usr/lib/python${PYTHON_VERSION}/site-packages/
COPY ./docker-compose/glances.conf /etc/glances.conf COPY ./docker-compose/glances.conf /etc/glances.conf
# EXPOSE PORT (XMLRPC / WebUI) # EXPOSE PORT (XMLRPC)
EXPOSE 61209 61208 EXPOSE 61209
# Define default command. # Define default command.
CMD python3 -m glances -C /etc/glances.conf $GLANCES_OPT CMD python3 -m glances -C /etc/glances.conf $GLANCES_OPT
@ -100,3 +102,9 @@ ARG PYTHON_VERSION
COPY --from=additional-packages /root/.local/lib/python${PYTHON_VERSION}/site-packages /usr/lib/python${PYTHON_VERSION}/site-packages/ COPY --from=additional-packages /root/.local/lib/python${PYTHON_VERSION}/site-packages /usr/lib/python${PYTHON_VERSION}/site-packages/
COPY ./docker-compose/glances.conf /etc/glances.conf COPY ./docker-compose/glances.conf /etc/glances.conf
# EXPOSE PORT (XMLRPC / WebUI)
EXPOSE 61209 61208
# Define default command.
CMD python3 -m glances -C /etc/glances.conf $GLANCES_OPT

View File

@ -51,6 +51,8 @@ RUN CASS_DRIVER_NO_CYTHON=1 pip3 install --no-cache-dir --user -r optional-requi
FROM build as dev FROM build as dev
ARG PYTHON_VERSION ARG PYTHON_VERSION
COPY --from=remoteInstall /root/.local/bin /usr/local/bin/
COPY --from=remoteInstall /root/.local/lib/python${PYTHON_VERSION}/site-packages /usr/local/lib/python${PYTHON_VERSION}/site-packages/
COPY --from=additional-packages /root/.local/lib/python${PYTHON_VERSION}/site-packages /usr/local/lib/python${PYTHON_VERSION}/site-packages/ COPY --from=additional-packages /root/.local/lib/python${PYTHON_VERSION}/site-packages /usr/local/lib/python${PYTHON_VERSION}/site-packages/
COPY . /glances COPY . /glances
COPY ./docker-compose/glances.conf /etc/glances.conf COPY ./docker-compose/glances.conf /etc/glances.conf
@ -84,8 +86,8 @@ COPY --from=remoteInstall /root/.local/bin /usr/local/bin/
COPY --from=remoteInstall /root/.local/lib/python${PYTHON_VERSION}/site-packages /usr/local/lib/python${PYTHON_VERSION}/site-packages/ COPY --from=remoteInstall /root/.local/lib/python${PYTHON_VERSION}/site-packages /usr/local/lib/python${PYTHON_VERSION}/site-packages/
COPY ./docker-compose/glances.conf /etc/glances.conf COPY ./docker-compose/glances.conf /etc/glances.conf
# EXPOSE PORT (XMLRPC / WebUI) # EXPOSE PORT (XMLRPC)
EXPOSE 61209 61208 EXPOSE 61209
# Define default command. # Define default command.
CMD python3 -m glances -C /etc/glances.conf $GLANCES_OPT CMD python3 -m glances -C /etc/glances.conf $GLANCES_OPT
@ -99,3 +101,9 @@ ARG PYTHON_VERSION
COPY --from=additional-packages /root/.local/lib/python${PYTHON_VERSION}/site-packages /usr/local/lib/python${PYTHON_VERSION}/site-packages/ COPY --from=additional-packages /root/.local/lib/python${PYTHON_VERSION}/site-packages /usr/local/lib/python${PYTHON_VERSION}/site-packages/
COPY ./docker-compose/glances.conf /etc/glances.conf COPY ./docker-compose/glances.conf /etc/glances.conf
# EXPOSE PORT (XMLRPC / WebUI)
EXPOSE 61209 61208
# Define default command.
CMD python3 -m glances -C /etc/glances.conf $GLANCES_OPT

View File

@ -66,14 +66,14 @@ GET alert
Get plugin stats:: Get plugin stats::
# curl http://localhost:61208/api/3/alert # curl http://localhost:61208/api/3/alert
[[1653511582.0, [[1653553575.0,
-1, -1,
"WARNING", "WARNING",
"MEM", "MEM",
81.37629268155027, 75.52604803296053,
81.37629268155027, 75.52604803296053,
81.37629268155027, 75.52604803296053,
81.37629268155027, 75.52604803296053,
1, 1,
[], [],
"", "",
@ -93,7 +93,7 @@ Get plugin stats::
"refresh": 3.0, "refresh": 3.0,
"regex": True, "regex": True,
"result": None, "result": None,
"timer": 1.2215237617492676}, "timer": 0.8741495609283447},
{"count": 0, {"count": 0,
"countmax": 20.0, "countmax": 20.0,
"countmin": None, "countmin": None,
@ -102,7 +102,7 @@ Get plugin stats::
"refresh": 3.0, "refresh": 3.0,
"regex": True, "regex": True,
"result": None, "result": None,
"timer": 1.2214140892028809}] "timer": 0.8740122318267822}]
Get a specific field:: Get a specific field::
@ -120,7 +120,7 @@ Get a specific item when field matchs the given value::
"refresh": 3.0, "refresh": 3.0,
"regex": True, "regex": True,
"result": None, "result": None,
"timer": 1.2215237617492676}]} "timer": 0.8741495609283447}]}
GET core GET core
-------- --------
@ -150,19 +150,19 @@ Get plugin stats::
"ctx_switches": 0, "ctx_switches": 0,
"guest": 0.0, "guest": 0.0,
"guest_nice": 0.0, "guest_nice": 0.0,
"idle": 68.6, "idle": 74.7,
"interrupts": 0, "interrupts": 0,
"iowait": 0.1, "iowait": 0.2,
"irq": 0.0, "irq": 0.0,
"nice": 0.0, "nice": 0.0,
"soft_interrupts": 0, "soft_interrupts": 0,
"softirq": 0.0, "softirq": 0.2,
"steal": 0.0, "steal": 0.0,
"syscalls": 0, "syscalls": 0,
"system": 4.3, "system": 4.2,
"time_since_update": 1, "time_since_update": 1,
"total": 35.6, "total": 24.9,
"user": 27.0} "user": 20.7}
Fields descriptions: Fields descriptions:
@ -184,7 +184,7 @@ Fields descriptions:
Get a specific field:: Get a specific field::
# curl http://localhost:61208/api/3/cpu/total # curl http://localhost:61208/api/3/cpu/total
{"total": 35.6} {"total": 24.9}
GET diskio GET diskio
---------- ----------
@ -239,7 +239,7 @@ Get plugin stats::
"io_r": None, "io_r": None,
"io_w": None, "io_w": None,
"key": "name", "key": "name",
"memory_usage": 35647488, "memory_usage": 32485376,
"name": "telegraf", "name": "telegraf",
"network_rx": None, "network_rx": None,
"network_tx": None}, "network_tx": None},
@ -265,13 +265,13 @@ Get plugin stats::
# curl http://localhost:61208/api/3/fs # curl http://localhost:61208/api/3/fs
[{"device_name": "/dev/mapper/ubuntu--gnome--vg-root", [{"device_name": "/dev/mapper/ubuntu--gnome--vg-root",
"free": 99862933504, "free": 99599114240,
"fs_type": "ext4", "fs_type": "ext4",
"key": "mnt_point", "key": "mnt_point",
"mnt_point": "/", "mnt_point": "/",
"percent": 56.8, "percent": 56.9,
"size": 243396149248, "size": 243396149248,
"used": 131145760768}] "used": 131409580032}]
Get a specific field:: Get a specific field::
@ -282,13 +282,13 @@ Get a specific item when field matchs the given value::
# curl http://localhost:61208/api/3/fs/mnt_point// # curl http://localhost:61208/api/3/fs/mnt_point//
{"/": [{"device_name": "/dev/mapper/ubuntu--gnome--vg-root", {"/": [{"device_name": "/dev/mapper/ubuntu--gnome--vg-root",
"free": 99862933504, "free": 99599114240,
"fs_type": "ext4", "fs_type": "ext4",
"key": "mnt_point", "key": "mnt_point",
"mnt_point": "/", "mnt_point": "/",
"percent": 56.8, "percent": 56.9,
"size": 243396149248, "size": 243396149248,
"used": 131145760768}]} "used": 131409580032}]}
GET ip GET ip
------ ------
@ -313,7 +313,10 @@ GET load
Get plugin stats:: Get plugin stats::
# curl http://localhost:61208/api/3/load # curl http://localhost:61208/api/3/load
{"cpucore": 4, "min1": 1.7607421875, "min15": 0.787109375, "min5": 1.0986328125} {"cpucore": 4,
"min1": 1.400390625,
"min15": 0.6708984375,
"min5": 0.88232421875}
Fields descriptions: Fields descriptions:
@ -325,7 +328,7 @@ Fields descriptions:
Get a specific field:: Get a specific field::
# curl http://localhost:61208/api/3/load/min1 # curl http://localhost:61208/api/3/load/min1
{"min1": 1.7607421875} {"min1": 1.400390625}
GET mem GET mem
------- -------
@ -333,16 +336,16 @@ GET mem
Get plugin stats:: Get plugin stats::
# curl http://localhost:61208/api/3/mem # curl http://localhost:61208/api/3/mem
{"active": 2994515968, {"active": 2892922880,
"available": 1459716096, "available": 1918255104,
"buffers": 120791040, "buffers": 290897920,
"cached": 2113867776, "cached": 2221674496,
"free": 1459716096, "free": 1918255104,
"inactive": 3645423616, "inactive": 3598147584,
"percent": 81.4, "percent": 75.5,
"shared": 646406144, "shared": 577904640,
"total": 7837945856, "total": 7837945856,
"used": 6378229760} "used": 5919690752}
Fields descriptions: Fields descriptions:
@ -369,13 +372,13 @@ GET memswap
Get plugin stats:: Get plugin stats::
# curl http://localhost:61208/api/3/memswap # curl http://localhost:61208/api/3/memswap
{"free": 6304215040, {"free": 5879463936,
"percent": 22.0, "percent": 27.3,
"sin": 1377947648, "sin": 1691422720,
"sout": 3402825728, "sout": 4207906816,
"time_since_update": 1, "time_since_update": 1,
"total": 8082419712, "total": 8082419712,
"used": 1778204672} "used": 2202955776}
Fields descriptions: Fields descriptions:
@ -399,29 +402,29 @@ Get plugin stats::
# curl http://localhost:61208/api/3/network # curl http://localhost:61208/api/3/network
[{"alias": None, [{"alias": None,
"cumulative_cx": 473925792, "cumulative_cx": 487998794,
"cumulative_rx": 236962896, "cumulative_rx": 243999397,
"cumulative_tx": 236962896, "cumulative_tx": 243999397,
"cx": 4156, "cx": 2250,
"interface_name": "lo", "interface_name": "lo",
"is_up": True, "is_up": True,
"key": "interface_name", "key": "interface_name",
"rx": 2078, "rx": 1125,
"speed": 0, "speed": 0,
"time_since_update": 1, "time_since_update": 1,
"tx": 2078}, "tx": 1125},
{"alias": None, {"alias": None,
"cumulative_cx": 5365392428, "cumulative_cx": 6223765175,
"cumulative_rx": 5016373584, "cumulative_rx": 5835637800,
"cumulative_tx": 349018844, "cumulative_tx": 388127375,
"cx": 34101, "cx": 17693,
"interface_name": "wlp2s0", "interface_name": "wlp2s0",
"is_up": True, "is_up": True,
"key": "interface_name", "key": "interface_name",
"rx": 23539, "rx": 13430,
"speed": 0, "speed": 0,
"time_since_update": 1, "time_since_update": 1,
"tx": 10562}] "tx": 4263}]
Fields descriptions: Fields descriptions:
@ -453,17 +456,17 @@ Get a specific item when field matchs the given value::
# curl http://localhost:61208/api/3/network/interface_name/lo # curl http://localhost:61208/api/3/network/interface_name/lo
{"lo": [{"alias": None, {"lo": [{"alias": None,
"cumulative_cx": 473925792, "cumulative_cx": 487998794,
"cumulative_rx": 236962896, "cumulative_rx": 243999397,
"cumulative_tx": 236962896, "cumulative_tx": 243999397,
"cx": 4156, "cx": 2250,
"interface_name": "lo", "interface_name": "lo",
"is_up": True, "is_up": True,
"key": "interface_name", "key": "interface_name",
"rx": 2078, "rx": 1125,
"speed": 0, "speed": 0,
"time_since_update": 1, "time_since_update": 1,
"tx": 2078}]} "tx": 1125}]}
GET now GET now
------- -------
@ -471,7 +474,7 @@ GET now
Get plugin stats:: Get plugin stats::
# curl http://localhost:61208/api/3/now # curl http://localhost:61208/api/3/now
"2022-05-25 22:46:22 CEST" "2022-05-26 10:26:15 CEST"
GET percpu GET percpu
---------- ----------
@ -482,29 +485,29 @@ Get plugin stats::
[{"cpu_number": 0, [{"cpu_number": 0,
"guest": 0.0, "guest": 0.0,
"guest_nice": 0.0, "guest_nice": 0.0,
"idle": 56.9, "idle": 92.0,
"iowait": 0.0, "iowait": 0.0,
"irq": 0.0, "irq": 0.0,
"key": "cpu_number", "key": "cpu_number",
"nice": 0.0, "nice": 0.0,
"softirq": 0.0, "softirq": 0.0,
"steal": 0.0, "steal": 0.0,
"system": 4.6, "system": 0.0,
"total": 43.1, "total": 8.0,
"user": 38.5}, "user": 6.0},
{"cpu_number": 1, {"cpu_number": 1,
"guest": 0.0, "guest": 0.0,
"guest_nice": 0.0, "guest_nice": 0.0,
"idle": 73.8, "idle": 14.7,
"iowait": 0.0, "iowait": 0.0,
"irq": 0.0, "irq": 0.0,
"key": "cpu_number", "key": "cpu_number",
"nice": 0.0, "nice": 0.0,
"softirq": 0.0, "softirq": 0.0,
"steal": 0.0, "steal": 0.0,
"system": 4.6, "system": 7.8,
"total": 26.2, "total": 85.3,
"user": 21.5}] "user": 77.5}]
Get a specific field:: Get a specific field::
@ -523,7 +526,7 @@ Get plugin stats::
"port": 0, "port": 0,
"refresh": 30, "refresh": 30,
"rtt_warning": None, "rtt_warning": None,
"status": 0.011961, "status": 0.00469,
"timeout": 3}] "timeout": 3}]
Get a specific field:: Get a specific field::
@ -540,7 +543,7 @@ Get a specific item when field matchs the given value::
"port": 0, "port": 0,
"refresh": 30, "refresh": 30,
"rtt_warning": None, "rtt_warning": None,
"status": 0.011961, "status": 0.00469,
"timeout": 3}]} "timeout": 3}]}
GET processcount GET processcount
@ -549,12 +552,12 @@ GET processcount
Get plugin stats:: Get plugin stats::
# curl http://localhost:61208/api/3/processcount # curl http://localhost:61208/api/3/processcount
{"pid_max": 0, "running": 1, "sleeping": 269, "thread": 1530, "total": 335} {"pid_max": 0, "running": 1, "sleeping": 269, "thread": 1549, "total": 340}
Get a specific field:: Get a specific field::
# curl http://localhost:61208/api/3/processcount/total # curl http://localhost:61208/api/3/processcount/total
{"total": 335} {"total": 340}
GET processlist GET processlist
--------------- ---------------
@ -564,50 +567,60 @@ Get plugin stats::
# curl http://localhost:61208/api/3/processlist # curl http://localhost:61208/api/3/processlist
[{"cmdline": ["/snap/firefox/1300/usr/lib/firefox/firefox"], [{"cmdline": ["/snap/firefox/1300/usr/lib/firefox/firefox"],
"cpu_percent": 0.0, "cpu_percent": 0.0,
"cpu_times": pcputimes(user=7265.13, system=2644.4, children_user=4225.08, children_system=934.33, iowait=0.0), "cpu_times": pcputimes(user=7842.55, system=2860.18, children_user=4894.59, children_system=1104.51, iowait=0.0),
"gids": pgids(real=1000, effective=1000, saved=1000), "gids": pgids(real=1000, effective=1000, saved=1000),
"io_counters": [2597592064, 8660602880, 0, 0, 0], "io_counters": [3029197824, 9226412032, 0, 0, 0],
"key": "pid", "key": "pid",
"memory_info": pmem(rss=521797632, vms=14051770368, shared=142577664, text=643072, lib=0, data=1934319616, dirty=0), "memory_info": pmem(rss=505921536, vms=14043705344, shared=137408512, text=643072, lib=0, data=1933852672, dirty=0),
"memory_percent": 6.657326314656288, "memory_percent": 6.454772019287601,
"name": "firefox", "name": "firefox",
"nice": 0, "nice": 0,
"num_threads": 165, "num_threads": 164,
"pid": 10259, "pid": 10259,
"ppid": 2922, "ppid": 2922,
"status": "S", "status": "S",
"time_since_update": 1, "time_since_update": 1,
"username": "nicolargo"}, "username": "nicolargo"},
{"cmdline": ["/snap/firefox/1300/usr/lib/firefox/firefox", {"cmdline": ["/usr/share/code/code",
"-contentproc", "--type=renderer",
"-childID", "--enable-crashpad",
"1", "--crashpad-handler-pid=271104",
"-isForBrowser", "--enable-crash-reporter=721e05a9-6035-4dcb-bd58-68097aa48dd0,no_channel",
"-prefsLen", "--user-data-dir=/home/nicolargo/.config/Code",
"628", "--standard-schemes=vscode-webview,vscode-file",
"-prefMapSize", "--secure-schemes=vscode-webview,vscode-file",
"267733", "--bypasscsp-schemes",
"-jsInitLen", "--cors-schemes=vscode-webview,vscode-file",
"277212", "--fetch-schemes=vscode-webview,vscode-file",
"-parentBuildID", "--service-worker-schemes=vscode-webview",
"20220502141216", "--streaming-schemes",
"-appDir", "--app-path=/usr/share/code/resources/app",
"/snap/firefox/1300/usr/lib/firefox/browser", "--no-sandbox",
"10259", "--no-zygote",
"true", "--enable-blink-features=HighlightAPI",
"tab"], "--disable-color-correct-rendering",
"--lang=en-US",
"--num-raster-threads=2",
"--enable-main-frame-before-activation",
"--renderer-client-id=4",
"--launch-time-ticks=105869565472",
"--shared-files=v8_context_snapshot_data:100",
"--field-trial-handle=0,5488460745429738826,5483870965940292230,131072",
"--disable-features=PlzServiceWorker,SpareRendererForSitePerProcess",
"--vscode-window-config=vscode:92899e8d-13b6-4223-84f0-02ad1f3622b4",
"--enable-crashpad"],
"cpu_percent": 0.0, "cpu_percent": 0.0,
"cpu_times": pcputimes(user=1572.98, system=303.12, children_user=0.0, children_system=0.0, iowait=0.0), "cpu_times": pcputimes(user=945.17, system=67.18, children_user=0.0, children_system=0.0, iowait=0.0),
"gids": pgids(real=1000, effective=1000, saved=1000), "gids": pgids(real=1000, effective=1000, saved=1000),
"io_counters": [157250560, 0, 0, 0, 0], "io_counters": [86761472, 2899968, 0, 0, 0],
"key": "pid", "key": "pid",
"memory_info": pmem(rss=498479104, vms=3363688448, shared=77520896, text=643072, lib=0, data=767954944, dirty=0), "memory_info": pmem(rss=415363072, vms=41188425728, shared=71127040, text=106147840, lib=0, data=650543104, dirty=0),
"memory_percent": 6.359818161009762, "memory_percent": 5.299386849961929,
"name": "WebExtensions", "name": "code",
"nice": 0, "nice": 0,
"num_threads": 20, "num_threads": 16,
"pid": 10790, "pid": 271153,
"ppid": 10259, "ppid": 271083,
"status": "S", "status": "S",
"time_since_update": 1, "time_since_update": 1,
"username": "nicolargo"}] "username": "nicolargo"}]
@ -616,187 +629,188 @@ Get a specific field::
# curl http://localhost:61208/api/3/processlist/pid # curl http://localhost:61208/api/3/processlist/pid
{"pid": [10259, {"pid": [10259,
10790,
271153, 271153,
271200, 10790,
10854,
20979,
10850, 10850,
10854,
2922, 2922,
21227, 326164,
271409, 271200,
20979,
21025, 21025,
240874, 271409,
62372, 21227,
308697, 321955,
10857, 10857,
320227,
321980,
271083, 271083,
271184,
10814, 10814,
308943, 271184,
309130, 330843,
12436,
331008,
331170,
331005,
315958,
331503,
52875,
2820,
337,
2033,
3251,
306581, 306581,
271118, 271118,
12436,
309195,
306584,
309267,
271247,
271208,
3251,
309448,
337,
2820,
271397,
52875,
243846, 243846,
2033, 306584,
271208,
234429, 234429,
271140,
3279,
138954, 138954,
11390, 11390,
265539, 3279,
138989, 271397,
138834, 138834,
271089, 271140,
266251, 138989,
2505,
3019, 3019,
271088, 3161,
1302, 1302,
186877, 186877,
2109, 2109,
3161,
186878,
10597,
2790, 2790,
304566, 10597,
186878,
271089,
320718,
265539,
271088,
3706, 3706,
8716, 8716,
20965,
3347, 3347,
3066, 266251,
1133,
2999, 2999,
232395, 3066,
320734,
1133,
2505,
3056, 3056,
21229, 20965,
3065, 3065,
21229,
3206, 3206,
8715, 2990,
1601, 1601,
1, 1,
2990, 8715,
2964,
3259, 3259,
2964,
3227, 3227,
3085,
232398,
2867,
1150, 1150,
3064, 3085,
320739,
2073, 2073,
3381, 3064,
218290,
1313, 1313,
218290,
2867,
2900, 2900,
2081,
1990,
20932,
144959, 144959,
1147, 3381,
1176, 1990,
3077,
2769,
3062, 3062,
3077,
2081,
1176,
2769,
2781, 2781,
1147,
3058, 3058,
989,
3178,
20917,
20916,
3004, 3004,
3178,
2933, 2933,
271268, 989,
2831, 20932,
3068,
8959,
1271,
8941,
10906, 10906,
2831,
20917,
8941,
20916,
8959,
3034, 3034,
241702, 1271,
1173,
2794,
12458,
1310,
1132,
2800,
1115,
2971,
2798, 2798,
1596, 3068,
3268, 1310,
1151, 2794,
2960, 2800,
3084, 1173,
3136, 1132,
3260, 3260,
3129, 271091,
3059, 2960,
2923, 271268,
2944, 1115,
3232, 1596,
3079, 2971,
3136,
3268,
1139, 1139,
1171, 1151,
138811, 12458,
3129,
3084,
3059,
241702,
3232,
2944,
3075, 3075,
2923,
3079,
1167, 1167,
3074, 3074,
2977, 2977,
3046,
138968,
2888, 2888,
2949, 2949,
3226, 3226,
1171,
3054,
2828,
3046,
1161, 1161,
24865, 24865,
138923,
3054,
271091,
2079, 2079,
2828,
990,
2788,
1127, 1127,
990,
138811,
2788,
2868, 2868,
234438, 234438,
1156,
2805, 2805,
2789, 138923,
2080,
2988, 2988,
381, 138968,
2080,
1156,
2789,
1123, 1123,
381,
2508,
1142, 1142,
2931, 2931,
2508,
1429, 1429,
1178,
988,
1130, 1130,
21209, 1178,
331493,
988,
8757, 8757,
266415, 21209,
309432,
997, 997,
266415,
1183, 1183,
271104,
996, 996,
1996,
3274, 3274,
1996,
271104,
1126, 1126,
3528, 3528,
138796, 138796,
@ -804,17 +818,16 @@ Get a specific field::
138788, 138788,
138767, 138767,
138752, 138752,
306441,
138731, 138731,
331502,
138901, 138901,
309447,
1914, 1914,
138774, 138774,
138745, 138745,
2782,
138724, 138724,
3053, 3053,
2012, 2012,
2782,
2020, 2020,
1997, 1997,
1186, 1186,
@ -931,46 +944,51 @@ Get a specific field::
2822, 2822,
20919, 20919,
20947, 20947,
282038, 317792,
303032, 320493,
303046, 320505,
304473, 325971,
304481, 326155,
304546, 326883,
305737, 328047,
305836, 329324,
305906, 329399,
305964, 329720,
306989, 329836,
307047, 329910,
307166, 330562,
307650, 330564,
308467, 330788,
308919, 330834,
308920, 330917,
308925, 331135,
309347]} 331136,
331426,
331427,
331446,
331447,
331448]}
Get a specific item when field matchs the given value:: Get a specific item when field matchs the given value::
# curl http://localhost:61208/api/3/processlist/pid/10259 # curl http://localhost:61208/api/3/processlist/pid/10259
{"10259": [{"cmdline": ["/snap/firefox/1300/usr/lib/firefox/firefox"], {"10259": [{"cmdline": ["/snap/firefox/1300/usr/lib/firefox/firefox"],
"cpu_percent": 0.0, "cpu_percent": 0.0,
"cpu_times": [7265.13, 2644.4, 4225.08, 934.33, 0.0], "cpu_times": [7842.55, 2860.18, 4894.59, 1104.51, 0.0],
"gids": [1000, 1000, 1000], "gids": [1000, 1000, 1000],
"io_counters": [2597592064, 8660602880, 0, 0, 0], "io_counters": [3029197824, 9226412032, 0, 0, 0],
"key": "pid", "key": "pid",
"memory_info": [521797632, "memory_info": [505921536,
14051770368, 14043705344,
142577664, 137408512,
643072, 643072,
0, 0,
1934319616, 1933852672,
0], 0],
"memory_percent": 6.657326314656288, "memory_percent": 6.454772019287601,
"name": "firefox", "name": "firefox",
"nice": 0, "nice": 0,
"num_threads": 165, "num_threads": 164,
"pid": 10259, "pid": 10259,
"ppid": 2922, "ppid": 2922,
"status": "S", "status": "S",
@ -983,7 +1001,7 @@ GET psutilversion
Get plugin stats:: Get plugin stats::
# curl http://localhost:61208/api/3/psutilversion # curl http://localhost:61208/api/3/psutilversion
(5, 9, 0) (5, 9, 1)
GET quicklook GET quicklook
------------- -------------
@ -991,69 +1009,69 @@ GET quicklook
Get plugin stats:: Get plugin stats::
# curl http://localhost:61208/api/3/quicklook # curl http://localhost:61208/api/3/quicklook
{"cpu": 35.6, {"cpu": 24.9,
"cpu_hz": 3000000000.0, "cpu_hz": 3000000000.0,
"cpu_hz_current": 2860000.0, "cpu_hz_current": 1812234250.0,
"cpu_name": "Intel(R) Core(TM) i7-4500U CPU @ 1.80GHz", "cpu_name": "Intel(R) Core(TM) i7-4500U CPU @ 1.80GHz",
"mem": 81.4, "mem": 75.5,
"percpu": [{"cpu_number": 0, "percpu": [{"cpu_number": 0,
"guest": 0.0, "guest": 0.0,
"guest_nice": 0.0, "guest_nice": 0.0,
"idle": 56.9, "idle": 92.0,
"iowait": 0.0, "iowait": 0.0,
"irq": 0.0, "irq": 0.0,
"key": "cpu_number", "key": "cpu_number",
"nice": 0.0, "nice": 0.0,
"softirq": 0.0, "softirq": 0.0,
"steal": 0.0, "steal": 0.0,
"system": 4.6, "system": 0.0,
"total": 43.1, "total": 8.0,
"user": 38.5}, "user": 6.0},
{"cpu_number": 1, {"cpu_number": 1,
"guest": 0.0, "guest": 0.0,
"guest_nice": 0.0, "guest_nice": 0.0,
"idle": 73.8, "idle": 14.7,
"iowait": 0.0, "iowait": 0.0,
"irq": 0.0, "irq": 0.0,
"key": "cpu_number", "key": "cpu_number",
"nice": 0.0, "nice": 0.0,
"softirq": 0.0, "softirq": 0.0,
"steal": 0.0, "steal": 0.0,
"system": 4.6, "system": 7.8,
"total": 26.2, "total": 85.3,
"user": 21.5}, "user": 77.5},
{"cpu_number": 2, {"cpu_number": 2,
"guest": 0.0, "guest": 0.0,
"guest_nice": 0.0, "guest_nice": 0.0,
"idle": 56.1, "idle": 96.0,
"iowait": 0.8,
"irq": 0.0,
"key": "cpu_number",
"nice": 0.0,
"softirq": 0.0,
"steal": 0.0,
"system": 4.5,
"total": 43.9,
"user": 38.6},
{"cpu_number": 3,
"guest": 0.0,
"guest_nice": 0.0,
"idle": 69.9,
"iowait": 0.0, "iowait": 0.0,
"irq": 0.0, "irq": 0.0,
"key": "cpu_number", "key": "cpu_number",
"nice": 0.0, "nice": 0.0,
"softirq": 0.0, "softirq": 0.0,
"steal": 0.0, "steal": 0.0,
"system": 3.0, "system": 2.0,
"total": 30.1, "total": 4.0,
"user": 27.1}], "user": 1.0},
"swap": 22.0} {"cpu_number": 3,
"guest": 0.0,
"guest_nice": 0.0,
"idle": 96.0,
"iowait": 0.0,
"irq": 0.0,
"key": "cpu_number",
"nice": 0.0,
"softirq": 0.0,
"steal": 0.0,
"system": 2.0,
"total": 4.0,
"user": 2.0}],
"swap": 27.3}
Get a specific field:: Get a specific field::
# curl http://localhost:61208/api/3/quicklook/cpu # curl http://localhost:61208/api/3/quicklook/cpu
{"cpu": 35.6} {"cpu": 24.9}
GET sensors GET sensors
----------- -----------
@ -1124,7 +1142,7 @@ GET uptime
Get plugin stats:: Get plugin stats::
# curl http://localhost:61208/api/3/uptime # curl http://localhost:61208/api/3/uptime
{"seconds": 1495537} {"seconds": 1537530}
GET all stats GET all stats
------------- -------------
@ -1140,33 +1158,33 @@ GET stats history
History of a plugin:: History of a plugin::
# curl http://localhost:61208/api/3/cpu/history # curl http://localhost:61208/api/3/cpu/history
{"system": [["2022-05-25T22:46:23.083039", 4.3], {"system": [["2022-05-26T10:26:16.012702", 4.2],
["2022-05-25T22:46:24.140665", 4.3], ["2022-05-26T10:26:17.068522", 4.2],
["2022-05-25T22:46:25.239049", 5.5]], ["2022-05-26T10:26:18.156940", 1.6]],
"user": [["2022-05-25T22:46:23.083029", 27.0], "user": [["2022-05-26T10:26:16.012696", 20.7],
["2022-05-25T22:46:24.140661", 27.0], ["2022-05-26T10:26:17.068516", 20.7],
["2022-05-25T22:46:25.239044", 10.7]]} ["2022-05-26T10:26:18.156935", 4.1]]}
Limit history to last 2 values:: Limit history to last 2 values::
# curl http://localhost:61208/api/3/cpu/history/2 # curl http://localhost:61208/api/3/cpu/history/2
{"system": [["2022-05-25T22:46:24.140665", 4.3], {"system": [["2022-05-26T10:26:17.068522", 4.2],
["2022-05-25T22:46:25.239049", 5.5]], ["2022-05-26T10:26:18.156940", 1.6]],
"user": [["2022-05-25T22:46:24.140661", 27.0], "user": [["2022-05-26T10:26:17.068516", 20.7],
["2022-05-25T22:46:25.239044", 10.7]]} ["2022-05-26T10:26:18.156935", 4.1]]}
History for a specific field:: History for a specific field::
# curl http://localhost:61208/api/3/cpu/system/history # curl http://localhost:61208/api/3/cpu/system/history
{"system": [["2022-05-25T22:46:23.083039", 4.3], {"system": [["2022-05-26T10:26:16.012702", 4.2],
["2022-05-25T22:46:24.140665", 4.3], ["2022-05-26T10:26:17.068522", 4.2],
["2022-05-25T22:46:25.239049", 5.5]]} ["2022-05-26T10:26:18.156940", 1.6]]}
Limit history for a specific field to last 2 values:: Limit history for a specific field to last 2 values::
# curl http://localhost:61208/api/3/cpu/system/history # curl http://localhost:61208/api/3/cpu/system/history
{"system": [["2022-05-25T22:46:24.140665", 4.3], {"system": [["2022-05-26T10:26:17.068522", 4.2],
["2022-05-25T22:46:25.239049", 5.5]]} ["2022-05-26T10:26:18.156940", 1.6]]}
GET limits (used for thresholds) GET limits (used for thresholds)
-------------------------------- --------------------------------

View File

@ -27,7 +27,7 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
.in \\n[rst2man-indent\\n[rst2man-indent-level]]u .in \\n[rst2man-indent\\n[rst2man-indent-level]]u
.. ..
.TH "GLANCES" "1" "May 25, 2022" "3.2.6.3" "Glances" .TH "GLANCES" "1" "May 26, 2022" "3.2.6.4" "Glances"
.SH NAME .SH NAME
glances \- An eye on your system glances \- An eye on your system
.SH SYNOPSIS .SH SYNOPSIS

View File

@ -29,7 +29,7 @@ import sys
# Global name # Global name
# Version should start and end with a numerical char # Version should start and end with a numerical char
# See https://packaging.python.org/specifications/core-metadata/#version # See https://packaging.python.org/specifications/core-metadata/#version
__version__ = '3.2.6.3' __version__ = '3.2.6.4'
__author__ = 'Nicolas Hennion <nicolas@nicolargo.com>' __author__ = 'Nicolas Hennion <nicolas@nicolargo.com>'
__license__ = 'LGPLv3' __license__ = 'LGPLv3'

View File

@ -23,7 +23,6 @@ import os
import threading import threading
import time import time
from copy import deepcopy from copy import deepcopy
from dateutil import parser
from glances.compat import iterkeys, itervalues, nativestr, pretty_date from glances.compat import iterkeys, itervalues, nativestr, pretty_date
from glances.logger import logger from glances.logger import logger
@ -35,10 +34,11 @@ from glances.timer import getTimeSinceLastUpdate
# https://github.com/docker/docker-py # https://github.com/docker/docker-py
try: try:
import docker import docker
from dateutil import parser
except Exception as e: except Exception as e:
import_error_tag = True import_error_tag = True
# Display debug message if import KeyError # Display debug message if import KeyError
logger.warning("Error loading Docker Python Lib. Docker plugin is disabled ({})".format(e)) logger.warning("Error loading Docker deps Lib. Docker plugin is disabled ({})".format(e))
else: else:
import_error_tag = False import_error_tag = False