提交 0e7919ea 编写于 作者: N nicolargo

version 3.2.3

上级 c4bb0af8
...@@ -6,9 +6,19 @@ ...@@ -6,9 +6,19 @@
Version 3.2.3 Version 3.2.3
=============== ===============
Under development, see roadmap here: Bugs corrected:
* Docker container monitoring only show half command? #1912
* Processor name getting cut off #1917
* batinfo not in docker image (and in requirements files...) ? #1915
* Glances don't send hostname (tag) to influxdb2 #1913
* Public IP address doesn't display anymore #1910
* Debian Docker images broken with version 3.2.2 #1905
Enhancement requests:
https://github.com/nicolargo/glances/milestone/52 * Make the process sort list configurable through the command line #1903
* [WebUI] truncates network name #1699
=============== ===============
Version 3.2.2 Version 3.2.2
......
...@@ -171,6 +171,9 @@ tx_critical=90 ...@@ -171,6 +171,9 @@ tx_critical=90
#wlan0_tx_critical=1000000 #wlan0_tx_critical=1000000
#wlan0_tx_log=True #wlan0_tx_log=True
[ip]
disable=False
[connections] [connections]
# Display additional information about TCP connections # Display additional information about TCP connections
# This plugin is disabled by default # This plugin is disabled by default
......
因为 它太大了无法显示 source diff 。你可以改为 查看blob
...@@ -49,25 +49,6 @@ Get the plugins list:: ...@@ -49,25 +49,6 @@ Get the plugins list::
'uptime', 'uptime',
'wifi'] 'wifi']
GET alert
---------
Get plugin stats::
# curl http://localhost:61208/api/3/alert
[[1627806074.0,
-1,
'WARNING',
'MEM',
76.76445186625092,
76.76445186625092,
76.76445186625092,
76.76445186625092,
1,
[],
'',
'memory_percent']]
GET amps GET amps
-------- --------
...@@ -82,7 +63,7 @@ Get plugin stats:: ...@@ -82,7 +63,7 @@ Get plugin stats::
'refresh': 3.0, 'refresh': 3.0,
'regex': True, 'regex': True,
'result': None, 'result': None,
'timer': 0.3367033004760742}, 'timer': 0.19156432151794434},
{'count': 0, {'count': 0,
'countmax': 20.0, 'countmax': 20.0,
'countmin': None, 'countmin': None,
...@@ -91,7 +72,7 @@ Get plugin stats:: ...@@ -91,7 +72,7 @@ Get plugin stats::
'refresh': 3.0, 'refresh': 3.0,
'regex': True, 'regex': True,
'result': None, 'result': None,
'timer': 0.3365163803100586}] 'timer': 0.19138813018798828}]
Get a specific field:: Get a specific field::
...@@ -109,7 +90,7 @@ Get a specific item when field matchs the given value:: ...@@ -109,7 +90,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': 0.3367033004760742}]} 'timer': 0.19156432151794434}]}
GET core GET core
-------- --------
...@@ -139,19 +120,19 @@ Get plugin stats:: ...@@ -139,19 +120,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': 73.0, 'idle': 65.9,
'interrupts': 0, 'interrupts': 0,
'iowait': 0.1, 'iowait': 0.6,
'irq': 0.0, 'irq': 0.0,
'nice': 0.0, 'nice': 0.0,
'soft_interrupts': 0, 'soft_interrupts': 0,
'softirq': 4.3, 'softirq': 3.3,
'steal': 0.0, 'steal': 0.0,
'syscalls': 0, 'syscalls': 0,
'system': 3.4, 'system': 3.5,
'time_since_update': 1, 'time_since_update': 1,
'total': 29.9, 'total': 34.2,
'user': 19.1} 'user': 26.8}
Fields descriptions: Fields descriptions:
...@@ -172,7 +153,7 @@ Fields descriptions: ...@@ -172,7 +153,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': 29.9} {'total': 34.2}
GET diskio GET diskio
---------- ----------
...@@ -211,6 +192,39 @@ Get a specific item when field matchs the given value:: ...@@ -211,6 +192,39 @@ Get a specific item when field matchs the given value::
'write_bytes': 0, 'write_bytes': 0,
'write_count': 0}]} 'write_count': 0}]}
GET docker
----------
Get plugin stats::
# curl http://localhost:61208/api/3/docker
[{'Command': ['/run.sh'],
'Id': '5f8abfeafe0a176954ca2a2062afcd07eb74988ddfbf6323fccd8e5f882b4e4b',
'Image': ['grafana/grafana:latest'],
'Names': ['grafana'],
'Status': 'running',
'cpu_percent': 0.0,
'io_r': None,
'io_w': None,
'key': 'name',
'memory_usage': None,
'name': 'grafana',
'network_rx': None,
'network_tx': None},
{'Command': ['/entrypoint.sh', 'telegraf'],
'Id': '84db65dbbbfead7851695dbff97f7751b5b3b93f7a50c24d66d4caab45b5f159',
'Image': ['telegraf:latest'],
'Names': ['telegraf'],
'Status': 'running',
'cpu_percent': 0.0,
'io_r': None,
'io_w': None,
'key': 'name',
'memory_usage': None,
'name': 'telegraf',
'network_rx': None,
'network_tx': None}]
GET fs GET fs
------ ------
...@@ -218,13 +232,13 @@ Get plugin stats:: ...@@ -218,13 +232,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': 36321226752, 'free': 36151685120,
'fs_type': 'ext4', 'fs_type': 'ext4',
'key': 'mnt_point', 'key': 'mnt_point',
'mnt_point': '/', 'mnt_point': '/',
'percent': 84.3, 'percent': 84.4,
'size': 243396149248, 'size': 243396149248,
'used': 194687467520}] 'used': 194857009152}]
Get a specific field:: Get a specific field::
...@@ -235,13 +249,13 @@ Get a specific item when field matchs the given value:: ...@@ -235,13 +249,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': 36321226752, 'free': 36151685120,
'fs_type': 'ext4', 'fs_type': 'ext4',
'key': 'mnt_point', 'key': 'mnt_point',
'mnt_point': '/', 'mnt_point': '/',
'percent': 84.3, 'percent': 84.4,
'size': 243396149248, 'size': 243396149248,
'used': 194687467520}]} 'used': 194857009152}]}
GET ip GET ip
------ ------
...@@ -266,7 +280,7 @@ GET load ...@@ -266,7 +280,7 @@ 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.29, 'min15': 1.11, 'min5': 1.24} {'cpucore': 4, 'min1': 1.56, 'min15': 0.79, 'min5': 1.33}
Fields descriptions: Fields descriptions:
...@@ -278,7 +292,7 @@ Fields descriptions: ...@@ -278,7 +292,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.29} {'min1': 1.56}
GET mem GET mem
------- -------
...@@ -286,16 +300,16 @@ GET mem ...@@ -286,16 +300,16 @@ GET mem
Get plugin stats:: Get plugin stats::
# curl http://localhost:61208/api/3/mem # curl http://localhost:61208/api/3/mem
{'active': 5129474048, {'active': 4615663616,
'available': 1823772672, 'available': 2695766016,
'buffers': 270041088, 'buffers': 443973632,
'cached': 2501357568, 'cached': 2841604096,
'free': 1823772672, 'free': 2695766016,
'inactive': 1639522304, 'inactive': 2135314432,
'percent': 76.8, 'percent': 65.7,
'shared': 843190272, 'shared': 709017600,
'total': 7849062400, 'total': 7849021440,
'used': 6025289728} 'used': 5153255424}
Fields descriptions: Fields descriptions:
...@@ -314,7 +328,7 @@ Fields descriptions: ...@@ -314,7 +328,7 @@ Fields descriptions:
Get a specific field:: Get a specific field::
# curl http://localhost:61208/api/3/mem/total # curl http://localhost:61208/api/3/mem/total
{'total': 7849062400} {'total': 7849021440}
GET memswap GET memswap
----------- -----------
...@@ -322,13 +336,13 @@ GET memswap ...@@ -322,13 +336,13 @@ GET memswap
Get plugin stats:: Get plugin stats::
# curl http://localhost:61208/api/3/memswap # curl http://localhost:61208/api/3/memswap
{'free': 6210048000, {'free': 7994896384,
'percent': 23.2, 'percent': 1.1,
'sin': 8932937728, 'sin': 3284992,
'sout': 13442965504, 'sout': 88502272,
'time_since_update': 1, 'time_since_update': 1,
'total': 8082419712, 'total': 8082419712,
'used': 1872371712} 'used': 87523328}
Fields descriptions: Fields descriptions:
...@@ -352,6 +366,18 @@ Get plugin stats:: ...@@ -352,6 +366,18 @@ Get plugin stats::
# curl http://localhost:61208/api/3/network # curl http://localhost:61208/api/3/network
[{'alias': None, [{'alias': None,
'cumulative_cx': 10370393,
'cumulative_rx': 1511916,
'cumulative_tx': 8858477,
'cx': 0,
'interface_name': 'veth20bf375',
'is_up': True,
'key': 'interface_name',
'rx': 0,
'speed': 10485760000,
'time_since_update': 1,
'tx': 0},
{'alias': None,
'cumulative_cx': 0, 'cumulative_cx': 0,
'cumulative_rx': 0, 'cumulative_rx': 0,
'cumulative_tx': 0, 'cumulative_tx': 0,
...@@ -362,19 +388,7 @@ Get plugin stats:: ...@@ -362,19 +388,7 @@ Get plugin stats::
'rx': 0, 'rx': 0,
'speed': 0, 'speed': 0,
'time_since_update': 1, 'time_since_update': 1,
'tx': 0}, 'tx': 0}]
{'alias': None,
'cumulative_cx': 3817917382,
'cumulative_rx': 1908958691,
'cumulative_tx': 1908958691,
'cx': 200,
'interface_name': 'lo',
'is_up': True,
'key': 'interface_name',
'rx': 100,
'speed': 0,
'time_since_update': 1,
'tx': 100}]
Fields descriptions: Fields descriptions:
...@@ -391,31 +405,34 @@ Fields descriptions: ...@@ -391,31 +405,34 @@ Fields descriptions:
Get a specific field:: Get a specific field::
# curl http://localhost:61208/api/3/network/interface_name # curl http://localhost:61208/api/3/network/interface_name
{'interface_name': ['mpqemubr0-dummy', {'interface_name': ['veth20bf375',
'lo', 'mpqemubr0-dummy',
'mpqemubr0', 'mpqemubr0',
'tap-838a195875f', 'veth35385e9',
'br-119e6ee04e05',
'lo',
'docker0', 'docker0',
'br-87386b77b676',
'tap-838a195875f',
'wlp2s0', 'wlp2s0',
'br-119e6ee04e05', 'veth8f84d90',
'vboxnet0', 'veth041bfdd']}
'br-87386b77b676']}
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/network/interface_name/mpqemubr0-dummy # curl http://localhost:61208/api/3/network/interface_name/veth20bf375
{'mpqemubr0-dummy': [{'alias': None, {'veth20bf375': [{'alias': None,
'cumulative_cx': 0, 'cumulative_cx': 10370393,
'cumulative_rx': 0, 'cumulative_rx': 1511916,
'cumulative_tx': 0, 'cumulative_tx': 8858477,
'cx': 0, 'cx': 0,
'interface_name': 'mpqemubr0-dummy', 'interface_name': 'veth20bf375',
'is_up': False, 'is_up': True,
'key': 'interface_name', 'key': 'interface_name',
'rx': 0, 'rx': 0,
'speed': 0, 'speed': 10485760000,
'time_since_update': 1, 'time_since_update': 1,
'tx': 0}]} 'tx': 0}]}
GET now GET now
------- -------
...@@ -423,7 +440,7 @@ GET now ...@@ -423,7 +440,7 @@ GET now
Get plugin stats:: Get plugin stats::
# curl http://localhost:61208/api/3/now # curl http://localhost:61208/api/3/now
'2021-08-01 10:21:14 CEST' '2021-08-14 16:57:33 CEST'
GET percpu GET percpu
---------- ----------
...@@ -434,29 +451,29 @@ Get plugin stats:: ...@@ -434,29 +451,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': 82.8, 'idle': 37.3,
'iowait': 0.0, 'iowait': 0.7,
'irq': 0.0, 'irq': 0.0,
'key': 'cpu_number', 'key': 'cpu_number',
'nice': 0.0, 'nice': 0.0,
'softirq': 9.0, 'softirq': 0.0,
'steal': 0.0, 'steal': 0.0,
'system': 3.7, 'system': 2.6,
'total': 17.2, 'total': 62.7,
'user': 4.5}, 'user': 59.5},
{'cpu_number': 1, {'cpu_number': 1,
'guest': 0.0, 'guest': 0.0,
'guest_nice': 0.0, 'guest_nice': 0.0,
'idle': 84.6, 'idle': 54.6,
'iowait': 0.0, 'iowait': 2.0,
'irq': 0.0, 'irq': 0.0,
'key': 'cpu_number', 'key': 'cpu_number',
'nice': 0.0, 'nice': 0.0,
'softirq': 10.3, 'softirq': 0.0,
'steal': 0.0, 'steal': 0.0,
'system': 2.9, 'system': 2.6,
'total': 15.4, 'total': 45.4,
'user': 2.2}] 'user': 40.8}]
Get a specific field:: Get a specific field::
...@@ -475,7 +492,7 @@ Get plugin stats:: ...@@ -475,7 +492,7 @@ Get plugin stats::
'port': 0, 'port': 0,
'refresh': 30, 'refresh': 30,
'rtt_warning': None, 'rtt_warning': None,
'status': 0.01193, 'status': 0.011298,
'timeout': 3}] 'timeout': 3}]
Get a specific field:: Get a specific field::
...@@ -492,7 +509,7 @@ Get a specific item when field matchs the given value:: ...@@ -492,7 +509,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.01193, 'status': 0.011298,
'timeout': 3}]} 'timeout': 3}]}
GET processcount GET processcount
...@@ -501,12 +518,12 @@ GET processcount ...@@ -501,12 +518,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': 287, 'thread': 1444, 'total': 352} {'pid_max': 0, 'running': 1, 'sleeping': 274, 'thread': 1407, 'total': 337}
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': 352} {'total': 337}
GET processlist GET processlist
--------------- ---------------
...@@ -514,36 +531,50 @@ GET processlist ...@@ -514,36 +531,50 @@ GET processlist
Get plugin stats:: Get plugin stats::
# curl http://localhost:61208/api/3/processlist # curl http://localhost:61208/api/3/processlist
[{'cmdline': ['/home/nicolargo/dev/glances/venv/bin/python3.8', [{'cmdline': ['/usr/lib/firefox/firefox', '-new-window'],
'/home/nicolargo/.vscode/extensions/ms-python.python-2021.5.926500501/pythonFiles/run-jedi-language-server.py'],
'cpu_percent': 0.0, 'cpu_percent': 0.0,
'cpu_times': pcputimes(user=7134.33, system=375.42, children_user=0.0, children_system=0.0, iowait=16.66), 'cpu_times': pcputimes(user=1895.06, system=548.01, children_user=1331.84, children_system=203.91, iowait=1.48),
'gids': pgids(real=1000, effective=1000, saved=1000), 'gids': pgids(real=1000, effective=1000, saved=1000),
'io_counters': [766472192, 117370880, 0, 0, 0], 'io_counters': [555024384, 1994608640, 0, 0, 0],
'key': 'pid', 'key': 'pid',
'memory_info': pmem(rss=703184896, vms=946077696, shared=4890624, text=2846720, lib=0, data=725467136, dirty=0), 'memory_info': pmem(rss=559951872, vms=4650143744, shared=200867840, text=622592, lib=0, data=973697024, dirty=0),
'memory_percent': 8.958839415010894, 'memory_percent': 7.134034175857723,
'name': 'python3.8', 'name': 'firefox',
'nice': 0, 'nice': 0,
'num_threads': 4, 'num_threads': 120,
'pid': 2702806, 'pid': 4142,
'ppid': 2702621, 'ppid': 3391,
'status': 'S', 'status': 'S',
'time_since_update': 1, 'time_since_update': 1,
'username': 'nicolargo'}, 'username': 'nicolargo'},
{'cmdline': ['/usr/lib/firefox/firefox', '-new-window'], {'cmdline': ['/usr/lib/firefox/firefox',
'-contentproc',
'-childID',
'2',
'-isForBrowser',
'-prefsLen',
'96',
'-prefMapSize',
'250397',
'-parentBuildID',
'20210527174632',
'-appdir',
'/usr/lib/firefox/browser',
'4142',
'true',
'tab'],
'cpu_percent': 0.0, 'cpu_percent': 0.0,
'cpu_times': pcputimes(user=5259.34, system=1794.0, children_user=5340.38, children_system=916.29, iowait=3.07), 'cpu_times': pcputimes(user=317.95, system=66.8, children_user=0.0, children_system=0.0, iowait=0.09),
'gids': pgids(real=1000, effective=1000, saved=1000), 'gids': pgids(real=1000, effective=1000, saved=1000),
'io_counters': [2367696896, 6016606208, 0, 0, 0], 'io_counters': [16916480, 0, 0, 0, 0],
'key': 'pid', 'key': 'pid',
'memory_info': pmem(rss=485928960, vms=4738162688, shared=144166912, text=622592, lib=0, data=1136144384, dirty=0), 'memory_info': pmem(rss=454049792, vms=3319758848, shared=145993728, text=622592, lib=0, data=582402048, dirty=0),
'memory_percent': 6.190917274399551, 'memory_percent': 5.784794900496538,
'name': 'firefox', 'name': 'Web Content',
'nice': 0, 'nice': 0,
'num_threads': 125, 'num_threads': 30,
'pid': 2993020, 'pid': 4258,
'ppid': 8496, 'ppid': 4142,
'status': 'S', 'status': 'S',
'time_since_update': 1, 'time_since_update': 1,
'username': 'nicolargo'}] 'username': 'nicolargo'}]
...@@ -551,200 +582,194 @@ Get plugin stats:: ...@@ -551,200 +582,194 @@ Get plugin stats::
Get a specific field:: Get a specific field::
# curl http://localhost:61208/api/3/processlist/pid # curl http://localhost:61208/api/3/processlist/pid
{'pid': [2702806, {'pid': [4142,
2993020, 4258,
2702582, 4378,
2993144, 9692,
2993283, 4690,
9122, 3638,
2993375, 18293,
3146884, 9388,
42230, 11502,
3186280, 31464,
3176234, 9426,
2702621, 38222,
3186586, 27823,
3075417, 9330,
3131841, 9441,
2702553, 4280,
2702525,
744165,
3187433,
2993158,
2702653,
3244,
4497,
2702636,
3168367,
2791638,
2702815,
3187653,
2741015,
8639,
8654,
3169962,
2791637,
2702565,
2791665,
8540,
3167609,
3419,
2625397,
3178606,
2702789,
9696,
2598927,
2994159,
3154355,
28036,
8538,
1,
2739211,
9412,
1101,
2791760,
9880,
9791,
3166295,
9918,
2702662,
3166294,
9915,
9520,
10076,
1140,
9421,
9539,
9975,
8496,
2625601,
42244,
7479,
218114,
1264,
3141573,
3201,
3138286,
3153688,
1675998,
3131599,
2614935,
8553,
9911,
9608,
3074778,
2702529,
3074791,
9427,
3074785,
9962,
2702528,
9936,
2625324,
1099,
8546,
8594,
2625388,
3103956,
9910,
1636,
9073,
9432,
2625339,
3131609,
9820,
3131612,
2078532,
10009,
1316,
9957,
1137,
1141,
223473,
2625334,
9934,
9762,
3075380,
9596,
2625605,
1085,
9903,
8633,
10001,
44159,
2622728,
9929,
10045,
9453, 9453,
43602, 9359,
223504, 18645,
9925, 7272,
8575, 30528,
1093, 53256,
8623, 2217,
10017, 9474,
9953, 9542,
1115, 9378,
9877, 2297,
2625489, 3485,
8822, 2468,
8650, 3460,
169607, 9334,
9420, 9333,
2548721, 11646,
2525291, 5343,
1905447, 3159,
8672, 1162,
8614, 3211,
627089, 3905,
713820, 54247,
9010, 11685,
9941, 3735,
8995, 9233,
298444, 9711,
1122, 9231,
1110, 1319,
9016, 3402,
3187641, 1316,
43938, 4726,
9969, 3704,
8664, 3673,
1096, 3799,
3795,
3789,
3845,
3764,
3768,
351,
2439,
3793,
3697,
1140,
3676,
3829,
1150,
3400,
2251,
1308,
3791,
3623,
2236,
1022,
1,
1175,
3948,
51755,
23730,
3510,
2449,
1154,
1350,
3214,
3802,
3819,
3668,
3391,
23729,
3371,
1551,
1306,
1174,
3824,
3439,
3721,
30672,
1176,
1359,
30686,
53315,
36769,
3447,
7777,
1172,
3862,
3792,
11661,
3790,
3092,
3414,
3843,
3949,
1118,
3470,
2446,
3689,
3679,
383,
3426,
3672,
3826,
3821,
11621,
11480,
3476,
1145,
1138,
3788,
38268,
3456,
3718,
1169,
3601,
1023,
53321,
3812,
3483,
3807,
3853,
3432,
53324,
2447,
1159,
36746,
7281,
3405,
3452,
1157,
1132,
3693,
1146,
1131,
1021,
3616,
1177,
3606,
3395,
9536,
9294,
1430,
2059,
1135,
54233,
11452,
11440,
1209,
53327,
3063,
11427,
11465,
11595,
3077,
4551,
1119,
54246,
36394,
2097,
2271,
3580,
2275,
2269,
1215,
3115,
997,
373,
1134, 1134,
8586,
2879345,
2625337,
1168,
1001,
3131615,
2879435,
4504,
3170267,
1097,
1125,
9066,
2625021,
2625338,
3217,
1462,
8953,
2620923,
1086,
9512,
3187652,
3953,
3168425,
3229,
3225,
1310,
978,
1171,
370,
13314,
8498,
2, 2,
3, 3,
4, 4,
6,
9, 9,
10, 10,
11, 11,
...@@ -755,14 +780,17 @@ Get a specific field:: ...@@ -755,14 +780,17 @@ Get a specific field::
16, 16,
17, 17,
18, 18,
20,
21, 21,
22, 22,
23, 23,
24, 24,
26,
27, 27,
28, 28,
29, 29,
30, 30,
32,
33, 33,
34, 34,
35, 35,
...@@ -782,14 +810,14 @@ Get a specific field:: ...@@ -782,14 +810,14 @@ Get a specific field::
97, 97,
98, 98,
99, 99,
102,
103, 103,
105, 104,
106,
107, 107,
108, 108,
112, 113,
121, 122,
139, 138,
181, 181,
191, 191,
192, 192,
...@@ -799,137 +827,124 @@ Get a specific field:: ...@@ -799,137 +827,124 @@ Get a specific field::
196, 196,
197, 197,
198, 198,
200, 204,
201, 205,
206, 206,
207, 209,
238, 210,
288, 240,
289, 282,
309, 283,
360, 291,
364, 292,
390, 294,
439, 363,
450, 368,
451, 392,
452, 401,
453, 404,
513, 405,
514, 406,
531, 407,
842, 430,
843, 434,
844, 441,
845, 442,
846, 493,
847, 499,
848, 535,
849, 651,
850, 779,
851, 780,
852, 781,
853, 782,
1323, 783,
1527, 784,
1529, 785,
1531, 786,
1533, 787,
1534, 788,
1537, 789,
1538, 790,
1540, 900,
8648, 906,
11754, 908,
14346, 909,
45609, 910,
45610, 911,
45621, 912,
45622, 913,
45623, 915,
45624, 916,
45625, 930,
45626, 936,
217392, 939,
574771, 941,
1893153, 945,
2058173, 947,
2318240, 951,
2624916, 954,
2624918, 957,
2702007, 1360,
2717801, 1495,
2780261, 1496,
2816759, 1497,
2816957, 1498,
2817447, 1499,
2817525, 1500,
2817644, 1502,
2848355, 1504,
2848483, 2329,
2848744, 2357,
2891750, 3463,
2892014, 45464,
2926441, 49536,
2938027, 51408,
2939167, 51413,
2981539, 51424,
3043867, 51624,
3076088, 51645,
3076171, 51651,
3076588, 51699,
3143304, 51700,
3154246, 51705,
3166323, 52508,
3167277, 52509,
3167547, 52671,
3168934, 52784,
3169582, 53358,
3175884, 53530,
3178406, 53531,
3178495, 53532,
3178517, 53671,
3178523, 53718,
3184214, 53730]}
3184248,
3184379,
3186307,
3186426,
3186731,
3186815,
3187282,
3187290,
3187355,
3187356,
3187357,
3187475]}
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/2702806 # curl http://localhost:61208/api/3/processlist/pid/4142
{'2702806': [{'cmdline': ['/home/nicolargo/dev/glances/venv/bin/python3.8', {'4142': [{'cmdline': ['/usr/lib/firefox/firefox', '-new-window'],
'/home/nicolargo/.vscode/extensions/ms-python.python-2021.5.926500501/pythonFiles/run-jedi-language-server.py'], 'cpu_percent': 0.0,
'cpu_percent': 0.0, 'cpu_times': [1895.06, 548.01, 1331.84, 203.91, 1.48],
'cpu_times': [7134.33, 375.42, 0.0, 0.0, 16.66], 'gids': [1000, 1000, 1000],
'gids': [1000, 1000, 1000], 'io_counters': [555024384, 1994608640, 0, 0, 0],
'io_counters': [766472192, 117370880, 0, 0, 0], 'key': 'pid',
'key': 'pid', 'memory_info': [559951872,
'memory_info': [703184896, 4650143744,
946077696, 200867840,
4890624, 622592,
2846720, 0,
0, 973697024,
725467136, 0],
0], 'memory_percent': 7.134034175857723,
'memory_percent': 8.958839415010894, 'name': 'firefox',
'name': 'python3.8', 'nice': 0,
'nice': 0, 'num_threads': 120,
'num_threads': 4, 'pid': 4142,
'pid': 2702806, 'ppid': 3391,
'ppid': 2702621, 'status': 'S',
'status': 'S', 'time_since_update': 1,
'time_since_update': 1, 'username': 'nicolargo'}]}
'username': 'nicolargo'}]}
GET psutilversion GET psutilversion
----------------- -----------------
...@@ -945,69 +960,69 @@ GET quicklook ...@@ -945,69 +960,69 @@ GET quicklook
Get plugin stats:: Get plugin stats::
# curl http://localhost:61208/api/3/quicklook # curl http://localhost:61208/api/3/quicklook
{'cpu': 29.9, {'cpu': 34.2,
'cpu_hz': 2025000000.0, 'cpu_hz': 2025000000.0,
'cpu_hz_current': 1535935749.9999998, 'cpu_hz_current': 1676300749.9999998,
'cpu_name': 'Intel(R) Core(TM) i7-4500U CPU @ 1.80GH', 'cpu_name': 'Intel(R) Core(TM) i7-4500U CPU @ 1.80GHz',
'mem': 76.8, 'mem': 65.7,
'percpu': [{'cpu_number': 0, 'percpu': [{'cpu_number': 0,
'guest': 0.0, 'guest': 0.0,
'guest_nice': 0.0, 'guest_nice': 0.0,
'idle': 82.8, 'idle': 37.3,
'iowait': 0.0, 'iowait': 0.7,
'irq': 0.0, 'irq': 0.0,
'key': 'cpu_number', 'key': 'cpu_number',
'nice': 0.0, 'nice': 0.0,
'softirq': 9.0, 'softirq': 0.0,
'steal': 0.0, 'steal': 0.0,
'system': 3.7, 'system': 2.6,
'total': 17.2, 'total': 62.7,
'user': 4.5}, 'user': 59.5},
{'cpu_number': 1, {'cpu_number': 1,
'guest': 0.0, 'guest': 0.0,
'guest_nice': 0.0, 'guest_nice': 0.0,
'idle': 84.6, 'idle': 54.6,
'iowait': 0.0, 'iowait': 2.0,
'irq': 0.0, 'irq': 0.0,
'key': 'cpu_number', 'key': 'cpu_number',
'nice': 0.0, 'nice': 0.0,
'softirq': 10.3, 'softirq': 0.0,
'steal': 0.0, 'steal': 0.0,
'system': 2.9, 'system': 2.6,
'total': 15.4, 'total': 45.4,
'user': 2.2}, 'user': 40.8},
{'cpu_number': 2, {'cpu_number': 2,
'guest': 0.0, 'guest': 0.0,
'guest_nice': 0.0, 'guest_nice': 0.0,
'idle': 91.7, 'idle': 81.9,
'iowait': 0.0, 'iowait': 0.6,
'irq': 0.0, 'irq': 0.0,
'key': 'cpu_number', 'key': 'cpu_number',
'nice': 0.0, 'nice': 0.0,
'softirq': 0.0, 'softirq': 9.0,
'steal': 0.0, 'steal': 0.0,
'system': 0.8, 'system': 0.6,
'total': 8.3, 'total': 18.1,
'user': 7.4}, 'user': 7.8},
{'cpu_number': 3, {'cpu_number': 3,
'guest': 0.0, 'guest': 0.0,
'guest_nice': 0.0, 'guest_nice': 0.0,
'idle': 18.7, 'idle': 84.5,
'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': 5.0,
'steal': 0.0, 'steal': 0.0,
'system': 4.1, 'system': 5.0,
'total': 81.3, 'total': 15.5,
'user': 77.2}], 'user': 5.6}],
'swap': 23.2} 'swap': 1.1}
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': 29.9} {'cpu': 34.2}
GET sensors GET sensors
----------- -----------
...@@ -1064,7 +1079,7 @@ Get plugin stats:: ...@@ -1064,7 +1079,7 @@ Get plugin stats::
'hr_name': 'Ubuntu 20.04 64bit', 'hr_name': 'Ubuntu 20.04 64bit',
'linux_distro': 'Ubuntu 20.04', 'linux_distro': 'Ubuntu 20.04',
'os_name': 'Linux', 'os_name': 'Linux',
'os_version': '5.4.0-66-generic', 'os_version': '5.4.0-74-generic',
'platform': '64bit'} 'platform': '64bit'}
Get a specific field:: Get a specific field::
...@@ -1078,7 +1093,7 @@ GET uptime ...@@ -1078,7 +1093,7 @@ GET uptime
Get plugin stats:: Get plugin stats::
# curl http://localhost:61208/api/3/uptime # curl http://localhost:61208/api/3/uptime
{'seconds': 9158957} {'seconds': 604292}
GET all stats GET all stats
------------- -------------
...@@ -1094,33 +1109,33 @@ GET stats history ...@@ -1094,33 +1109,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': [['2021-08-01T10:21:14.473006', 3.4], {'system': [['2021-08-14T16:57:33.339311', 3.5],
['2021-08-01T10:21:15.540337', 3.4], ['2021-08-14T16:57:34.452028', 3.5],
['2021-08-01T10:21:16.687398', 2.6]], ['2021-08-14T16:57:35.592317', 3.5]],
'user': [['2021-08-01T10:21:14.472986', 19.1], 'user': [['2021-08-14T16:57:33.339295', 26.8],
['2021-08-01T10:21:15.540331', 19.1], ['2021-08-14T16:57:34.452022', 26.8],
['2021-08-01T10:21:16.687391', 3.9]]} ['2021-08-14T16:57:35.592311', 6.9]]}
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': [['2021-08-01T10:21:15.540337', 3.4], {'system': [['2021-08-14T16:57:34.452028', 3.5],
['2021-08-01T10:21:16.687398', 2.6]], ['2021-08-14T16:57:35.592317', 3.5]],
'user': [['2021-08-01T10:21:15.540331', 19.1], 'user': [['2021-08-14T16:57:34.452022', 26.8],
['2021-08-01T10:21:16.687391', 3.9]]} ['2021-08-14T16:57:35.592311', 6.9]]}
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': [['2021-08-01T10:21:14.473006', 3.4], {'system': [['2021-08-14T16:57:33.339311', 3.5],
['2021-08-01T10:21:15.540337', 3.4], ['2021-08-14T16:57:34.452028', 3.5],
['2021-08-01T10:21:16.687398', 2.6]]} ['2021-08-14T16:57:35.592317', 3.5]]}
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': [['2021-08-01T10:21:15.540337', 3.4], {'system': [['2021-08-14T16:57:34.452028', 3.5],
['2021-08-01T10:21:16.687398', 2.6]]} ['2021-08-14T16:57:35.592317', 3.5]]}
GET limits (used for thresholds) GET limits (used for thresholds)
-------------------------------- --------------------------------
......
.\" Man page generated from reStructuredText. .\" Man page generated from reStructuredText.
. .
.TH "GLANCES" "1" "Aug 01, 2021" "3.2.3_beta1" "Glances" .TH "GLANCES" "1" "Aug 14, 2021" "3.2.3" "Glances"
.SH NAME .SH NAME
glances \- An eye on your system glances \- An eye on your system
. .
......
...@@ -29,7 +29,7 @@ import sys ...@@ -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.3_beta1' __version__ = '3.2.3'
__author__ = 'Nicolas Hennion <nicolas@nicolargo.com>' __author__ = 'Nicolas Hennion <nicolas@nicolargo.com>'
__license__ = 'LGPLv3' __license__ = 'LGPLv3'
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册