Fix typos and make grammatical and stylistic edits in project documentation
This commit is contained in:
Nicolas Hennion 2023-12-10 20:00:53 +01:00 committed by GitHub
commit c82a5a7098
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
10 changed files with 410 additions and 502 deletions

View File

@ -78,6 +78,25 @@ Get the plugins list::
"uptime", "uptime",
"wifi"] "wifi"]
GET alert
---------
Get plugin stats::
# curl http://localhost:61208/api/3/alert
[[1702229920.0,
-1,
"WARNING",
"MEM",
77.66056060791016,
77.66056060791016,
77.66056060791016,
77.66056060791016,
1,
[],
"",
"memory_percent"]]
GET amps GET amps
-------- --------
@ -92,7 +111,7 @@ Get plugin stats::
"refresh": 3.0, "refresh": 3.0,
"regex": True, "regex": True,
"result": None, "result": None,
"timer": 0.16420912742614746}, "timer": 0.08340811729431152},
{"count": 0, {"count": 0,
"countmax": 20.0, "countmax": 20.0,
"countmin": None, "countmin": None,
@ -101,7 +120,7 @@ Get plugin stats::
"refresh": 3.0, "refresh": 3.0,
"regex": True, "regex": True,
"result": None, "result": None,
"timer": 0.16410183906555176}] "timer": 0.08331799507141113}]
Get a specific field:: Get a specific field::
@ -119,7 +138,7 @@ Get a specific item when field matches the given value::
"refresh": 3.0, "refresh": 3.0,
"regex": True, "regex": True,
"result": None, "result": None,
"timer": 0.16420912742614746}]} "timer": 0.08340811729431152}]}
GET connections GET connections
--------------- ---------------
@ -134,41 +153,13 @@ Get a specific field::
# curl http://localhost:61208/api/3/connections/net_connections_enabled # curl http://localhost:61208/api/3/connections/net_connections_enabled
{"net_connections_enabled": True} {"net_connections_enabled": True}
GET containers
--------------
Get plugin stats::
# curl http://localhost:61208/api/3/containers
{"containers": [{"Command": ["/portainer"],
"Created": "2022-10-29T14:59:10.266701439Z",
"Id": "3abd51c615968482d9ccff5afc629f267f6dda113ed68b75b432615fae3b49fb",
"Image": ["portainer/portainer-ce:2.9.3"],
"Status": "running",
"Uptime": "6 mins",
"cpu": {"total": 0.0},
"cpu_percent": 0.0,
"engine": "docker",
"io": {},
"io_r": None,
"io_w": None,
"key": "name",
"memory": {},
"memory_usage": None,
"name": "portainer",
"network": {},
"network_rx": None,
"network_tx": None}],
"version": {},
"version_podman": {}}
GET core GET core
-------- --------
Get plugin stats:: Get plugin stats::
# curl http://localhost:61208/api/3/core # curl http://localhost:61208/api/3/core
{"log": 4, "phys": 2} {"log": 8, "phys": 8}
Fields descriptions: Fields descriptions:
@ -178,7 +169,7 @@ Fields descriptions:
Get a specific field:: Get a specific field::
# curl http://localhost:61208/api/3/core/phys # curl http://localhost:61208/api/3/core/phys
{"phys": 2} {"phys": 8}
GET cpu GET cpu
------- -------
@ -186,23 +177,17 @@ GET cpu
Get plugin stats:: Get plugin stats::
# curl http://localhost:61208/api/3/cpu # curl http://localhost:61208/api/3/cpu
{"cpucore": 4, {"cpucore": 8,
"ctx_switches": 0, "ctx_switches": 0,
"guest": 0.0, "idle": 59.9,
"guest_nice": 0.0,
"idle": 73.9,
"interrupts": 0, "interrupts": 0,
"iowait": 0.9,
"irq": 0.0,
"nice": 0.0, "nice": 0.0,
"soft_interrupts": 0, "soft_interrupts": 0,
"softirq": 0.0,
"steal": 0.0,
"syscalls": 0, "syscalls": 0,
"system": 4.5, "system": 19.0,
"time_since_update": 1, "time_since_update": 1,
"total": 25.2, "total": 39.7,
"user": 20.7} "user": 21.1}
Fields descriptions: Fields descriptions:
@ -225,7 +210,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": 25.2} {"total": 39.7}
GET diskio GET diskio
---------- ----------
@ -233,14 +218,7 @@ GET diskio
Get plugin stats:: Get plugin stats::
# curl http://localhost:61208/api/3/diskio # curl http://localhost:61208/api/3/diskio
[{"disk_name": "sda", [{"disk_name": "disk0",
"key": "disk_name",
"read_bytes": 0,
"read_count": 0,
"time_since_update": 1,
"write_bytes": 0,
"write_count": 0},
{"disk_name": "sda1",
"key": "disk_name", "key": "disk_name",
"read_bytes": 0, "read_bytes": 0,
"read_count": 0, "read_count": 0,
@ -251,12 +229,12 @@ Get plugin stats::
Get a specific field:: Get a specific field::
# curl http://localhost:61208/api/3/diskio/disk_name # curl http://localhost:61208/api/3/diskio/disk_name
{"disk_name": ["sda", "sda1", "sda2", "sda5", "dm-0", "dm-1", "sdb", "sdb1"]} {"disk_name": ["disk0"]}
Get a specific item when field matches the given value:: Get a specific item when field matches the given value::
# curl http://localhost:61208/api/3/diskio/disk_name/sda # curl http://localhost:61208/api/3/diskio/disk_name/disk0
{"sda": [{"disk_name": "sda", {"disk0": [{"disk_name": "disk0",
"key": "disk_name", "key": "disk_name",
"read_bytes": 0, "read_bytes": 0,
"read_count": 0, "read_count": 0,
@ -270,57 +248,46 @@ GET fs
Get plugin stats:: 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/disk3s1s1",
"free": 30865014784, "free": 197418139648,
"fs_type": "ext4", "fs_type": "apfs",
"key": "mnt_point", "key": "mnt_point",
"mnt_point": "/", "mnt_point": "/",
"percent": 86.6, "percent": 4.8,
"size": 243334156288, "size": 494384795648,
"used": 200081686528}, "used": 9903136768},
{"device_name": "zsfpool", {"device_name": "/dev/disk3s6",
"free": 41811968, "free": 197418139648,
"fs_type": "zfs", "fs_type": "apfs",
"key": "mnt_point", "key": "mnt_point",
"mnt_point": "/zsfpool", "mnt_point": "/System/Volumes/VM",
"percent": 0.3, "percent": 0.0,
"size": 41943040, "size": 494384795648,
"used": 131072}] "used": 20480}]
Get a specific field:: Get a specific field::
# curl http://localhost:61208/api/3/fs/mnt_point # curl http://localhost:61208/api/3/fs/mnt_point
{"mnt_point": ["/", "/zsfpool", "/var/snap/firefox/common/host-hunspell"]} {"mnt_point": ["/",
"/System/Volumes/VM",
"/System/Volumes/Preboot",
"/System/Volumes/Update",
"/System/Volumes/xarts",
"/System/Volumes/iSCPreboot",
"/System/Volumes/Hardware",
"/System/Volumes/Data"]}
Get a specific item when field matches the given value:: Get a specific item when field matches 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/disk3s1s1",
"free": 30865014784, "free": 197418139648,
"fs_type": "ext4", "fs_type": "apfs",
"key": "mnt_point", "key": "mnt_point",
"mnt_point": "/", "mnt_point": "/",
"percent": 86.6, "percent": 4.8,
"size": 243334156288, "size": 494384795648,
"used": 200081686528}]} "used": 9903136768}]}
GET ip
------
Get plugin stats::
# curl http://localhost:61208/api/3/ip
{"address": "192.168.1.14",
"gateway": "192.168.1.1",
"mask": "255.255.255.0",
"mask_cidr": 24,
"public_address": "92.151.148.66",
"public_info_human": ""}
Get a specific field::
# curl http://localhost:61208/api/3/ip/gateway
{"gateway": "192.168.1.1"}
GET load GET load
-------- --------
@ -328,10 +295,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, {"cpucore": 8,
"min1": 1.16650390625, "min1": 6.21044921875,
"min15": 1.2255859375, "min15": 6.52490234375,
"min5": 1.3173828125} "min5": 6.1923828125}
Fields descriptions: Fields descriptions:
@ -343,7 +310,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.16650390625} {"min1": 6.21044921875}
GET mem GET mem
------- -------
@ -351,16 +318,14 @@ GET mem
Get plugin stats:: Get plugin stats::
# curl http://localhost:61208/api/3/mem # curl http://localhost:61208/api/3/mem
{"active": 2796564480, {"active": 3810230272,
"available": 2493652992, "available": 3837886464,
"buffers": 401641472, "free": 3837886464,
"cached": 2819747840, "inactive": 3775741952,
"free": 2493652992, "percent": 77.7,
"inactive": 3942461440, "total": 17179869184,
"percent": 68.1, "used": 13341982720,
"shared": 551772160, "wired": 2604072960}
"total": 7823585280,
"used": 5329932288}
Fields descriptions: Fields descriptions:
@ -379,7 +344,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": 7823585280} {"total": 17179869184}
GET memswap GET memswap
----------- -----------
@ -387,13 +352,13 @@ GET memswap
Get plugin stats:: Get plugin stats::
# curl http://localhost:61208/api/3/memswap # curl http://localhost:61208/api/3/memswap
{"free": 5963968512, {"free": 0,
"percent": 26.2, "percent": 0.0,
"sin": 513867776, "sin": 113365762048,
"sout": 2566475776, "sout": 7638499328,
"time_since_update": 1, "time_since_update": 1,
"total": 8082419712, "total": 0,
"used": 2118451200} "used": 0}
Fields descriptions: Fields descriptions:
@ -408,7 +373,7 @@ Fields descriptions:
Get a specific field:: Get a specific field::
# curl http://localhost:61208/api/3/memswap/total # curl http://localhost:61208/api/3/memswap/total
{"total": 8082419712} {"total": 0}
GET network GET network
----------- -----------
@ -417,29 +382,29 @@ Get plugin stats::
# curl http://localhost:61208/api/3/network # curl http://localhost:61208/api/3/network
[{"alias": None, [{"alias": None,
"cumulative_cx": 31635408, "cumulative_cx": 720357822,
"cumulative_rx": 15817704, "cumulative_rx": 360178911,
"cumulative_tx": 15817704, "cumulative_tx": 360178911,
"cx": 0, "cx": 208,
"interface_name": "lo", "interface_name": "lo0",
"is_up": True, "is_up": True,
"key": "interface_name", "key": "interface_name",
"rx": 0, "rx": 104,
"speed": 0, "speed": 0,
"time_since_update": 1, "time_since_update": 1,
"tx": 0}, "tx": 104},
{"alias": None, {"alias": None,
"cumulative_cx": 23666156944, "cumulative_cx": 0,
"cumulative_rx": 23525021295, "cumulative_rx": 0,
"cumulative_tx": 141135649, "cumulative_tx": 0,
"cx": 126, "cx": 0,
"interface_name": "wlp2s0", "interface_name": "gif0",
"is_up": True, "is_up": False,
"key": "interface_name", "key": "interface_name",
"rx": 0, "rx": 0,
"speed": 0, "speed": 0,
"time_since_update": 1, "time_since_update": 1,
"tx": 126}] "tx": 0}]
Fields descriptions: Fields descriptions:
@ -458,29 +423,47 @@ 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": ["lo", {"interface_name": ["lo0",
"wlp2s0", "gif0",
"br_grafana", "stf0",
"br-40875d2e2716", "anpi2",
"docker0", "anpi1",
"mpqemubr0", "anpi0",
"vethe1b1351"]} "en4",
"en5",
"en6",
"en1",
"en2",
"en3",
"bridge0",
"ap1",
"en0",
"awdl0",
"llw0",
"utun0",
"utun1",
"utun2",
"utun3",
"utun4",
"utun5",
"utun6",
"utun7"]}
Get a specific item when field matches the given value:: Get a specific item when field matches the given value::
# curl http://localhost:61208/api/3/network/interface_name/lo # curl http://localhost:61208/api/3/network/interface_name/lo0
{"lo": [{"alias": None, {"lo0": [{"alias": None,
"cumulative_cx": 31635408, "cumulative_cx": 720357822,
"cumulative_rx": 15817704, "cumulative_rx": 360178911,
"cumulative_tx": 15817704, "cumulative_tx": 360178911,
"cx": 0, "cx": 208,
"interface_name": "lo", "interface_name": "lo0",
"is_up": True, "is_up": True,
"key": "interface_name", "key": "interface_name",
"rx": 0, "rx": 104,
"speed": 0, "speed": 0,
"time_since_update": 1, "time_since_update": 1,
"tx": 0}]} "tx": 104}]}
GET now GET now
------- -------
@ -488,7 +471,7 @@ GET now
Get plugin stats:: Get plugin stats::
# curl http://localhost:61208/api/3/now # curl http://localhost:61208/api/3/now
"2023-11-01 08:51:27 CET" "2023-12-10 21:38:40 +04"
GET percpu GET percpu
---------- ----------
@ -497,68 +480,24 @@ Get plugin stats::
# curl http://localhost:61208/api/3/percpu # curl http://localhost:61208/api/3/percpu
[{"cpu_number": 0, [{"cpu_number": 0,
"guest": 0.0, "idle": 1.0,
"guest_nice": 0.0,
"idle": 16.0,
"iowait": 0.0,
"irq": 0.0,
"key": "cpu_number", "key": "cpu_number",
"nice": 0.0, "nice": 0.0,
"softirq": 0.0, "system": 6.0,
"steal": 0.0, "total": 99.0,
"system": 2.0, "user": 10.0},
"total": 84.0,
"user": 9.0},
{"cpu_number": 1, {"cpu_number": 1,
"guest": 0.0, "idle": 1.0,
"guest_nice": 0.0,
"idle": 15.0,
"iowait": 0.0,
"irq": 0.0,
"key": "cpu_number", "key": "cpu_number",
"nice": 0.0, "nice": 0.0,
"softirq": 0.0, "system": 6.0,
"steal": 0.0, "total": 99.0,
"system": 1.0, "user": 10.0}]
"total": 85.0,
"user": 13.0}]
Get a specific field:: Get a specific field::
# curl http://localhost:61208/api/3/percpu/cpu_number # curl http://localhost:61208/api/3/percpu/cpu_number
{"cpu_number": [0, 1, 2, 3]} {"cpu_number": [0, 1, 2, 3, 4, 5, 6, 7]}
GET ports
---------
Get plugin stats::
# curl http://localhost:61208/api/3/ports
[{"description": "DefaultGateway",
"host": "192.168.1.1",
"indice": "port_0",
"port": 0,
"refresh": 30,
"rtt_warning": None,
"status": 0.01277,
"timeout": 3}]
Get a specific field::
# curl http://localhost:61208/api/3/ports/host
{"host": ["192.168.1.1"]}
Get a specific item when field matches the given value::
# curl http://localhost:61208/api/3/ports/host/192.168.1.1
{"192.168.1.1": [{"description": "DefaultGateway",
"host": "192.168.1.1",
"indice": "port_0",
"port": 0,
"refresh": 30,
"rtt_warning": None,
"status": 0.01277,
"timeout": 3}]}
GET processcount GET processcount
---------------- ----------------
@ -566,12 +505,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": 314, "thread": 1662, "total": 386} {"pid_max": 0, "running": 540, "sleeping": 0, "thread": 2309, "total": 540}
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": 386} {"total": 540}
GET psutilversion GET psutilversion
----------------- -----------------
@ -579,7 +518,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, 5] [5, 9, 6]
GET quicklook GET quicklook
------------- -------------
@ -587,69 +526,73 @@ GET quicklook
Get plugin stats:: Get plugin stats::
# curl http://localhost:61208/api/3/quicklook # curl http://localhost:61208/api/3/quicklook
{"cpu": 25.2, {"cpu": 39.7,
"cpu_hz": 3000000000.0, "cpu_hz": None,
"cpu_hz_current": 2844080000.0, "cpu_hz_current": None,
"cpu_name": "Intel(R) Core(TM) i7-4500U CPU @ 1.80GHz", "cpu_name": "CPU",
"mem": 68.1, "mem": 77.6,
"percpu": [{"cpu_number": 0, "percpu": [{"cpu_number": 0,
"guest": 0.0, "idle": 1.0,
"guest_nice": 0.0,
"idle": 16.0,
"iowait": 0.0,
"irq": 0.0,
"key": "cpu_number", "key": "cpu_number",
"nice": 0.0, "nice": 0.0,
"softirq": 0.0, "system": 6.0,
"steal": 0.0, "total": 99.0,
"system": 2.0, "user": 10.0},
"total": 84.0,
"user": 9.0},
{"cpu_number": 1, {"cpu_number": 1,
"guest": 0.0, "idle": 1.0,
"guest_nice": 0.0,
"idle": 15.0,
"iowait": 0.0,
"irq": 0.0,
"key": "cpu_number", "key": "cpu_number",
"nice": 0.0, "nice": 0.0,
"softirq": 0.0, "system": 6.0,
"steal": 0.0, "total": 99.0,
"system": 1.0, "user": 10.0},
"total": 85.0,
"user": 13.0},
{"cpu_number": 2, {"cpu_number": 2,
"guest": 0.0, "idle": 12.0,
"guest_nice": 0.0,
"idle": 26.0,
"iowait": 0.0,
"irq": 0.0,
"key": "cpu_number", "key": "cpu_number",
"nice": 0.0, "nice": 0.0,
"softirq": 0.0, "system": 3.0,
"steal": 0.0, "total": 88.0,
"system": 1.0, "user": 2.0},
"total": 74.0,
"user": 1.0},
{"cpu_number": 3, {"cpu_number": 3,
"guest": 0.0, "idle": 8.0,
"guest_nice": 0.0,
"idle": 26.0,
"iowait": 0.0,
"irq": 0.0,
"key": "cpu_number", "key": "cpu_number",
"nice": 0.0, "nice": 0.0,
"softirq": 0.0, "system": 4.0,
"steal": 0.0, "total": 92.0,
"system": 1.0, "user": 5.0},
"total": 74.0, {"cpu_number": 4,
"user": 1.0}], "idle": 14.0,
"swap": 26.2} "key": "cpu_number",
"nice": 0.0,
"system": 2.0,
"total": 86.0,
"user": 3.0},
{"cpu_number": 5,
"idle": 15.0,
"key": "cpu_number",
"nice": 0.0,
"system": 4.0,
"total": 85.0,
"user": 1.0},
{"cpu_number": 6,
"idle": 17.0,
"key": "cpu_number",
"nice": 0.0,
"system": 2.0,
"total": 83.0,
"user": 0.0},
{"cpu_number": 7,
"idle": 19.0,
"key": "cpu_number",
"nice": 0.0,
"system": 0.0,
"total": 81.0,
"user": 0.0}],
"swap": 0.0}
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": 25.2} {"cpu": 39.7}
GET sensors GET sensors
----------- -----------
@ -657,44 +600,27 @@ GET sensors
Get plugin stats:: Get plugin stats::
# curl http://localhost:61208/api/3/sensors # curl http://localhost:61208/api/3/sensors
[{"critical": 105, [{"key": "label",
"key": "label", "label": "Battery",
"label": "acpitz 0", "status": "Charging",
"type": "temperature_core", "type": "battery",
"unit": "C", "unit": "%",
"value": 27, "value": 80}]
"warning": 105},
{"critical": 105,
"key": "label",
"label": "acpitz 1",
"type": "temperature_core",
"unit": "C",
"value": 29,
"warning": 105}]
Get a specific field:: Get a specific field::
# curl http://localhost:61208/api/3/sensors/label # curl http://localhost:61208/api/3/sensors/label
{"label": ["acpitz 0", {"label": ["Battery"]}
"acpitz 1",
"Package id 0",
"Core 0",
"Core 1",
"CPU",
"Ambient",
"SODIMM",
"BAT BAT0"]}
Get a specific item when field matches the given value:: Get a specific item when field matches the given value::
# curl http://localhost:61208/api/3/sensors/label/acpitz 0 # curl http://localhost:61208/api/3/sensors/label/Battery
{"acpitz 0": [{"critical": 105, {"Battery": [{"key": "label",
"key": "label", "label": "Battery",
"label": "acpitz 0", "status": "Charging",
"type": "temperature_core", "type": "battery",
"unit": "C", "unit": "%",
"value": 27, "value": 80}]}
"warning": 105}]}
GET system GET system
---------- ----------
@ -702,17 +628,16 @@ GET system
Get plugin stats:: Get plugin stats::
# curl http://localhost:61208/api/3/system # curl http://localhost:61208/api/3/system
{"hostname": "XPS13-9333", {"hostname": "Georgiis-MacBook-Pro.local",
"hr_name": "Ubuntu 22.04 64bit", "hr_name": "Darwin 14.1.2 64bit",
"linux_distro": "Ubuntu 22.04", "os_name": "Darwin",
"os_name": "Linux", "os_version": "14.1.2",
"os_version": "5.15.0-86-generic",
"platform": "64bit"} "platform": "64bit"}
Get a specific field:: Get a specific field::
# curl http://localhost:61208/api/3/system/os_name # curl http://localhost:61208/api/3/system/os_name
{"os_name": "Linux"} {"os_name": "Darwin"}
GET uptime GET uptime
---------- ----------
@ -720,7 +645,7 @@ GET uptime
Get plugin stats:: Get plugin stats::
# curl http://localhost:61208/api/3/uptime # curl http://localhost:61208/api/3/uptime
"10 days, 23:38:54" "2 days, 21:58:56"
GET all stats GET all stats
------------- -------------
@ -736,58 +661,36 @@ GET top n items of a specific plugin
Get top 2 processes of the processlist plugin:: Get top 2 processes of the processlist plugin::
# curl http://localhost:61208/api/3/processlist/top/2 # curl http://localhost:61208/api/3/processlist/top/2
[{"cmdline": ["/snap/firefox/3206/usr/lib/firefox/firefox", [{"cmdline": ["/System/Library/Frameworks/WebKit.framework/Versions/A/XPCServices/com.apple.WebKit.WebContent.xpc/Contents/MacOS/com.apple.WebKit.WebContent"],
"-contentproc",
"-childID",
"2",
"-isForBrowser",
"-prefsLen",
"35837",
"-prefMapSize",
"231968",
"-jsInitLen",
"234236",
"-parentBuildID",
"20230928054334",
"-greomni",
"/snap/firefox/3206/usr/lib/firefox/omni.ja",
"-appomni",
"/snap/firefox/3206/usr/lib/firefox/browser/omni.ja",
"-appDir",
"/snap/firefox/3206/usr/lib/firefox/browser",
"{e8cdf5ea-b126-4cf3-8a2c-4ecf8bfa42cb}",
"6779",
"true",
"tab"],
"cpu_percent": 0.0, "cpu_percent": 0.0,
"cpu_times": pcputimes(user=223.59, system=25.59, children_user=0.0, children_system=0.0, iowait=0.0), "cpu_times": pcputimes(user=1439.267815424, system=153.321242624, children_user=0.0, children_system=0.0),
"gids": pgids(real=1000, effective=1000, saved=1000), "gids": puids(real=20, effective=20, saved=20),
"io_counters": [159959040, 0, 0, 0, 0], "io_counters": [0, 0, 0, 0, 0],
"key": "pid", "key": "pid",
"memory_info": pmem(rss=512262144, vms=3362086912, shared=29282304, text=643072, lib=0, data=803278848, dirty=0), "memory_info": pmem(rss=671449088, vms=512469778432, pfaults=8159047, pageins=797),
"memory_percent": 6.547664857818231, "memory_percent": 3.9083480834960938,
"name": "WebExtensions", "name": "com.apple.WebKit.WebContent",
"nice": 0, "nice": 0,
"num_threads": 20, "num_threads": 7,
"pid": 7049, "pid": 23116,
"status": "S", "status": "R",
"time_since_update": 1, "time_since_update": 1,
"username": "nicolargo"}, "username": "georgiy"},
{"cmdline": ["/snap/firefox/3206/usr/lib/firefox/firefox"], {"cmdline": ["/System/Volumes/Preboot/Cryptexes/App/System/Applications/Safari.app/Contents/MacOS/Safari"],
"cpu_percent": 0.0, "cpu_percent": 0.0,
"cpu_times": pcputimes(user=2099.05, system=541.02, children_user=748.27, children_system=70.57, iowait=0.0), "cpu_times": pcputimes(user=3313.558355968, system=1054.28484096, children_user=0.0, children_system=0.0),
"gids": pgids(real=1000, effective=1000, saved=1000), "gids": puids(real=20, effective=20, saved=20),
"io_counters": [19097014272, 22883790848, 0, 0, 0], "io_counters": [0, 0, 0, 0, 0],
"key": "pid", "key": "pid",
"memory_info": pmem(rss=428056576, vms=13759758336, shared=111906816, text=643072, lib=0, data=1674182656, dirty=0), "memory_info": pmem(rss=342081536, vms=428145426432, pfaults=9564269, pageins=10950),
"memory_percent": 5.471360772333781, "memory_percent": 1.9911766052246094,
"name": "firefox", "name": "Safari",
"nice": 0, "nice": 0,
"num_threads": 183, "num_threads": 14,
"pid": 6779, "pid": 2025,
"status": "S", "status": "R",
"time_since_update": 1, "time_since_update": 1,
"username": "nicolargo"}] "username": "georgiy"}]
Note: Only work for plugin with a list of items Note: Only work for plugin with a list of items
@ -797,34 +700,34 @@ 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": [["2023-11-01T08:51:29.392317", 4.5], {"system": [["2023-12-10T21:38:41.146559", 19.0],
["2023-11-01T08:51:30.420589", 1.6], ["2023-12-10T21:38:42.182581", 12.1],
["2023-11-01T08:51:31.542866", 1.6]], ["2023-12-10T21:38:43.259730", 12.1]],
"user": [["2023-11-01T08:51:29.392306", 20.7], "user": [["2023-12-10T21:38:41.146554", 21.1],
["2023-11-01T08:51:30.420582", 9.5], ["2023-12-10T21:38:42.182578", 20.1],
["2023-11-01T08:51:31.542854", 9.5]]} ["2023-12-10T21:38:43.259727", 20.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": [["2023-11-01T08:51:30.420589", 1.6], {"system": [["2023-12-10T21:38:42.182581", 12.1],
["2023-11-01T08:51:31.542866", 1.6]], ["2023-12-10T21:38:43.259730", 12.1]],
"user": [["2023-11-01T08:51:30.420582", 9.5], "user": [["2023-12-10T21:38:42.182578", 20.1],
["2023-11-01T08:51:31.542854", 9.5]]} ["2023-12-10T21:38:43.259727", 20.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": [["2023-11-01T08:51:27.776605", 4.5], {"system": [["2023-12-10T21:38:40.083920", 19.0],
["2023-11-01T08:51:29.392317", 4.5], ["2023-12-10T21:38:41.146559", 19.0],
["2023-11-01T08:51:30.420589", 1.6], ["2023-12-10T21:38:42.182581", 12.1],
["2023-11-01T08:51:31.542866", 1.6]]} ["2023-12-10T21:38:43.259730", 12.1]]}
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": [["2023-11-01T08:51:30.420589", 1.6], {"system": [["2023-12-10T21:38:42.182581", 12.1],
["2023-11-01T08:51:31.542866", 1.6]]} ["2023-12-10T21:38:43.259730", 12.1]]}
GET limits (used for thresholds) GET limits (used for thresholds)
-------------------------------- --------------------------------
@ -839,13 +742,13 @@ All limits/thresholds::
"containers_max_name_size": 20.0, "containers_max_name_size": 20.0,
"history_size": 1200.0}, "history_size": 1200.0},
"core": {"history_size": 1200.0}, "core": {"history_size": 1200.0},
"cpu": {"cpu_ctx_switches_careful": 160000.0, "cpu": {"cpu_ctx_switches_careful": 320000.0,
"cpu_ctx_switches_critical": 200000.0, "cpu_ctx_switches_critical": 400000.0,
"cpu_ctx_switches_warning": 180000.0, "cpu_ctx_switches_warning": 360000.0,
"cpu_disable": ["False"], "cpu_disable": ["False"],
"cpu_iowait_careful": 20.0, "cpu_iowait_careful": 10.0,
"cpu_iowait_critical": 25.0, "cpu_iowait_critical": 12.5,
"cpu_iowait_warning": 22.5, "cpu_iowait_warning": 11.25,
"cpu_steal_careful": 50.0, "cpu_steal_careful": 50.0,
"cpu_steal_critical": 90.0, "cpu_steal_critical": 90.0,
"cpu_steal_warning": 70.0, "cpu_steal_warning": 70.0,
@ -1015,13 +918,13 @@ All limits/thresholds::
Limits/thresholds for the cpu plugin:: Limits/thresholds for the cpu plugin::
# curl http://localhost:61208/api/3/cpu/limits # curl http://localhost:61208/api/3/cpu/limits
{"cpu_ctx_switches_careful": 160000.0, {"cpu_ctx_switches_careful": 320000.0,
"cpu_ctx_switches_critical": 200000.0, "cpu_ctx_switches_critical": 400000.0,
"cpu_ctx_switches_warning": 180000.0, "cpu_ctx_switches_warning": 360000.0,
"cpu_disable": ["False"], "cpu_disable": ["False"],
"cpu_iowait_careful": 20.0, "cpu_iowait_careful": 10.0,
"cpu_iowait_critical": 25.0, "cpu_iowait_critical": 12.5,
"cpu_iowait_warning": 22.5, "cpu_iowait_warning": 11.25,
"cpu_steal_careful": 50.0, "cpu_steal_careful": 50.0,
"cpu_steal_critical": 90.0, "cpu_steal_critical": 90.0,
"cpu_steal_warning": 70.0, "cpu_steal_warning": 70.0,

View File

@ -12,7 +12,7 @@ Command-Line Options
.. option:: -V, --version .. option:: -V, --version
show program's version number and exit show the program's version number and exit
.. option:: -d, --debug .. option:: -d, --debug
@ -32,19 +32,19 @@ Command-Line Options
.. option:: --disable-plugin PLUGIN .. option:: --disable-plugin PLUGIN
disable PLUGIN (comma separated list) disable PLUGIN (comma-separated list)
.. option:: --enable-plugin PLUGIN .. option:: --enable-plugin PLUGIN
enable PLUGIN (comma separated list) enable PLUGIN (comma-separated list)
.. option:: --stdout PLUGINS_STATS .. option:: --stdout PLUGINS_STATS
display stats to stdout (comma separated list of plugins/plugins.attribute) display stats to stdout (comma-separated list of plugins/plugins.attribute)
.. option:: --export EXPORT .. option:: --export EXPORT
enable EXPORT module (comma separated list) enable EXPORT module (comma-separated list)
.. option:: --export-csv-file EXPORT_CSV_FILE .. option:: --export-csv-file EXPORT_CSV_FILE
@ -64,7 +64,7 @@ Command-Line Options
.. option:: --light, --enable-light .. option:: --light, --enable-light
light mode for Curses UI (disable all but top menu) light mode for Curses UI (disable all but the top menu)
.. option:: -0, --disable-irix .. option:: -0, --disable-irix
@ -88,7 +88,7 @@ Command-Line Options
.. option:: -5, --disable-top .. option:: -5, --disable-top
disable top menu (QuickLook, CPU, MEM, SWAP and LOAD) disable top menu (QuickLook, CPU, MEM, SWAP, and LOAD)
.. option:: -6, --meangpu .. option:: -6, --meangpu
@ -196,11 +196,11 @@ Command-Line Options
.. option:: --hide-kernel-threads .. option:: --hide-kernel-threads
hide kernel threads in process list (not available on Windows) hide kernel threads in the process list (not available on Windows)
.. option:: -b, --byte .. option:: -b, --byte
display network rate in byte per second display network rate in bytes per second
.. option:: --diskio-show-ramfs .. option:: --diskio-show-ramfs
@ -220,7 +220,7 @@ Command-Line Options
.. option:: --theme-white .. option:: --theme-white
optimize display colors for white background optimize display colors for a white background
.. option:: --disable-check-update .. option:: --disable-check-update
@ -236,7 +236,7 @@ The following commands (key pressed) are supported while in Glances:
.. note:: On macOS please use ``CTRL-H`` to delete filter. .. note:: On macOS please use ``CTRL-H`` to delete filter.
Filter is a regular expression pattern: The filter is a regular expression pattern:
- ``gnome``: matches all processes starting with the ``gnome`` - ``gnome``: matches all processes starting with the ``gnome``
string string
@ -254,7 +254,7 @@ The following commands (key pressed) are supported while in Glances:
- If CPU iowait ``>60%``, sort processes by I/O read and write - If CPU iowait ``>60%``, sort processes by I/O read and write
``A`` ``A``
Enable/disable Application Monitoring Process Enable/disable the Application Monitoring Process
``b`` ``b``
Switch between bit/s or Byte/s for network I/O Switch between bit/s or Byte/s for network I/O
@ -278,7 +278,7 @@ The following commands (key pressed) are supported while in Glances:
Enable/disable top extended stats Enable/disable top extended stats
``E`` ``E``
Erase current process filter Erase the current process filter
``f`` ``f``
Show/hide file system and folder monitoring stats Show/hide file system and folder monitoring stats
@ -356,7 +356,7 @@ The following commands (key pressed) are supported while in Glances:
Sort process by CPU times (TIME+) Sort process by CPU times (TIME+)
``T`` ``T``
View network I/O as combination View network I/O as a combination
``u`` ``u``
Sort processes by USER Sort processes by USER
@ -379,13 +379,13 @@ The following commands (key pressed) are supported while in Glances:
``0`` ``0``
Enable/disable Irix/Solaris mode Enable/disable Irix/Solaris mode
Task's CPU usage will be divided by the total number of CPUs The task's CPU usage will be divided by the total number of CPUs
``1`` ``1``
Switch between global CPU and per-CPU stats Switch between global CPU and per-CPU stats
``2`` ``2``
Enable/disable left sidebar Enable/disable the left sidebar
``3`` ``3``
Enable/disable the quick look module Enable/disable the quick look module
@ -394,7 +394,7 @@ The following commands (key pressed) are supported while in Glances:
Enable/disable all but quick look and load module Enable/disable all but quick look and load module
``5`` ``5``
Enable/disable top menu (QuickLook, CPU, MEM, SWAP and LOAD) Enable/disable the top menu (QuickLook, CPU, MEM, SWAP, and LOAD)
``6`` ``6``
Enable/disable mean GPU mode Enable/disable mean GPU mode
@ -409,10 +409,10 @@ The following commands (key pressed) are supported while in Glances:
Refresh user interface Refresh user interface
``LEFT`` ``LEFT``
Navigation left through process sort Navigation left through the process sort
``RIGHT`` ``RIGHT``
Navigation right through process sort Navigation right through the process sort
``UP`` ``UP``
Up in the processes list Up in the processes list

View File

@ -5,7 +5,7 @@ Configuration
No configuration file is mandatory to use Glances. No configuration file is mandatory to use Glances.
Furthermore a configuration file is needed to access more settings. Furthermore, a configuration file is needed to access more settings.
Location Location
-------- --------
@ -14,7 +14,7 @@ Location
A template is available in the ``/usr{,/local}/share/doc/glances`` A template is available in the ``/usr{,/local}/share/doc/glances``
(Unix-like) directory or directly on `GitHub`_. (Unix-like) directory or directly on `GitHub`_.
You can put your own ``glances.conf`` file in the following locations: You can place your ``glances.conf`` file in the following locations:
==================== ============================================================= ==================== =============================================================
``Linux``, ``SunOS`` ~/.config/glances/, /etc/glances/, /usr/share/docs/glances/ ``Linux``, ``SunOS`` ~/.config/glances/, /etc/glances/, /usr/share/docs/glances/
@ -26,13 +26,13 @@ You can put your own ``glances.conf`` file in the following locations:
- On Windows XP, ``%APPDATA%`` is: ``C:\Documents and Settings\<USERNAME>\Application Data``. - On Windows XP, ``%APPDATA%`` is: ``C:\Documents and Settings\<USERNAME>\Application Data``.
- On Windows Vista and later: ``C:\Users\<USERNAME>\AppData\Roaming``. - On Windows Vista and later: ``C:\Users\<USERNAME>\AppData\Roaming``.
User-specific options override system-wide options and options given on User-specific options override system-wide options, and options given on
the command line override either. the command line overrides both.
Syntax Syntax
------ ------
Glances reads configuration files in the *ini* syntax. Glances read configuration files in the *ini* syntax.
A first section (called global) is available: A first section (called global) is available:
@ -41,7 +41,7 @@ A first section (called global) is available:
[global] [global]
# Refresh rate (default is a minimum of 2 seconds) # Refresh rate (default is a minimum of 2 seconds)
# Can be overwritten by the -t <sec> option # Can be overwritten by the -t <sec> option
# It is also possible to overwrite it in each plugin sections # It is also possible to overwrite it in each plugin section
refresh=2 refresh=2
# Should Glances check if a newer version is available on PyPI ? # Should Glances check if a newer version is available on PyPI ?
check_update=false check_update=false
@ -53,8 +53,8 @@ A first section (called global) is available:
# (see <install-dir>glances/plugins for details) # (see <install-dir>glances/plugins for details)
# plugin_dir=/home/user/dev/plugins # plugin_dir=/home/user/dev/plugins
Each plugin, export module and application monitoring process (AMP) can Each plugin, export module, and application monitoring process (AMP) can
have a section. Below an example for the CPU plugin: have a section. Below is an example for the CPU plugin:
.. code-block:: ini .. code-block:: ini
@ -94,16 +94,16 @@ or a Nginx AMP:
.. code-block:: ini .. code-block:: ini
[amp_nginx] [amp_nginx]
# Nginx status page should be enable (https://easyengine.io/tutorials/nginx/status-page/) # Nginx status page should be enabled (https://easyengine.io/tutorials/nginx/status-page/)
enable=true enable=true
regex=\/usr\/sbin\/nginx regex=\/usr\/sbin\/nginx
refresh=60 refresh=60
one_line=false one_line=false
status_url=http://localhost/nginx_status status_url=http://localhost/nginx_status
With Glances 3.0 or higher it is also possible to use dynamic configuration With Glances 3.0 or higher, you can use dynamic configuration values
value using system command. For example, if you to set the prefix of an by utilizing system commands. For example, if you want to set the prefix
InfluxDB export to the current hostname, use: of an InfluxDB export to the current hostname, use:
.. code-block:: ini .. code-block:: ini
@ -127,14 +127,14 @@ Glances logs all of its internal messages to a log file.
``DEBUG`` messages can be logged using the ``-d`` option on the command ``DEBUG`` messages can be logged using the ``-d`` option on the command
line. line.
The location of the Glances log file depends of your operating system. You can The location of the Glances log file depends on your operating system. You can
display the full path of the Glances log file full path using the``glances -V`` display the full path of the Glances log file using the ``glances -V``
command line. command line.
The file is automatically rotated when its size exceeds 1 MB. The file is automatically rotated when its size exceeds 1 MB.
If you want to use another system path or change the log message, you If you want to use another system path or change the log message, you
can use your own logger configuration. First of all, you have to create can use your logger configuration. First of all, you have to create
a ``glances.json`` file with, for example, the following content (JSON a ``glances.json`` file with, for example, the following content (JSON
format): format):
@ -206,7 +206,7 @@ and start Glances using the following command line:
LOG_CFG=<path>/glances.json glances LOG_CFG=<path>/glances.json glances
.. note:: .. note::
Replace ``<path>`` by the folder where your ``glances.json`` file Replace ``<path>`` with the directory where your ``glances.json`` file
is hosted. is hosted.
.. _GitHub: https://raw.githubusercontent.com/nicolargo/glances/master/conf/glances.conf .. _GitHub: https://raw.githubusercontent.com/nicolargo/glances/master/conf/glances.conf

View File

@ -3,7 +3,9 @@
Docker Docker
====== ======
Glances can be installed through Docker, allowing you to run it without installing all the python dependencies directly on your system. Once you have `docker installed <https://docs.docker.com/install/>`_, you can Glances can be installed through Docker, allowing you to run it without
installing all the Python dependencies directly on your system. Once you
have `docker installed <https://docs.docker.com/install/>`_, you can
Get the Glances container: Get the Glances container:
@ -11,7 +13,7 @@ Get the Glances container:
docker pull nicolargo/glances:<version or tag> docker pull nicolargo/glances:<version or tag>
Available tags (all images are based on both Alpine and Ubuntu Operating System): Available tags (all images are based on both Alpine and Ubuntu Operating Systems):
.. list-table:: .. list-table::
:widths: 25 15 25 35 :widths: 25 15 25 35
@ -47,13 +49,13 @@ Available tags (all images are based on both Alpine and Ubuntu Operating System)
- Full - Full
.. warning:: .. warning::
Tags containing `dev` target the `develop` branch directly and could be unstable. Tags containing `dev` directly target the `develop` branch and could be unstable.
For example, if you want a full Alpine Glances image (latest release) with all dependencies, go for `latest-full`. For example, if you want a full Alpine Glances image (latest release) with all dependencies, go for `latest-full`.
You can also specify a version (example: 3.4.0). All available versions can be found on `DockerHub`_. You can also specify a version (example: 3.4.0). All available versions can be found on `DockerHub`_.
An Example to pull the `latest` tag: An example of how to pull the `latest` tag:
.. code-block:: console .. code-block:: console
@ -81,7 +83,7 @@ Alternatively, you can specify something along the same lines with docker run op
Where \`pwd\`/glances.conf is a local directory containing your glances.conf file. Where \`pwd\`/glances.conf is a local directory containing your glances.conf file.
Glances by default, uses the container's OS information in the UI. If you want to display the host's OS info, you can do that by mounting `/etc/os-release` into the container. Glances by default uses the container's OS information in the UI. If you want to display the host's OS info, you can do that by mounting `/etc/os-release` into the container.
Here is a simple docker run example for that: Here is a simple docker run example for that:
@ -97,7 +99,7 @@ Run the container in *Web server mode* (notice the `GLANCES_OPT` environment var
Note: if you want to see the network interface stats within the container, add --net=host --privileged Note: if you want to see the network interface stats within the container, add --net=host --privileged
You can also include Glances container in you own `docker-compose.yml`. Here's a realistic example including a "traefik" reverse proxy serving an "whoami" app container plus a Glances container, providing a simple and efficient monitoring webui. You can also include Glances container in you own `docker-compose.yml`. A realistic example includes a "traefik" reverse proxy serving an "whoami" app container plus a Glances container, providing a simple and efficient monitoring webui.
.. code-block:: console .. code-block:: console

View File

@ -11,12 +11,12 @@ SYNOPSIS
DESCRIPTION DESCRIPTION
----------- -----------
**glances** is a cross-platform curses-based monitoring tool which aims **glances** is a cross-platform curses-based monitoring tool that aims
to present a maximum of information in a minimum of space, ideally to to present a maximum of information in a minimum of space, ideally fitting
fit in a classical 80x24 terminal or higher to have additional in a classic 80x24 terminal or larger for more details. It can adapt
information. It can adapt dynamically the displayed information dynamically to the displayed information depending on the terminal size.
depending on the terminal size. It can also work in client/server mode. It can also work in client/server mode.
Remote monitoring could be done via terminal or web interface. Remote monitoring can be performed via a terminal or web interface.
**glances** is written in Python and uses the *psutil* library to get **glances** is written in Python and uses the *psutil* library to get
information from your system. information from your system.
@ -38,19 +38,20 @@ Monitor local machine (standalone mode):
$ glances $ glances
Monitor local machine with the web interface (Web UI), run the following command line: To monitor the local machine with the web interface (Web UI),
, run the following command line:
$ glances -w $ glances -w
and open a Web browser with the returned URL then, open a web browser to the provided URL.
Monitor local machine and export stats to a CSV file: Monitor local machine and export stats to a CSV file:
$ glances --export csv --export-csv-file /tmp/glances.csv $ glances --export csv --export-csv-file /tmp/glances.csv
Monitor local machine and export stats to a InfluxDB server with 5s Monitor local machine and export stats to an InfluxDB server with 5s
refresh time (also possible to export to OpenTSDB, Cassandra, Statsd, refresh time (also possible to export to OpenTSDB, Cassandra, Statsd,
ElasticSearch, RabbitMQ and Riemann): ElasticSearch, RabbitMQ, and Riemann):
$ glances -t 5 --export influxdb $ glances -t 5 --export influxdb

View File

@ -3,13 +3,13 @@ Glances
.. image:: _static/screenshot-wide.png .. image:: _static/screenshot-wide.png
Glances is a cross-platform monitoring tool which aims to present a Glances is a cross-platform monitoring tool that aims to present
maximum of information in a minimum of space through a curses or Web maximum information in minimal space through either a curses-based
based interface. It can adapt dynamically the displayed information or Web-based interface. It can dynamically adapt the displayed
depending on the terminal size. information depending on the terminal size.
It can also work in client/server mode. Remote monitoring could be It can also work in client/server mode. Remote monitoring can be
done via terminal, Web interface or API (XMLRPC and RESTful). done via terminal, Web interface, or API (XMLRPC and RESTful).
Glances is written in Python and uses the `psutil`_ library to get Glances is written in Python and uses the `psutil`_ library to get
information from your system. information from your system.

View File

@ -3,8 +3,8 @@
Install Install
======= =======
Glances is on ``PyPI``. By using PyPI, you are sure to have the latest Glances is available on ``PyPI``. By using PyPI, you are sure to have the
stable version. latest stable version.
To install, simply use ``pip``: To install, simply use ``pip``:
@ -12,13 +12,13 @@ To install, simply use ``pip``:
pip install glances pip install glances
*Note*: Python headers are required to install `psutil`_. For example, *Note*: Python headers are required to install `psutil`_. For instance,
on Debian/Ubuntu you need to install first the *python-dev* package. on Debian/Ubuntu, you must first install the *python-dev* package.
For Fedora/CentOS/RHEL install first *python-devel* package. For Windows, On Fedora/CentOS/RHEL, first, install the *python-devel* package. For Windows,
just install psutil from the binary installation file. psutil can be installed from the binary installation file.
You can also install the following libraries in order to use optional You can also install the following libraries to use the optional
features (like the Web interface, export modules...): features (such as the web interface, export modules, etc.):
.. code-block:: console .. code-block:: console

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" "Nov 01, 2023" "4.0.0_beta01" "Glances" .TH "GLANCES" "1" "Dec 10, 2023" "4.0.0_beta01" "Glances"
.SH NAME .SH NAME
glances \- An eye on your system glances \- An eye on your system
.SH SYNOPSIS .SH SYNOPSIS
@ -35,12 +35,12 @@ glances \- An eye on your system
\fBglances\fP [OPTIONS] \fBglances\fP [OPTIONS]
.SH DESCRIPTION .SH DESCRIPTION
.sp .sp
\fBglances\fP is a cross\-platform curses\-based monitoring tool which aims \fBglances\fP is a cross\-platform curses\-based monitoring tool that aims
to present a maximum of information in a minimum of space, ideally to to present a maximum of information in a minimum of space, ideally fitting
fit in a classical 80x24 terminal or higher to have additional in a classic 80x24 terminal or larger for more details. It can adapt
information. It can adapt dynamically the displayed information dynamically to the displayed information depending on the terminal size.
depending on the terminal size. It can also work in client/server mode. It can also work in client/server mode.
Remote monitoring could be done via terminal or web interface. Remote monitoring can be performed via a terminal or web interface.
.sp .sp
\fBglances\fP is written in Python and uses the \fIpsutil\fP library to get \fBglances\fP is written in Python and uses the \fIpsutil\fP library to get
information from your system. information from your system.
@ -54,7 +54,7 @@ show this help message and exit
.INDENT 0.0 .INDENT 0.0
.TP .TP
.B \-V, \-\-version .B \-V, \-\-version
show programs version number and exit show the programs version number and exit
.UNINDENT .UNINDENT
.INDENT 0.0 .INDENT 0.0
.TP .TP
@ -68,7 +68,7 @@ path to the configuration file
.UNINDENT .UNINDENT
.INDENT 0.0 .INDENT 0.0
.TP .TP
.B \-P plugin directory, \-\-plugins plugin directory .B \-P PLUGIN_DIRECTORY, \-\-plugins PLUGIN_DIRECTORY
path to a directory containing additional plugins path to a directory containing additional plugins
.UNINDENT .UNINDENT
.INDENT 0.0 .INDENT 0.0
@ -79,22 +79,22 @@ display modules (plugins & exports) list and exit
.INDENT 0.0 .INDENT 0.0
.TP .TP
.B \-\-disable\-plugin PLUGIN .B \-\-disable\-plugin PLUGIN
disable PLUGIN (comma separated list) disable PLUGIN (comma\-separated list)
.UNINDENT .UNINDENT
.INDENT 0.0 .INDENT 0.0
.TP .TP
.B \-\-enable\-plugin PLUGIN .B \-\-enable\-plugin PLUGIN
enable PLUGIN (comma separated list) enable PLUGIN (comma\-separated list)
.UNINDENT .UNINDENT
.INDENT 0.0 .INDENT 0.0
.TP .TP
.B \-\-stdout PLUGINS_STATS .B \-\-stdout PLUGINS_STATS
display stats to stdout (comma separated list of plugins/plugins.attribute) display stats to stdout (comma\-separated list of plugins/plugins.attribute)
.UNINDENT .UNINDENT
.INDENT 0.0 .INDENT 0.0
.TP .TP
.B \-\-export EXPORT .B \-\-export EXPORT
enable EXPORT module (comma separated list) enable EXPORT module (comma\-separated list)
.UNINDENT .UNINDENT
.INDENT 0.0 .INDENT 0.0
.TP .TP
@ -119,7 +119,7 @@ disable the Web UI (only the RESTful API will respond)
.INDENT 0.0 .INDENT 0.0
.TP .TP
.B \-\-light, \-\-enable\-light .B \-\-light, \-\-enable\-light
light mode for Curses UI (disable all but top menu) light mode for Curses UI (disable all but the top menu)
.UNINDENT .UNINDENT
.INDENT 0.0 .INDENT 0.0
.TP .TP
@ -149,7 +149,7 @@ disable all but quick look and load
.INDENT 0.0 .INDENT 0.0
.TP .TP
.B \-5, \-\-disable\-top .B \-5, \-\-disable\-top
disable top menu (QuickLook, CPU, MEM, SWAP and LOAD) disable top menu (QuickLook, CPU, MEM, SWAP, and LOAD)
.UNINDENT .UNINDENT
.INDENT 0.0 .INDENT 0.0
.TP .TP
@ -284,12 +284,12 @@ force short name for processes name
.INDENT 0.0 .INDENT 0.0
.TP .TP
.B \-\-hide\-kernel\-threads .B \-\-hide\-kernel\-threads
hide kernel threads in process list (not available on Windows) hide kernel threads in the process list (not available on Windows)
.UNINDENT .UNINDENT
.INDENT 0.0 .INDENT 0.0
.TP .TP
.B \-b, \-\-byte .B \-b, \-\-byte
display network rate in byte per second display network rate in bytes per second
.UNINDENT .UNINDENT
.INDENT 0.0 .INDENT 0.0
.TP .TP
@ -314,12 +314,12 @@ display FS free space instead of used
.INDENT 0.0 .INDENT 0.0
.TP .TP
.B \-\-theme\-white .B \-\-theme\-white
optimize display colors for white background optimize display colors for a white background
.UNINDENT .UNINDENT
.INDENT 0.0 .INDENT 0.0
.TP .TP
.B \-\-disable\-check\-update .B \-\-disable\-check\-update
disable online Glances version ckeck disable online Glances version check
.UNINDENT .UNINDENT
.SH INTERACTIVE COMMANDS .SH INTERACTIVE COMMANDS
.sp .sp
@ -336,7 +336,7 @@ On macOS please use \fBCTRL\-H\fP to delete filter.
.UNINDENT .UNINDENT
.UNINDENT .UNINDENT
.sp .sp
Filter is a regular expression pattern: The filter is a regular expression pattern:
.INDENT 7.0 .INDENT 7.0
.IP \(bu 2 .IP \(bu 2
\fBgnome\fP: matches all processes starting with the \fBgnome\fP \fBgnome\fP: matches all processes starting with the \fBgnome\fP
@ -358,7 +358,7 @@ If CPU iowait \fB>60%\fP, sort processes by I/O read and write
.UNINDENT .UNINDENT
.TP .TP
.B \fBA\fP .B \fBA\fP
Enable/disable Application Monitoring Process Enable/disable the Application Monitoring Process
.TP .TP
.B \fBb\fP .B \fBb\fP
Switch between bit/s or Byte/s for network I/O Switch between bit/s or Byte/s for network I/O
@ -382,7 +382,7 @@ Enable/disable Docker stats
Enable/disable top extended stats Enable/disable top extended stats
.TP .TP
.B \fBE\fP .B \fBE\fP
Erase current process filter Erase the current process filter
.TP .TP
.B \fBf\fP .B \fBf\fP
Show/hide file system and folder monitoring stats Show/hide file system and folder monitoring stats
@ -460,7 +460,7 @@ Enable/disable spark lines
Sort process by CPU times (TIME+) Sort process by CPU times (TIME+)
.TP .TP
.B \fBT\fP .B \fBT\fP
View network I/O as combination View network I/O as a combination
.TP .TP
.B \fBu\fP .B \fBu\fP
Sort processes by USER Sort processes by USER
@ -483,13 +483,13 @@ Show/hide processes stats
.B \fB0\fP .B \fB0\fP
Enable/disable Irix/Solaris mode Enable/disable Irix/Solaris mode
.sp .sp
Tasks CPU usage will be divided by the total number of CPUs The tasks CPU usage will be divided by the total number of CPUs
.TP .TP
.B \fB1\fP .B \fB1\fP
Switch between global CPU and per\-CPU stats Switch between global CPU and per\-CPU stats
.TP .TP
.B \fB2\fP .B \fB2\fP
Enable/disable left sidebar Enable/disable the left sidebar
.TP .TP
.B \fB3\fP .B \fB3\fP
Enable/disable the quick look module Enable/disable the quick look module
@ -498,7 +498,7 @@ Enable/disable the quick look module
Enable/disable all but quick look and load module Enable/disable all but quick look and load module
.TP .TP
.B \fB5\fP .B \fB5\fP
Enable/disable top menu (QuickLook, CPU, MEM, SWAP and LOAD) Enable/disable the top menu (QuickLook, CPU, MEM, SWAP, and LOAD)
.TP .TP
.B \fB6\fP .B \fB6\fP
Enable/disable mean GPU mode Enable/disable mean GPU mode
@ -513,10 +513,10 @@ Switch between process command line or command name
Refresh user interface Refresh user interface
.TP .TP
.B \fBLEFT\fP .B \fBLEFT\fP
Navigation left through process sort Navigation left through the process sort
.TP .TP
.B \fBRIGHT\fP .B \fBRIGHT\fP
Navigation right through process sort Navigation right through the process sort
.TP .TP
.B \fBUP\fP .B \fBUP\fP
Up in the processes list Up in the processes list
@ -545,7 +545,7 @@ Quit Glances
.sp .sp
No configuration file is mandatory to use Glances. No configuration file is mandatory to use Glances.
.sp .sp
Furthermore a configuration file is needed to access more settings. Furthermore, a configuration file is needed to access more settings.
.SH LOCATION .SH LOCATION
.sp .sp
\fBNOTE:\fP \fBNOTE:\fP
@ -556,7 +556,7 @@ A template is available in the \fB/usr{,/local}/share/doc/glances\fP
.UNINDENT .UNINDENT
.UNINDENT .UNINDENT
.sp .sp
You can put your own \fBglances.conf\fP file in the following locations: You can place your \fBglances.conf\fP file in the following locations:
.TS .TS
center; center;
|l|l|. |l|l|.
@ -593,11 +593,11 @@ On Windows XP, \fB%APPDATA%\fP is: \fBC:\eDocuments and Settings\e<USERNAME>\eAp
On Windows Vista and later: \fBC:\eUsers\e<USERNAME>\eAppData\eRoaming\fP\&. On Windows Vista and later: \fBC:\eUsers\e<USERNAME>\eAppData\eRoaming\fP\&.
.UNINDENT .UNINDENT
.sp .sp
User\-specific options override system\-wide options and options given on User\-specific options override system\-wide options, and options given on
the command line override either. the command line overrides both.
.SH SYNTAX .SH SYNTAX
.sp .sp
Glances reads configuration files in the \fIini\fP syntax. Glances read configuration files in the \fIini\fP syntax.
.sp .sp
A first section (called global) is available: A first section (called global) is available:
.INDENT 0.0 .INDENT 0.0
@ -607,10 +607,10 @@ A first section (called global) is available:
.ft C .ft C
[global] [global]
# Refresh rate (default is a minimum of 2 seconds) # Refresh rate (default is a minimum of 2 seconds)
# Can be overwrite by the \-t <sec> option # Can be overwritten by the \-t <sec> option
# It is also possible to overwrite it in each plugin sections # It is also possible to overwrite it in each plugin section
refresh=2 refresh=2
# Does Glances should check if a newer version is available on PyPI ? # Should Glances check if a newer version is available on PyPI ?
check_update=false check_update=false
# History size (maximum number of values) # History size (maximum number of values)
# Default is 28800: 1 day with 1 point every 3 seconds # Default is 28800: 1 day with 1 point every 3 seconds
@ -624,8 +624,8 @@ history_size=28800
.UNINDENT .UNINDENT
.UNINDENT .UNINDENT
.sp .sp
Each plugin, export module and application monitoring process (AMP) can Each plugin, export module, and application monitoring process (AMP) can
have a section. Below an example for the CPU plugin: have a section. Below is an example for the CPU plugin:
.INDENT 0.0 .INDENT 0.0
.INDENT 3.5 .INDENT 3.5
.sp .sp
@ -679,7 +679,7 @@ or a Nginx AMP:
.nf .nf
.ft C .ft C
[amp_nginx] [amp_nginx]
# Nginx status page should be enable (https://easyengine.io/tutorials/nginx/status\-page/) # Nginx status page should be enabled (https://easyengine.io/tutorials/nginx/status\-page/)
enable=true enable=true
regex=\e/usr\e/sbin\e/nginx regex=\e/usr\e/sbin\e/nginx
refresh=60 refresh=60
@ -690,9 +690,9 @@ status_url=http://localhost/nginx_status
.UNINDENT .UNINDENT
.UNINDENT .UNINDENT
.sp .sp
With Glances 3.0 or higher it is also possible to use dynamic configuration With Glances 3.0 or higher, you can use dynamic configuration values
value using system command. For example, if you to set the prefix of an by utilizing system commands. For example, if you want to set the prefix
InfluxDB export to the current hostname, use: of an InfluxDB export to the current hostname, use:
.INDENT 0.0 .INDENT 0.0
.INDENT 3.5 .INDENT 3.5
.sp .sp
@ -723,16 +723,17 @@ tags=system:\(gauname \-a\(ga
.sp .sp
Glances logs all of its internal messages to a log file. Glances logs all of its internal messages to a log file.
.sp .sp
\fBDEBUG\fP messages can been logged using the \fB\-d\fP option on the command \fBDEBUG\fP messages can be logged using the \fB\-d\fP option on the command
line. line.
.sp .sp
The location of the Glances depends of your operating system. You could The location of the Glances log file depends on your operating system. You can
displayed the Glances log file full path using the\(ga\(gaglances \-V\(ga\(ga command line. display the full path of the Glances log file using the \fBglances \-V\fP
command line.
.sp .sp
The file is automatically rotate when the size is higher than 1 MB. The file is automatically rotated when its size exceeds 1 MB.
.sp .sp
If you want to use another system path or change the log message, you If you want to use another system path or change the log message, you
can use your own logger configuration. First of all, you have to create can use your logger configuration. First of all, you have to create
a \fBglances.json\fP file with, for example, the following content (JSON a \fBglances.json\fP file with, for example, the following content (JSON
format): format):
.INDENT 0.0 .INDENT 0.0
@ -818,7 +819,7 @@ LOG_CFG=<path>/glances.json glances
\fBNOTE:\fP \fBNOTE:\fP
.INDENT 0.0 .INDENT 0.0
.INDENT 3.5 .INDENT 3.5
Replace \fB<path>\fP by the folder where your \fBglances.json\fP file Replace \fB<path>\fP with the directory where your \fBglances.json\fP file
is hosted. is hosted.
.UNINDENT .UNINDENT
.UNINDENT .UNINDENT
@ -831,14 +832,15 @@ $ glances
.UNINDENT .UNINDENT
.UNINDENT .UNINDENT
.sp .sp
Monitor local machine with the web interface (Web UI), run the following command line: To monitor the local machine with the web interface (Web UI),
, run the following command line:
.INDENT 0.0 .INDENT 0.0
.INDENT 3.5 .INDENT 3.5
$ glances \-w $ glances \-w
.UNINDENT .UNINDENT
.UNINDENT .UNINDENT
.sp .sp
and open a Web browser with the returned URL then, open a web browser to the provided URL.
.sp .sp
Monitor local machine and export stats to a CSV file: Monitor local machine and export stats to a CSV file:
.INDENT 0.0 .INDENT 0.0
@ -847,9 +849,9 @@ $ glances export csv export\-csv\-file /tmp/glances.csv
.UNINDENT .UNINDENT
.UNINDENT .UNINDENT
.sp .sp
Monitor local machine and export stats to a InfluxDB server with 5s Monitor local machine and export stats to an InfluxDB server with 5s
refresh time (also possible to export to OpenTSDB, Cassandra, Statsd, refresh time (also possible to export to OpenTSDB, Cassandra, Statsd,
ElasticSearch, RabbitMQ and Riemann): ElasticSearch, RabbitMQ, and Riemann):
.INDENT 0.0 .INDENT 0.0
.INDENT 3.5 .INDENT 3.5
$ glances \-t 5 export influxdb $ glances \-t 5 export influxdb

View File

@ -3,8 +3,8 @@
Quickstart Quickstart
========== ==========
This page gives a good introduction in how to get started with Glances. This page gives a good introduction to how to get started with Glances.
Glances offers 3 modes: Glances offers three modes:
- Standalone - Standalone
- Client/Server - Client/Server
@ -61,7 +61,7 @@ Note: It will display one line per stat per refresh.
Client/Server Mode Client/Server Mode
------------------ ------------------
If you want to remotely monitor a machine, called ``server``, from If you want to remotely monitor a machine called ``server``, from
another one, called ``client``, just run on the server: another one, called ``client``, just run on the server:
.. code-block:: console .. code-block:: console
@ -118,7 +118,7 @@ To start the central client, use the following option:
.. note:: .. note::
Use ``--disable-autodiscover`` to disable the auto discovery mode. Use ``--disable-autodiscover`` to disable the auto-discovery mode.
When the list is displayed, you can navigate through the Glances servers with When the list is displayed, you can navigate through the Glances servers with
up/down keys. It is also possible to sort the server using: up/down keys. It is also possible to sort the server using:
@ -137,7 +137,7 @@ client, the latter will try to grab stats using the ``SNMP`` protocol:
client$ glances -c @snmpserver client$ glances -c @snmpserver
.. note:: .. note::
Stats grabbed by SNMP request are limited and OS dependent. Stats grabbed by SNMP request are limited and OS-dependent.
A SNMP server should be installed and configured... A SNMP server should be installed and configured...
@ -152,14 +152,14 @@ Web Server Mode
.. image:: _static/screenshot-web.png .. image:: _static/screenshot-web.png
If you want to remotely monitor a machine, called ``server``, from any If you want to remotely monitor a machine called ``server``, from any
device with a web browser, just run the server with the ``-w`` option: device with a web browser, just run the server with the ``-w`` option:
.. code-block:: console .. code-block:: console
server$ glances -w server$ glances -w
then on the client enter the following URL in your favorite web browser: then, on the client, enter the following URL in your favorite web browser:
:: ::
@ -167,7 +167,7 @@ then on the client enter the following URL in your favorite web browser:
where ``@server`` is the IP address or hostname of the server. where ``@server`` is the IP address or hostname of the server.
To change the refresh rate of the page, just add the period in seconds To change the refresh rate of the page, add the period in seconds
at the end of the URL. For example, to refresh the page every ``10`` at the end of the URL. For example, to refresh the page every ``10``
seconds: seconds:
@ -181,10 +181,10 @@ Here's a screenshot from Chrome on Android:
.. image:: _static/screenshot-web2.png .. image:: _static/screenshot-web2.png
How to protect your server (or Web server) with a login/password ? How do you protect your server (or Web server) with a login/password ?
------------------------------------------------------------------ ------------------------------------------------------------------
You can set a password to access to the server using the ``--password``. You can set a password to access the server using the ``--password``.
By default, the login is ``glances`` but you can change it with By default, the login is ``glances`` but you can change it with
``--username``. ``--username``.
@ -192,8 +192,8 @@ If you want, the SHA password will be stored in ``<login>.pwd`` file (in
the same folder where the Glances configuration file is stored, so the same folder where the Glances configuration file is stored, so
~/.config/glances/ on GNU Linux operating system). ~/.config/glances/ on GNU Linux operating system).
Next time your run the server/client, password will not be asked. To set a Next time you run the server/client, password will not be asked. To set a
specific username you can use the -u <username> option. specific username, you can use the -u <username> option.
It is also possible to set the default password in the Glances configuration It is also possible to set the default password in the Glances configuration
file: file:

View File

@ -7,7 +7,7 @@ To post a question about Glances use cases, please post it to the
official Q&A `forum official Q&A `forum
<https://groups.google.com/forum/?hl=en#!forum/glances-users>`_. <https://groups.google.com/forum/?hl=en#!forum/glances-users>`_.
To report a bug or a feature request use the GitHub `issue To report a bug or a feature request, use the GitHub `issue
<https://github.com/nicolargo/glances/issues>`_ tracker. <https://github.com/nicolargo/glances/issues>`_ tracker.
Feel free to contribute! Feel free to contribute!