From 370da44744380834d796c80c2b5f294dc47654b4 Mon Sep 17 00:00:00 2001 From: nicolargo Date: Sat, 23 Mar 2024 10:16:34 +0100 Subject: version 3.4.0.4 --- docs/api.rst | 1178 +++++++++++++++++++++++++++++----------------------------- 1 file changed, 582 insertions(+), 596 deletions(-) (limited to 'docs/api.rst') diff --git a/docs/api.rst b/docs/api.rst index b68312a1..27f18694 100644 --- a/docs/api.rst +++ b/docs/api.rst @@ -66,14 +66,14 @@ GET alert Get plugin stats:: # curl http://localhost:61208/api/3/alert - [[1684593857.0, + [[1711185029.0, -1, "WARNING", "MEM", - 74.95383222581204, - 74.95383222581204, - 74.95383222581204, - 74.95383222581204, + 77.19987581483426, + 77.19987581483426, + 77.19987581483426, + 77.19987581483426, 1, [], "", @@ -93,7 +93,7 @@ Get plugin stats:: "refresh": 3.0, "regex": True, "result": None, - "timer": 1.7997314929962158}, + "timer": 0.9669091701507568}, {"count": 0, "countmax": 20.0, "countmin": None, @@ -102,7 +102,7 @@ Get plugin stats:: "refresh": 3.0, "regex": True, "result": None, - "timer": 1.7995269298553467}] + "timer": 0.9667403697967529}] Get a specific field:: @@ -120,7 +120,7 @@ Get a specific item when field matchs the given value:: "refresh": 3.0, "regex": True, "result": None, - "timer": 1.7997314929962158}]} + "timer": 0.9669091701507568}]} GET connections --------------- @@ -141,54 +141,12 @@ GET containers Get plugin stats:: # curl http://localhost:61208/api/3/containers - {"containers": [{"Command": ["top"], - "Created": "2023-05-08T15:29:34.918692365+02:00", - "Id": "4b7f732d43e4bc5d92fe5298cba025b550e6a608754c1c38f9a90aaecd46b8f9", - "Image": "["docker.io/library/ubuntu:latest"]", - "Status": "running", - "Uptime": "1 weeks", - "cpu": {"total": 2.2993346332214973e-06}, - "cpu_percent": 2.2993346332214973e-06, - "engine": "podman", - "io": {"ior": 0.0, "iow": 0.0, "time_since_update": 1}, - "io_r": 0.0, - "io_w": 0.0, - "key": "name", - "memory": {"limit": 7836184576.0, "usage": 1142784.0}, - "memory_usage": 1142784.0, - "name": "frosty_bouman", - "network": {"rx": 0.0, "time_since_update": 1, "tx": 0.0}, - "network_rx": 0.0, - "network_tx": 0.0, - "pod_id": "8d0f1c783def", - "pod_name": "frosty_bouman"}, - {"Command": [], - "Created": "2022-10-22T14:23:03.120912374+02:00", - "Id": "9491515251edcd5bb5dc17205d7ee573c0be96fe0b08b0a12a7e2cea874565ea", - "Image": "["k8s.gcr.io/pause:3.5"]", - "Status": "running", - "Uptime": "1 weeks", - "cpu": {"total": 2.754373096346692e-10}, - "cpu_percent": 2.754373096346692e-10, - "engine": "podman", - "io": {"ior": 0.0, "iow": 0.0, "time_since_update": 1}, - "io_r": 0.0, - "io_w": 0.0, - "key": "name", - "memory": {"limit": 7836184576.0, "usage": 208896.0}, - "memory_usage": 208896.0, - "name": "8d0f1c783def-infra", - "network": {"rx": 0.0, "time_since_update": 1, "tx": 0.0}, - "network_rx": 0.0, - "network_tx": 0.0, - "pod_id": "8d0f1c783def", - "pod_name": "8d0f1c783def-infra"}, - {"Command": ["/portainer"], + {"containers": [{"Command": ["/portainer"], "Created": "2022-10-29T14:59:10.266701439Z", "Id": "3abd51c615968482d9ccff5afc629f267f6dda113ed68b75b432615fae3b49fb", "Image": ["portainer/portainer-ce:2.9.3"], "Status": "running", - "Uptime": "7 hours", + "Uptime": "1 weeks", "cpu": {"total": 0.0}, "cpu_percent": 0.0, "engine": "docker", @@ -231,21 +189,21 @@ Get plugin stats:: # curl http://localhost:61208/api/3/cpu {"cpucore": 4, "ctx_switches": 0, - "guest": 1.1, + "guest": 0.0, "guest_nice": 0.0, - "idle": 38.7, + "idle": 68.7, "interrupts": 0, - "iowait": 3.2, + "iowait": 4.0, "irq": 0.0, "nice": 0.0, "soft_interrupts": 0, - "softirq": 0.4, + "softirq": 0.3, "steal": 0.0, "syscalls": 0, - "system": 7.7, + "system": 4.3, "time_since_update": 1, - "total": 62.2, - "user": 50.0} + "total": 25.0, + "user": 22.6} Fields descriptions: @@ -268,7 +226,7 @@ Fields descriptions: Get a specific field:: # curl http://localhost:61208/api/3/cpu/total - {"total": 62.2} + {"total": 25.0} GET diskio ---------- @@ -314,21 +272,21 @@ Get plugin stats:: # curl http://localhost:61208/api/3/fs [{"device_name": "/dev/mapper/ubuntu--gnome--vg-root", - "free": 4763168768, + "free": 36856778752, "fs_type": "ext4", "key": "mnt_point", "mnt_point": "/", - "percent": 97.9, + "percent": 84.0, "size": 243334156288, - "used": 226183532544}, + "used": 194089922560}, {"device_name": "zsfpool", - "free": 41811968, + "free": 31195136, "fs_type": "zfs", "key": "mnt_point", "mnt_point": "/zsfpool", - "percent": 0.3, - "size": 41943040, - "used": 131072}] + "percent": 25.4, + "size": 41811968, + "used": 10616832}] Get a specific field:: @@ -339,13 +297,13 @@ Get a specific item when field matchs the given value:: # curl http://localhost:61208/api/3/fs/mnt_point// {"/": [{"device_name": "/dev/mapper/ubuntu--gnome--vg-root", - "free": 4763168768, + "free": 36856778752, "fs_type": "ext4", "key": "mnt_point", "mnt_point": "/", - "percent": 97.9, + "percent": 84.0, "size": 243334156288, - "used": 226183532544}]} + "used": 194089922560}]} GET ip ------ @@ -372,9 +330,9 @@ Get plugin stats:: # curl http://localhost:61208/api/3/load {"cpucore": 4, - "min1": 3.00634765625, - "min15": 1.19775390625, - "min5": 1.4345703125} + "min1": 1.87353515625, + "min15": 1.30029296875, + "min5": 1.5517578125} Fields descriptions: @@ -386,7 +344,7 @@ Fields descriptions: Get a specific field:: # curl http://localhost:61208/api/3/load/min1 - {"min1": 3.00634765625} + {"min1": 1.87353515625} GET mem ------- @@ -394,16 +352,16 @@ GET mem Get plugin stats:: # curl http://localhost:61208/api/3/mem - {"active": 3130548224, - "available": 1962663936, - "buffers": 142680064, - "cached": 2079936512, - "free": 1962663936, - "inactive": 3094474752, - "percent": 75.0, - "shared": 498302976, - "total": 7836184576, - "used": 5873520640} + {"active": 3217502208, + "available": 1783783424, + "buffers": 242143232, + "cached": 2323054592, + "free": 1783783424, + "inactive": 3508854784, + "percent": 77.2, + "shared": 658030592, + "total": 7823568896, + "used": 6039785472} Fields descriptions: @@ -422,7 +380,7 @@ Fields descriptions: Get a specific field:: # curl http://localhost:61208/api/3/mem/total - {"total": 7836184576} + {"total": 7823568896} GET memswap ----------- @@ -430,13 +388,13 @@ GET memswap Get plugin stats:: # curl http://localhost:61208/api/3/memswap - {"free": 3018182656, - "percent": 62.7, - "sin": 10520571904, - "sout": 16592646144, + {"free": 3968638976, + "percent": 50.9, + "sin": 4544499712, + "sout": 9235214336, "time_since_update": 1, "total": 8082419712, - "used": 5064237056} + "used": 4113780736} Fields descriptions: @@ -460,29 +418,29 @@ Get plugin stats:: # curl http://localhost:61208/api/3/network [{"alias": None, - "cumulative_cx": 344481682, - "cumulative_rx": 172240841, - "cumulative_tx": 172240841, - "cx": 7770, - "interface_name": "lo", + "cumulative_cx": 5405761891, + "cumulative_rx": 5075958831, + "cumulative_tx": 329803060, + "cx": 27520, + "interface_name": "wlp2s0", "is_up": True, "key": "interface_name", - "rx": 3885, + "rx": 19247, "speed": 0, "time_since_update": 1, - "tx": 3885}, + "tx": 8273}, {"alias": None, - "cumulative_cx": 22624441944, - "cumulative_rx": 21888194655, - "cumulative_tx": 736247289, - "cx": 146685, - "interface_name": "wlp2s0", - "is_up": True, + "cumulative_cx": 0, + "cumulative_rx": 0, + "cumulative_tx": 0, + "cx": 0, + "interface_name": "br-40875d2e2716", + "is_up": False, "key": "interface_name", - "rx": 135811, + "rx": 0, "speed": 0, "time_since_update": 1, - "tx": 10874}] + "tx": 0}] Fields descriptions: @@ -501,30 +459,29 @@ Fields descriptions: Get a specific field:: # curl http://localhost:61208/api/3/network/interface_name - {"interface_name": ["lo", - "wlp2s0", - "docker0", + {"interface_name": ["wlp2s0", + "br-40875d2e2716", "br_grafana", + "lxdbr0", + "veth05608da0", "mpqemubr0", - "vboxnet0", - "tap-1e376645a40", - "veth54fd604"]} + "veth3c5f47a"]} Get a specific item when field matchs the given value:: - # curl http://localhost:61208/api/3/network/interface_name/lo - {"lo": [{"alias": None, - "cumulative_cx": 344481682, - "cumulative_rx": 172240841, - "cumulative_tx": 172240841, - "cx": 7770, - "interface_name": "lo", - "is_up": True, - "key": "interface_name", - "rx": 3885, - "speed": 0, - "time_since_update": 1, - "tx": 3885}]} + # curl http://localhost:61208/api/3/network/interface_name/wlp2s0 + {"wlp2s0": [{"alias": None, + "cumulative_cx": 5405761891, + "cumulative_rx": 5075958831, + "cumulative_tx": 329803060, + "cx": 27520, + "interface_name": "wlp2s0", + "is_up": True, + "key": "interface_name", + "rx": 19247, + "speed": 0, + "time_since_update": 1, + "tx": 8273}]} GET now ------- @@ -532,7 +489,7 @@ GET now Get plugin stats:: # curl http://localhost:61208/api/3/now - "2023-05-20 16:44:16 CEST" + "2024-03-23 10:10:28 CET" GET percpu ---------- @@ -541,31 +498,31 @@ Get plugin stats:: # curl http://localhost:61208/api/3/percpu [{"cpu_number": 0, - "guest": 1.5, + "guest": 0.0, "guest_nice": 0.0, - "idle": 26.2, - "iowait": 1.5, + "idle": 84.3, + "iowait": 2.6, "irq": 0.0, "key": "cpu_number", "nice": 0.0, - "softirq": 0.0, + "softirq": 1.7, "steal": 0.0, - "system": 4.4, - "total": 73.8, - "user": 68.0}, + "system": 1.7, + "total": 15.7, + "user": 9.6}, {"cpu_number": 1, "guest": 0.0, "guest_nice": 0.0, - "idle": 39.4, - "iowait": 1.0, + "idle": 94.8, + "iowait": 0.9, "irq": 0.0, "key": "cpu_number", "nice": 0.0, "softirq": 0.0, "steal": 0.0, - "system": 4.8, - "total": 60.6, - "user": 54.8}] + "system": 0.9, + "total": 5.2, + "user": 3.4}] Get a specific field:: @@ -584,7 +541,7 @@ Get plugin stats:: "port": 0, "refresh": 30, "rtt_warning": None, - "status": 0.00792, + "status": 0.005803, "timeout": 3}] Get a specific field:: @@ -601,7 +558,7 @@ Get a specific item when field matchs the given value:: "port": 0, "refresh": 30, "rtt_warning": None, - "status": 0.00792, + "status": 0.005803, "timeout": 3}]} GET processcount @@ -610,12 +567,12 @@ GET processcount Get plugin stats:: # curl http://localhost:61208/api/3/processcount - {"pid_max": 0, "running": 1, "sleeping": 347, "thread": 1761, "total": 415} + {"pid_max": 0, "running": 1, "sleeping": 335, "thread": 1678, "total": 403} Get a specific field:: # curl http://localhost:61208/api/3/processcount/total - {"total": 415} + {"total": 403} GET processlist --------------- @@ -623,292 +580,304 @@ GET processlist Get plugin stats:: # curl http://localhost:61208/api/3/processlist - [{"cmdline": ["/snap/firefox/2605/usr/lib/firefox/firefox"], + [{"cmdline": ["/usr/share/code/code", + "--type=renderer", + "--crashpad-handler-pid=35523", + "--enable-crash-reporter=721e05a9-6035-4dcb-bd58-68097aa48dd0,no_channel", + "--user-data-dir=/home/nicolargo/.config/Code", + "--standard-schemes=vscode-webview,vscode-file", + "--enable-sandbox", + "--secure-schemes=vscode-webview,vscode-file", + "--cors-schemes=vscode-webview,vscode-file", + "--fetch-schemes=vscode-webview,vscode-file", + "--service-worker-schemes=vscode-webview", + "--code-cache-schemes=vscode-webview,vscode-file", + "--app-path=/usr/share/code/resources/app", + "--enable-sandbox", + "--enable-blink-features=HighlightAPI", + "--first-renderer-process", + "--lang=en-US", + "--num-raster-threads=2", + "--enable-main-frame-before-activation", + "--renderer-client-id=4", + "--time-ticks-at-unix-epoch=-1709539275787032", + "--launch-time-ticks=3773104105", + "--shared-files=v8_context_snapshot_data:100", + "--field-trial-handle=0,i,2992833077465328896,17440056338018087593,262144", + "--disable-features=CalculateNativeWinOcclusion,SpareRendererForSitePerProcess", + "--vscode-window-config=vscode:0a3f42ef-a12c-453d-8061-6c7b57ac6b4f"], "cpu_percent": 0.0, - "cpu_times": [16463.82, 5059.85, 11961.09, 1725.84, 0.0], + "cpu_times": [8788.45, 733.23, 0.0, 0.0, 0.0], "gids": [1000, 1000, 1000], - "io_counters": [9699624960, 15455608832, 0, 0, 0], + "io_counters": [608010240, 3362816, 0, 0, 0], "key": "pid", - "memory_info": [524517376, 22345007104, 90595328, 618496, 0, 1481629696, 0], - "memory_percent": 6.693530134632704, - "name": "firefox", + "memory_info": [590098432, + 1221794549760, + 72073216, + 126423040, + 0, + 1257771008, + 0], + "memory_percent": 7.54257347055131, + "name": "code", "nice": 0, - "num_threads": 171, - "pid": 10541, + "num_threads": 15, + "pid": 35570, "status": "S", "time_since_update": 1, "username": "nicolargo"}, - {"cmdline": ["/snap/multipass/8465/usr/bin/qemu-system-x86_64", - "-bios", - "OVMF.fd", - "--enable-kvm", - "-cpu", - "host", - "-nic", - "tap,ifname=tap-1e376645a40,script=no,downscript=no,model=virtio-net-pci,mac=52:54:00:05:05:17", - "-device", - "virtio-scsi-pci,id=scsi0", - "-drive", - "file=/var/snap/multipass/common/data/multipassd/vault/instances/primary/ubuntu-22.04-server-cloudimg-amd64.img,if=none,format=qcow2,discard=unmap,id=hda", - "-device", - "scsi-hd,drive=hda,bus=scsi0.0", - "-smp", - "1", - "-m", - "1024M", - "-qmp", - "stdio", - "-chardev", - "null,id=char0", - "-serial", - "chardev:char0", - "-nographic", - "-cdrom", - "/var/snap/multipass/common/data/multipassd/vault/instances/primary/cloud-init-config.iso"], + {"cmdline": ["/usr/share/code/code", + "/home/nicolargo/.vscode/extensions/ms-python.vscode-pylance-2024.2.2/dist/server.bundle.js", + "--cancellationReceive=file:a926d4bb77e62306671377ffa0d7cb38591c07e817", + "--node-ipc", + "--clientProcessId=35618"], "cpu_percent": 0.0, - "cpu_times": [846.85, 90.96, 0.0, 0.0, 0.0], - "gids": [0, 0, 0], - "io_counters": [0, 0, 0, 0, 0], + "cpu_times": [4611.97, 204.93, 4.37, 0.34, 0.0], + "gids": [1000, 1000, 1000], + "io_counters": [672653312, 1871872, 0, 0, 0], "key": "pid", - "memory_info": [510238720, 3458437120, 2822144, 5304320, 0, 1366933504, 0], - "memory_percent": 6.511315743668364, - "name": "qemu-system-x86_64", + "memory_info": [487878656, + 1208849584128, + 22482944, + 126423040, + 0, + 867049472, + 0], + "memory_percent": 6.236011499169393, + "name": "code", "nice": 0, - "num_threads": 4, - "pid": 354319, + "num_threads": 13, + "pid": 36130, "status": "S", "time_since_update": 1, - "username": "root"}] + "username": "nicolargo"}] Get a specific field:: # curl http://localhost:61208/api/3/processlist/pid - {"pid": [10541, - 354319, - 10770, - 11043, - 374779, - 374071, - 3927, - 469948, - 374587, - 317865, - 10778, - 10774, - 429788, - 59195, - 469241, - 399766, - 430971, - 372037, - 11646, - 59069, - 374904, - 10733, - 480322, - 480143, - 480228, - 374842, - 435889, - 10790, - 59161, - 480580, - 59523, - 4243, - 421, - 480591, - 466459, - 374575, - 374705, - 3810, - 457618, - 466460, - 374905, - 372303, - 4385, - 165661, - 417207, - 463383, - 1618, - 1771, - 372048, - 372151, - 2398, - 372186, - 372172, - 59182, - 4339, - 374703, - 313257, - 2636, - 431242, - 374702, - 4023, - 4666, + {"pid": [35570, + 36130, + 7992, + 8257, + 35618, + 645109, + 8407, + 5554, + 654062, + 665779, + 385672, + 662277, + 654683, + 14040, + 35835, + 35502, + 644502, + 666300, + 8217, + 666454, + 666819, + 35537, + 35790, + 5406, + 35631, + 35957, + 667098, + 6163, + 36217, + 293224, + 32821, + 35632, + 667109, + 6332, + 2423, + 35857, + 8749, + 35996, + 3248, + 55881, + 265662, + 55878, + 4024, + 517283, + 640398, + 35546, + 420, + 35955, + 629519, + 5849, + 2621, + 640457, + 8604, + 104932, + 1645, + 293597, + 6341, + 6122, + 8189, + 640503, + 243963, + 36155, + 8156, + 1497, + 5306, + 35958, + 185654, + 185653, + 185679, + 35956, + 5998, + 5809, + 4301, 1, - 3730, - 4179, - 59663, - 1584, - 427863, - 4075, - 10710, - 17997, - 430855, - 4308, - 4091, - 1630, - 1605, - 4403, - 4000, - 4009, - 4090, - 3991, - 3719, - 11381, - 11380, - 1794, - 372168, - 431219, - 479905, - 372170, - 354726, - 4169, - 372169, - 4086, - 1727, - 4033, - 3745, - 4105, - 3901, - 3710, - 4442, - 3908, - 4046, - 4127, - 36919, - 1631, - 3743, - 14243, - 1583, + 5795, + 5988, + 1518, + 35369, + 5996, + 6640, + 1544, + 6291, + 1728, + 2129, + 6009, + 5840, + 5893, + 5611, + 4703, + 5649, + 5257, + 5522, + 6085, + 6028, + 35507, + 35506, + 640813, + 2543, + 1496, + 5994, + 32846, + 1729, + 31214, + 5325, + 1648, + 6022, + 1512, + 2363, + 1277, + 6001, + 6713, + 2586, + 6063, + 31232, + 5319, + 6080, + 5914, + 1479, + 182445, + 5989, + 2079, + 5329, + 5832, + 1532, + 1503, + 1545, + 6089, + 6305, + 48508, + 5558, + 6010, + 6107, + 6251, + 1520, + 4210, + 5643, + 1538, + 104945, + 5636, + 5993, + 8273, + 5793, + 5987, + 5631, + 5667, + 6017, + 6084, + 6002, + 5407, + 5676, + 6004, + 5412, + 3556, + 111079, + 5955, + 35523, + 1540, + 3557, + 4251, + 455, + 35387, + 1731, + 111058, + 5334, + 1487, + 5303, + 35509, + 111116, + 1526, + 5507, + 1492, + 5304, + 1527, + 5568, + 293566, + 1274, + 1504, + 1900, + 1495, + 1279, + 6317, + 36208, + 666856, + 2564, + 1607, + 4286, + 34330, + 1289, + 1288, + 4294, + 2375, + 3251, + 2565, + 1490, + 4136, + 3787, + 653392, + 293551, + 1480, + 1635, + 667097, 4302, - 3956, - 1379, - 418247, - 74953, - 4126, - 3748, - 3115, - 20173, - 14266, - 1591, - 4196, - 59126, - 2116, - 4005, - 1764, - 4316, - 4145, - 4097, - 4080, - 1627, - 2168, - 2607, - 1818, - 3989, - 1579, - 1628, - 3925, - 4079, - 4244, - 4157, - 3970, - 59127, - 2554, - 4099, - 1612, - 3819, - 1380, - 4078, - 10848, - 2341, - 1566, - 227509, - 1598, - 1624, - 4119, - 4074, - 3825, + 293512, 3947, - 4098, - 4062, - 3939, - 4107, - 3975, - 3753, - 3952, - 1575, - 1606, - 313277, - 461, - 354741, - 1593, - 480538, - 3934, - 3728, - 12480, - 3888, - 1616, - 59145, - 12489, - 1377, - 1582, - 18045, - 4332, - 1964, - 1825, - 3727, - 59130, - 1634, - 16182, - 1391, - 2361, - 2605, - 1577, - 3118, - 2604, - 1390, - 12483, - 1567, - 431184, - 20396, - 354739, - 431178, - 431203, - 20180, - 480579, - 431197, - 4072, - 2358, - 469137, - 3503, - 12492, - 1726, - 1725, - 3794, - 3498, - 3499, - 3720, - 20400, - 313283, - 2345, - 2382, - 4593, - 2360, - 1392, - 1637, - 3573, - 20185, + 4269, + 4200, + 293544, + 2384, + 5986, + 293491, + 5390, + 4272, + 4299, + 7895, + 1631, + 2398, + 2381, + 5258, + 1287, + 2407, + 3560, + 4304, + 1617, 2, 3, 4, @@ -957,169 +926,185 @@ Get a specific field:: 100, 101, 103, + 105, 106, - 107, - 109, + 108, 110, 112, + 115, + 116, 117, - 118, - 119, - 129, - 132, - 138, - 181, - 183, - 206, - 219, - 223, + 128, + 131, + 137, + 184, + 202, + 224, + 225, 226, + 227, 228, 231, 232, 233, - 234, - 249, - 250, - 255, - 256, - 313, + 239, + 247, + 248, + 253, + 254, + 311, + 360, 361, - 362, - 439, - 440, - 530, - 544, - 655, - 700, - 702, - 703, - 898, - 899, - 900, - 901, - 908, - 909, - 910, - 911, - 912, - 913, - 914, - 915, - 962, - 963, - 964, - 965, - 966, - 967, - 968, - 969, - 970, - 971, - 972, - 973, - 974, - 975, - 976, - 977, - 978, - 979, - 980, + 437, + 438, + 524, + 550, + 659, + 660, + 661, + 673, + 920, + 921, + 922, + 923, + 930, + 931, + 932, + 933, + 934, + 935, + 936, + 937, + 989, + 990, + 991, + 992, + 993, + 994, + 995, + 996, + 997, + 998, + 999, + 1000, 1001, 1002, - 1009, - 1010, - 1031, - 1032, - 1033, - 1034, - 1035, + 1003, + 1004, + 1005, + 1006, + 1007, + 1028, + 1029, 1036, 1037, - 2394, - 2410, - 2422, - 2491, - 2492, - 2493, - 2506, - 2508, - 2510, - 2515, - 2525, - 3988, - 12486, - 313404, - 354325, - 354329, - 417249, - 417250, - 417251, - 417252, - 417254, - 417255, - 417257, - 417258, - 417259, - 417260, - 417261, - 417262, - 417263, - 417264, - 417265, - 417266, - 417267, - 427608, - 427609, - 427611, - 454059, - 459092, - 463267, - 463268, - 463271, - 463272, - 463274, - 463320, - 467345, - 467496, - 468536, - 468902, - 469637, - 469929, - 470092, - 471704, - 476042, - 477638, - 478302, - 479060, - 479698, - 479767, - 480036, - 480278, - 480424, - 480454]} + 1058, + 1059, + 1060, + 1061, + 1062, + 1063, + 1064, + 2100, + 2101, + 2102, + 2103, + 2104, + 2107, + 2109, + 2110, + 2111, + 2112, + 2425, + 2529, + 2530, + 2531, + 2532, + 2533, + 2534, + 2535, + 2536, + 4058, + 5656, + 15197, + 19449, + 19450, + 72733, + 111072, + 629230, + 629231, + 629234, + 640161, + 640162, + 640165, + 640166, + 640169, + 640216, + 652755, + 654117, + 656184, + 658124, + 660421, + 660669, + 661136, + 662149, + 663088, + 663825, + 664298, + 664546, + 664862, + 664982, + 665624, + 666288, + 666401, + 667053]} Get a specific item when field matchs the given value:: - # curl http://localhost:61208/api/3/processlist/pid/10541 - {"10541": [{"cmdline": ["/snap/firefox/2605/usr/lib/firefox/firefox"], + # curl http://localhost:61208/api/3/processlist/pid/35570 + {"35570": [{"cmdline": ["/usr/share/code/code", + "--type=renderer", + "--crashpad-handler-pid=35523", + "--enable-crash-reporter=721e05a9-6035-4dcb-bd58-68097aa48dd0,no_channel", + "--user-data-dir=/home/nicolargo/.config/Code", + "--standard-schemes=vscode-webview,vscode-file", + "--enable-sandbox", + "--secure-schemes=vscode-webview,vscode-file", + "--cors-schemes=vscode-webview,vscode-file", + "--fetch-schemes=vscode-webview,vscode-file", + "--service-worker-schemes=vscode-webview", + "--code-cache-schemes=vscode-webview,vscode-file", + "--app-path=/usr/share/code/resources/app", + "--enable-sandbox", + "--enable-blink-features=HighlightAPI", + "--first-renderer-process", + "--lang=en-US", + "--num-raster-threads=2", + "--enable-main-frame-before-activation", + "--renderer-client-id=4", + "--time-ticks-at-unix-epoch=-1709539275787032", + "--launch-time-ticks=3773104105", + "--shared-files=v8_context_snapshot_data:100", + "--field-trial-handle=0,i,2992833077465328896,17440056338018087593,262144", + "--disable-features=CalculateNativeWinOcclusion,SpareRendererForSitePerProcess", + "--vscode-window-config=vscode:0a3f42ef-a12c-453d-8061-6c7b57ac6b4f"], "cpu_percent": 0.0, - "cpu_times": [16463.82, 5059.85, 11961.09, 1725.84, 0.0], + "cpu_times": [8788.45, 733.23, 0.0, 0.0, 0.0], "gids": [1000, 1000, 1000], - "io_counters": [9699624960, 15455608832, 0, 0, 0], + "io_counters": [608010240, 3362816, 0, 0, 0], "key": "pid", - "memory_info": [524517376, - 22345007104, - 90595328, - 618496, + "memory_info": [590098432, + 1221794549760, + 72073216, + 126423040, 0, - 1481629696, + 1257771008, 0], - "memory_percent": 6.693530134632704, - "name": "firefox", + "memory_percent": 7.54257347055131, + "name": "code", "nice": 0, - "num_threads": 171, - "pid": 10541, + "num_threads": 15, + "pid": 35570, "status": "S", "time_since_update": 1, "username": "nicolargo"}]} @@ -1130,7 +1115,7 @@ GET psutilversion Get plugin stats:: # curl http://localhost:61208/api/3/psutilversion - [5, 9, 5] + [5, 9, 8] GET quicklook ------------- @@ -1138,69 +1123,69 @@ GET quicklook Get plugin stats:: # curl http://localhost:61208/api/3/quicklook - {"cpu": 62.2, + {"cpu": 25.0, "cpu_hz": 2025000000.0, - "cpu_hz_current": 1273980750.0, + "cpu_hz_current": 1818595250.0, "cpu_name": "Intel(R) Core(TM) i7-4500U CPU @ 1.80GHz", - "mem": 75.0, + "mem": 77.2, "percpu": [{"cpu_number": 0, - "guest": 1.5, + "guest": 0.0, "guest_nice": 0.0, - "idle": 26.2, - "iowait": 1.5, + "idle": 84.3, + "iowait": 2.6, "irq": 0.0, "key": "cpu_number", "nice": 0.0, - "softirq": 0.0, + "softirq": 1.7, "steal": 0.0, - "system": 4.4, - "total": 73.8, - "user": 68.0}, + "system": 1.7, + "total": 15.7, + "user": 9.6}, {"cpu_number": 1, "guest": 0.0, "guest_nice": 0.0, - "idle": 39.4, - "iowait": 1.0, + "idle": 94.8, + "iowait": 0.9, "irq": 0.0, "key": "cpu_number", "nice": 0.0, "softirq": 0.0, "steal": 0.0, - "system": 4.8, - "total": 60.6, - "user": 54.8}, + "system": 0.9, + "total": 5.2, + "user": 3.4}, {"cpu_number": 2, - "guest": 0.5, + "guest": 0.0, "guest_nice": 0.0, - "idle": 36.0, - "iowait": 4.3, + "idle": 47.5, + "iowait": 5.8, "irq": 0.0, "key": "cpu_number", "nice": 0.0, - "softirq": 0.9, + "softirq": 0.0, "steal": 0.0, - "system": 9.5, - "total": 64.0, - "user": 49.3}, + "system": 4.2, + "total": 52.5, + "user": 42.5}, {"cpu_number": 3, - "guest": 2.8, + "guest": 0.0, "guest_nice": 0.0, - "idle": 36.6, - "iowait": 6.5, + "idle": 54.7, + "iowait": 9.4, "irq": 0.0, "key": "cpu_number", "nice": 0.0, "softirq": 0.0, "steal": 0.0, - "system": 12.5, - "total": 63.4, - "user": 44.4}], - "swap": 62.7} + "system": 6.0, + "total": 45.3, + "user": 29.9}], + "swap": 50.9} Get a specific field:: # curl http://localhost:61208/api/3/quicklook/cpu - {"cpu": 62.2} + {"cpu": 25.0} GET sensors ----------- @@ -1257,7 +1242,7 @@ Get plugin stats:: "hr_name": "Ubuntu 22.04 64bit", "linux_distro": "Ubuntu 22.04", "os_name": "Linux", - "os_version": "5.15.0-71-generic", + "os_version": "5.15.0-94-generic", "platform": "64bit"} Get a specific field:: @@ -1271,7 +1256,7 @@ GET uptime Get plugin stats:: # curl http://localhost:61208/api/3/uptime - "12 days, 3:42:29" + "19 days, 1:09:46" GET all stats ------------- @@ -1287,33 +1272,33 @@ GET stats history History of a plugin:: # curl http://localhost:61208/api/3/cpu/history - {"system": [["2023-05-20T16:44:17.685943", 7.7], - ["2023-05-20T16:44:18.817737", 7.7], - ["2023-05-20T16:44:19.996995", 1.1]], - "user": [["2023-05-20T16:44:17.685935", 50.0], - ["2023-05-20T16:44:18.817731", 50.0], - ["2023-05-20T16:44:19.996988", 4.3]]} + {"system": [["2024-03-23T10:10:29.601235", 4.3], + ["2024-03-23T10:10:30.667810", 4.3], + ["2024-03-23T10:10:31.828837", 2.9]], + "user": [["2024-03-23T10:10:29.601227", 22.6], + ["2024-03-23T10:10:30.667804", 22.6], + ["2024-03-23T10:10:31.828831", 5.3]]} Limit history to last 2 values:: # curl http://localhost:61208/api/3/cpu/history/2 - {"system": [["2023-05-20T16:44:18.817737", 7.7], - ["2023-05-20T16:44:19.996995", 1.1]], - "user": [["2023-05-20T16:44:18.817731", 50.0], - ["2023-05-20T16:44:19.996988", 4.3]]} + {"system": [["2024-03-23T10:10:30.667810", 4.3], + ["2024-03-23T10:10:31.828837", 2.9]], + "user": [["2024-03-23T10:10:30.667804", 22.6], + ["2024-03-23T10:10:31.828831", 5.3]]} History for a specific field:: # curl http://localhost:61208/api/3/cpu/system/history - {"system": [["2023-05-20T16:44:17.685943", 7.7], - ["2023-05-20T16:44:18.817737", 7.7], - ["2023-05-20T16:44:19.996995", 1.1]]} + {"system": [["2024-03-23T10:10:29.601235", 4.3], + ["2024-03-23T10:10:30.667810", 4.3], + ["2024-03-23T10:10:31.828837", 2.9]]} Limit history for a specific field to last 2 values:: # curl http://localhost:61208/api/3/cpu/system/history - {"system": [["2023-05-20T16:44:18.817737", 7.7], - ["2023-05-20T16:44:19.996995", 1.1]]} + {"system": [["2024-03-23T10:10:30.667810", 4.3], + ["2024-03-23T10:10:31.828837", 2.9]]} GET limits (used for thresholds) -------------------------------- @@ -1395,6 +1380,7 @@ All limits/thresholds:: "memswap_warning": 70.0}, "network": {"history_size": 1200.0, "network_disable": ["False"], + "network_hide": ["docker.*", "lo"], "network_rx_careful": 70.0, "network_rx_critical": 90.0, "network_rx_warning": 80.0, -- cgit v1.2.3