summaryrefslogtreecommitdiffstats
path: root/docs/api.rst
diff options
context:
space:
mode:
Diffstat (limited to 'docs/api.rst')
-rw-r--r--docs/api.rst1981
1 files changed, 1053 insertions, 928 deletions
diff --git a/docs/api.rst b/docs/api.rst
index cf45dc46..d449bf4b 100644
--- a/docs/api.rst
+++ b/docs/api.rst
@@ -20,7 +20,7 @@ It will return nothing but a 200 return code if everythin is OK.
Get the Rest API status::
# curl -I http://localhost:61208/api/3/status
- 'HTTP/1.0 200 OK'
+ "HTTP/1.0 200 OK"
GET plugins list
----------------
@@ -28,56 +28,37 @@ GET plugins list
Get the plugins list::
# curl http://localhost:61208/api/3/pluginslist
- ['alert',
- 'amps',
- 'cloud',
- 'connections',
- 'core',
- 'cpu',
- 'diskio',
- 'docker',
- 'folders',
- 'fs',
- 'gpu',
- 'help',
- 'ip',
- 'irq',
- 'load',
- 'mem',
- 'memswap',
- 'network',
- 'now',
- 'percpu',
- 'ports',
- 'processcount',
- 'processlist',
- 'psutilversion',
- 'quicklook',
- 'raid',
- 'sensors',
- 'smart',
- 'system',
- 'uptime',
- 'wifi']
-
-GET alert
----------
-
-Get plugin stats::
-
- # curl http://localhost:61208/api/3/alert
- [[1649600032.0,
- -1,
- 'WARNING',
- 'MEM',
- 87.2703077870435,
- 87.2703077870435,
- 87.2703077870435,
- 87.2703077870435,
- 1,
- [],
- '',
- 'memory_percent']]
+ ["alert",
+ "amps",
+ "cloud",
+ "connections",
+ "containers",
+ "core",
+ "cpu",
+ "diskio",
+ "folders",
+ "fs",
+ "gpu",
+ "help",
+ "ip",
+ "irq",
+ "load",
+ "mem",
+ "memswap",
+ "network",
+ "now",
+ "percpu",
+ "ports",
+ "processcount",
+ "processlist",
+ "psutilversion",
+ "quicklook",
+ "raid",
+ "sensors",
+ "smart",
+ "system",
+ "uptime",
+ "wifi"]
GET amps
--------
@@ -85,42 +66,127 @@ GET amps
Get plugin stats::
# curl http://localhost:61208/api/3/amps
- [{'count': 0,
- 'countmax': None,
- 'countmin': 1.0,
- 'key': 'name',
- 'name': 'Dropbox',
- 'refresh': 3.0,
- 'regex': True,
- 'result': None,
- 'timer': 0.14095854759216309},
- {'count': 0,
- 'countmax': 20.0,
- 'countmin': None,
- 'key': 'name',
- 'name': 'Python',
- 'refresh': 3.0,
- 'regex': True,
- 'result': None,
- 'timer': 0.14076852798461914}]
+ [{"count": 0,
+ "countmax": None,
+ "countmin": 1.0,
+ "key": "name",
+ "name": "Dropbox",
+ "refresh": 3.0,
+ "regex": True,
+ "result": None,
+ "timer": 1.3811793327331543},
+ "timer": 1.0034148693084717},
+ {"count": 0,
+ "countmax": 20.0,
+ "countmin": None,
+ "key": "name",
+ "name": "Python",
+ "refresh": 3.0,
+ "regex": True,
+ "result": None,
+ "timer": 1.3809046745300293}]
+ "timer": 1.003244400024414}]
Get a specific field::
# curl http://localhost:61208/api/3/amps/name
- {'name': ['Dropbox', 'Python', 'Conntrack', 'Nginx', 'Systemd', 'SystemV']}
+ {"name": ["Dropbox", "Python", "Conntrack", "Nginx", "Systemd", "SystemV"]}
Get a specific item when field matchs the given value::
# curl http://localhost:61208/api/3/amps/name/Dropbox
- {'Dropbox': [{'count': 0,
- 'countmax': None,
- 'countmin': 1.0,
- 'key': 'name',
- 'name': 'Dropbox',
- 'refresh': 3.0,
- 'regex': True,
- 'result': None,
- 'timer': 0.14095854759216309}]}
+ {"Dropbox": [{"count": 0,
+ "countmax": None,
+ "countmin": 1.0,
+ "key": "name",
+ "name": "Dropbox",
+ "refresh": 3.0,
+ "regex": True,
+ "result": None,
+ "timer": 1.0034148693084717}]}
+
+GET connections
+---------------
+
+Get plugin stats::
+
+ # curl http://localhost:61208/api/3/connections
+ {"net_connections_enabled": True, "nf_conntrack_enabled": True}
+
+Get a specific field::
+
+ # curl http://localhost:61208/api/3/connections/net_connections_enabled
+ {"net_connections_enabled": True}
+
+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": 7.811242562687869e-07},
+ "cpu_percent": 7.811242562687869e-07,
+ "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": 1576960.0},
+ "memory_usage": 1576960.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.630294095569028e-10},
+ "cpu_percent": 2.630294095569028e-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": 454656.0},
+ "memory_usage": 454656.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"],
+ "Created": "2022-10-29T14:59:10.266701439Z",
+ "Id": "3abd51c615968482d9ccff5afc629f267f6dda113ed68b75b432615fae3b49fb",
+ "Image": ["portainer/portainer-ce:2.9.3"],
+ "Status": "running",
+ "Uptime": "3 days",
+ "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
--------
@@ -128,7 +194,7 @@ GET core
Get plugin stats::
# curl http://localhost:61208/api/3/core
- {'log': 4, 'phys': 2}
+ {"log": 4, "phys": 2}
Fields descriptions:
@@ -138,7 +204,7 @@ Fields descriptions:
Get a specific field::
# curl http://localhost:61208/api/3/core/phys
- {'phys': 2}
+ {"phys": 2}
GET cpu
-------
@@ -146,23 +212,23 @@ GET cpu
Get plugin stats::
# curl http://localhost:61208/api/3/cpu
- {'cpucore': 4,
- 'ctx_switches': 0,
- 'guest': 0.0,
- 'guest_nice': 0.0,
- 'idle': 59.6,
- 'interrupts': 0,
- 'iowait': 0.2,
- 'irq': 0.0,
- 'nice': 0.7,
- 'soft_interrupts': 0,
- 'softirq': 0.9,
- 'steal': 0.0,
- 'syscalls': 0,
- 'system': 10.1,
- 'time_since_update': 1,
- 'total': 38.8,
- 'user': 28.5}
+ {"cpucore": 4,
+ "ctx_switches": 0,
+ "guest": 0.0,
+ "guest_nice": 0.0,
+ "idle": 73.0,
+ "interrupts": 0,
+ "iowait": 0.2,
+ "irq": 0.0,
+ "nice": 0.0,
+ "soft_interrupts": 0,
+ "softirq": 0.4,
+ "steal": 0.0,
+ "syscalls": 0,
+ "system": 4.1,
+ "time_since_update": 1,
+ "total": 27.4,
+ "user": 22.7}
Fields descriptions:
@@ -170,6 +236,7 @@ Fields descriptions:
* **system**: percent time spent in kernel space. System CPU time is the time spent running code in the Operating System kernel (unit is *percent*)
* **user**: CPU percent time spent in user space. User CPU time is the time spent on the processor running your program's code (or code in libraries) (unit is *percent*)
* **iowait**: *(Linux)*: percent time spent by the CPU waiting for I/O operations to complete (unit is *percent*)
+* **dpc**: *(Windows)*: time spent servicing deferred procedure calls (DPCs) (unit is *percent*)
* **idle**: percent of CPU used by any program. Every program or task that runs on a computer system occupies a certain amount of processing time on the CPU. If the CPU has completed all tasks it is idle (unit is *percent*)
* **irq**: *(Linux and BSD)*: percent time spent servicing/handling hardware/software interrupts. Time servicing interrupts (hardware + software) (unit is *percent*)
* **nice**: *(Unix)*: percent time occupied by user level processes with a positive nice value. The time the CPU has spent running users' processes that have been *niced* (unit is *percent*)
@@ -184,7 +251,7 @@ Fields descriptions:
Get a specific field::
# curl http://localhost:61208/api/3/cpu/total
- {'total': 38.8}
+ {"total": 27.4}
GET diskio
----------
@@ -192,36 +259,36 @@ GET diskio
Get plugin stats::
# curl http://localhost:61208/api/3/diskio
- [{'disk_name': 'sda',
- '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',
- 'read_bytes': 0,
- 'read_count': 0,
- 'time_since_update': 1,
- 'write_bytes': 0,
- 'write_count': 0}]
+ [{"disk_name": "sda",
+ "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",
+ "read_bytes": 0,
+ "read_count": 0,
+ "time_since_update": 1,
+ "write_bytes": 0,
+ "write_count": 0}]
Get a specific field::
# curl http://localhost:61208/api/3/diskio/disk_name
- {'disk_name': ['sda', 'sda1', 'sda2', 'sda5', 'dm-0', 'dm-1']}
+ {"disk_name": ["sda", "sda1", "sda2", "sda5", "dm-0", "dm-1"]}
Get a specific item when field matchs the given value::
# curl http://localhost:61208/api/3/diskio/disk_name/sda
- {'sda': [{'disk_name': 'sda',
- 'key': 'disk_name',
- 'read_bytes': 0,
- 'read_count': 0,
- 'time_since_update': 1,
- 'write_bytes': 0,
- 'write_count': 0}]}
+ {"sda": [{"disk_name": "sda",
+ "key": "disk_name",
+ "read_bytes": 0,
+ "read_count": 0,
+ "time_since_update": 1,
+ "write_bytes": 0,
+ "write_count": 0}]}
GET fs
------
@@ -229,31 +296,39 @@ GET fs
Get plugin stats::
# curl http://localhost:61208/api/3/fs
- [{'device_name': '/dev/mapper/ubuntu--gnome--vg-root',
- 'free': 79632797696,
- 'fs_type': 'ext4',
- 'key': 'mnt_point',
- 'mnt_point': '/',
- 'percent': 65.5,
- 'size': 243396149248,
- 'used': 151375896576}]
+ [{"device_name": "/dev/mapper/ubuntu--gnome--vg-root",
+ "free": 7953657856,
+ "fs_type": "ext4",
+ "key": "mnt_point",
+ "mnt_point": "/",
+ "percent": 96.6,
+ "size": 243334156288,
+ "used": 222993043456},
+ {"device_name": "zsfpool",
+ "free": 41811968,
+ "fs_type": "zfs",
+ "key": "mnt_point",
+ "mnt_point": "/zsfpool",
+ "percent": 0.3,
+ "size": 41943040,
+ "used": 131072}]
Get a specific field::
# curl http://localhost:61208/api/3/fs/mnt_point
- {'mnt_point': ['/']}
+ {"mnt_point": ["/", "/zsfpool", "/var/snap/firefox/common/host-hunspell"]}
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': 79632797696,
- 'fs_type': 'ext4',
- 'key': 'mnt_point',
- 'mnt_point': '/',
- 'percent': 65.5,
- 'size': 243396149248,
- 'used': 151375896576}]}
+ {"/": [{"device_name": "/dev/mapper/ubuntu--gnome--vg-root",
+ "free": 7953657856,
+ "fs_type": "ext4",
+ "key": "mnt_point",
+ "mnt_point": "/",
+ "percent": 96.6,
+ "size": 243334156288,
+ "used": 222993043456}]}
GET ip
------
@@ -261,16 +336,17 @@ GET ip
Get plugin stats::
# curl http://localhost:61208/api/3/ip
- {'address': '192.168.0.49',
- 'gateway': '192.168.0.254',
- 'mask': '255.255.255.0',
- 'mask_cidr': 24,
- 'public_address': '88.165.169.242'}
+ {"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/address
- {'address': '192.168.0.49'}
+ # curl http://localhost:61208/api/3/ip/gateway
+ {"gateway": "192.168.1.1"}
GET load
--------
@@ -278,7 +354,10 @@ GET load
Get plugin stats::
# curl http://localhost:61208/api/3/load
- {'cpucore': 4, 'min1': 1.76, 'min15': 1.61, 'min5': 1.69}
+ {"cpucore": 4,
+ "min1": 0.55029296875,
+ "min15": 1.06982421875,
+ "min5": 0.85693359375}
Fields descriptions:
@@ -290,7 +369,7 @@ Fields descriptions:
Get a specific field::
# curl http://localhost:61208/api/3/load/min1
- {'min1': 1.76}
+ {"min1": 0.55029296875}
GET mem
-------
@@ -298,16 +377,16 @@ GET mem
Get plugin stats::
# curl http://localhost:61208/api/3/mem
- {'active': 3452456960,
- 'available': 999153664,
- 'buffers': 112189440,
- 'cached': 1540894720,
- 'free': 999153664,
- 'inactive': 1303179264,
- 'percent': 87.3,
- 'shared': 497025024,
- 'total': 7849000960,
- 'used': 6849847296}
+ {"active": 3109634048,
+ "available": 2829815808,
+ "buffers": 207228928,
+ "cached": 3178246144,
+ "free": 2829815808,
+ "inactive": 3462545408,
+ "percent": 63.9,
+ "shared": 451821568,
+ "total": 7836184576,
+ "used": 5006368768}
Fields descriptions:
@@ -326,7 +405,7 @@ Fields descriptions:
Get a specific field::
# curl http://localhost:61208/api/3/mem/total
- {'total': 7849000960}
+ {"total": 7836184576}
GET memswap
-----------
@@ -334,13 +413,13 @@ GET memswap
Get plugin stats::
# curl http://localhost:61208/api/3/memswap
- {'free': 7769960448,
- 'percent': 3.9,
- 'sin': 21983232,
- 'sout': 333402112,
- 'time_since_update': 1,
- 'total': 8082419712,
- 'used': 312459264}
+ {"free": 5400473600,
+ "percent": 33.2,
+ "sin": 2319233024,
+ "sout": 4863959040,
+ "time_since_update": 1,
+ "total": 8082419712,
+ "used": 2681946112}
Fields descriptions:
@@ -355,7 +434,7 @@ Fields descriptions:
Get a specific field::
# curl http://localhost:61208/api/3/memswap/total
- {'total': 8082419712}
+ {"total": 8082419712}
GET network
-----------
@@ -363,30 +442,30 @@ GET network
Get plugin stats::
# curl http://localhost:61208/api/3/network
- [{'alias': None,
- 'cumulative_cx': 243100,
- 'cumulative_rx': 6357,
- 'cumulative_tx': 236743,
- 'cx': 0,
- 'interface_name': 'docker0',
- 'is_up': False,
- 'key': 'interface_name',
- 'rx': 0,
- 'speed': 0,
- 'time_since_update': 1,
- 'tx': 0},
- {'alias': None,
- 'cumulative_cx': 183333,
- 'cumulative_rx': 0,
- 'cumulative_tx': 183333,
- 'cx': 0,
- 'interface_name': 'vboxnet0',
- 'is_up': True,
- 'key': 'interface_name',
- 'rx': 0,
- 'speed': 10485760,
- 'time_since_update': 1,
- 'tx': 0}]
+ [{"alias": None,
+ "cumulative_cx": 130574070,
+ "cumulative_rx": 65287035,
+ "cumulative_tx": 65287035,
+ "cx": 2414,
+ "interface_name": "lo",
+ "is_up": True,
+ "key": "interface_name",
+ "rx": 1207,
+ "speed": 0,
+ "time_since_update": 1,
+ "tx": 1207},
+ {"alias": None,
+ "cumulative_cx": 8162673663,
+ "cumulative_rx": 7914211852,
+ "cumulative_tx": 248461811,
+ "cx": 17399,
+ "interface_name": "wlp2s0",
+ "is_up": True,
+ "key": "interface_name",
+ "rx": 13173,
+ "speed": 0,
+ "time_since_update": 1,
+ "tx": 4226}]
Fields descriptions:
@@ -394,8 +473,10 @@ Fields descriptions:
* **alias**: Interface alias name (optional) (unit is *string*)
* **rx**: The received/input rate (in bit per second) (unit is *bps*)
* **tx**: The sent/output rate (in bit per second) (unit is *bps*)
+* **cx**: The cumulative received+sent rate (in bit per second) (unit is *bps*)
* **cumulative_rx**: The number of bytes received through the interface (cumulative) (unit is *bytes*)
* **cumulative_tx**: The number of bytes sent through the interface (cumulative) (unit is *bytes*)
+* **cumulative_cx**: The cumulative number of bytes reveived and sent through the interface (cumulative) (unit is *bytes*)
* **speed**: Maximum interface speed (in bit per second). Can return 0 on some operating-system (unit is *bps*)
* **is_up**: Is the interface up ? (unit is *bool*)
* **time_since_update**: Number of seconds since last update (unit is *seconds*)
@@ -403,30 +484,28 @@ Fields descriptions:
Get a specific field::
# curl http://localhost:61208/api/3/network/interface_name
- {'interface_name': ['docker0',
- 'vboxnet0',
- 'br-87386b77b676',
- 'lo',
- 'br-119e6ee04e05',
- 'br_grafana',
- 'mpqemubr0',
- 'wlp2s0']}
+ {"interface_name": ["lo",
+ "wlp2s0",
+ "docker0",
+ "br_grafana",
+ "mpqemubr0",
+ "vethcddb0e6"]}
Get a specific item when field matchs the given value::
- # curl http://localhost:61208/api/3/network/interface_name/docker0
- {'docker0': [{'alias': None,
- 'cumulative_cx': 243100,
- 'cumulative_rx': 6357,
- 'cumulative_tx': 236743,
- 'cx': 0,
- 'interface_name': 'docker0',
- 'is_up': False,
- 'key': 'interface_name',
- 'rx': 0,
- 'speed': 0,
- 'time_since_update': 1,
- 'tx': 0}]}
+ # curl http://localhost:61208/api/3/network/interface_name/lo
+ {"lo": [{"alias": None,
+ "cumulative_cx": 130574070,
+ "cumulative_rx": 65287035,
+ "cumulative_tx": 65287035,
+ "cx": 2414,
+ "interface_name": "lo",
+ "is_up": True,
+ "key": "interface_name",
+ "rx": 1207,
+ "speed": 0,
+ "time_since_update": 1,
+ "tx": 1207}]}
GET now
-------
@@ -434,7 +513,7 @@ GET now
Get plugin stats::
# curl http://localhost:61208/api/3/now
- '2022-04-10 16:13:52 CEST'
+ "2023-05-16 09:31:49 CEST"
GET percpu
----------
@@ -442,37 +521,37 @@ GET percpu
Get plugin stats::
# curl http://localhost:61208/api/3/percpu
- [{'cpu_number': 0,
- 'guest': 0.0,
- 'guest_nice': 0.0,
- 'idle': 78.0,
- 'iowait': 0.0,
- 'irq': 0.0,
- 'key': 'cpu_number',
- 'nice': 1.0,
- 'softirq': 0.0,
- 'steal': 0.0,
- 'system': 9.0,
- 'total': 22.0,
- 'user': 9.0},
- {'cpu_number': 1,
- 'guest': 0.0,
- 'guest_nice': 0.0,
- 'idle': 55.0,
- 'iowait': 0.0,
- 'irq': 0.0,
- 'key': 'cpu_number',
- 'nice': 1.0,
- 'softirq': 2.0,
- 'steal': 0.0,
- 'system': 7.0,
- 'total': 45.0,
- 'user': 32.0}]
+ [{"cpu_number": 0,
+ "guest": 0.0,
+ "guest_nice": 0.0,
+ "idle": 19.8,
+ "iowait": 0.0,
+ "irq": 0.0,
+ "key": "cpu_number",
+ "nice": 0.0,
+ "softirq": 0.0,
+ "steal": 0.0,
+ "system": 3.4,
+ "total": 80.2,
+ "user": 76.7},
+ {"cpu_number": 1,
+ "guest": 0.0,
+ "guest_nice": 0.0,
+ "idle": 91.2,
+ "iowait": 0.0,
+ "irq": 0.0,
+ "key": "cpu_number",
+ "nice": 0.0,
+ "softirq": 0.0,
+ "steal": 0.0,
+ "system": 2.7,
+ "total": 8.8,
+ "user": 6.2}]
Get a specific field::
# curl http://localhost:61208/api/3/percpu/cpu_number
- {'cpu_number': [0, 1, 2, 3]}
+ {"cpu_number": [0, 1, 2, 3]}
GET ports
---------
@@ -480,31 +559,31 @@ GET ports
Get plugin stats::
# curl http://localhost:61208/api/3/ports
- [{'description': 'DefaultGateway',
- 'host': '192.168.0.254',
- 'indice': 'port_0',
- 'port': 0,
- 'refresh': 30,
- 'rtt_warning': None,
- 'status': 0.007151,
- 'timeout': 3}]
+ [{"description": "DefaultGateway",
+ "host": "192.168.1.1",
+ "indice": "port_0",
+ "port": 0,
+ "refresh": 30,
+ "rtt_warning": None,
+ "status": 0.005767,
+ "timeout": 3}]
Get a specific field::
# curl http://localhost:61208/api/3/ports/host
- {'host': ['192.168.0.254']}
+ {"host": ["192.168.1.1"]}
Get a specific item when field matchs the given value::
- # curl http://localhost:61208/api/3/ports/host/192.168.0.254
- {'192.168.0.254': [{'description': 'DefaultGateway',
- 'host': '192.168.0.254',
- 'indice': 'port_0',
- 'port': 0,
- 'refresh': 30,
- 'rtt_warning': None,
- 'status': 0.007151,
- 'timeout': 3}]}
+ # 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.005767,
+ "timeout": 3}]}
GET processcount
----------------
@@ -512,12 +591,12 @@ GET processcount
Get plugin stats::
# curl http://localhost:61208/api/3/processcount
- {'pid_max': 0, 'running': 1, 'sleeping': 261, 'thread': 1317, 'total': 319}
+ {"pid_max": 0, "running": 1, "sleeping": 315, "thread": 1562, "total": 382}
Get a specific field::
# curl http://localhost:61208/api/3/processcount/total
- {'total': 319}
+ {"total": 382}
GET processlist
---------------
@@ -525,238 +604,273 @@ GET processlist
Get plugin stats::
# curl http://localhost:61208/api/3/processlist
- [{'cmdline': ['/usr/lib/virtualbox/VBoxHeadless',
- '--comment',
- 'minikube',
- '--startvm',
- '74869efd-ada3-41eb-98e3-b7d2901c8e39',
- '--vrde',
- 'config'],
- 'cpu_percent': 0.0,
- 'cpu_times': pcputimes(user=128.45, system=1415.02, children_user=0.0, children_system=0.0, iowait=0.0),
- 'gids': pgids(real=1000, effective=1000, saved=1000),
- 'io_counters': [0, 0, 0, 0, 0],
- 'key': 'pid',
- 'memory_info': pmem(rss=963088384, vms=4204658688, shared=924651520, text=53248, lib=0, data=98004992, dirty=0),
- 'memory_percent': 12.270203417072839,
- 'name': 'VBoxHeadless',
- 'nice': 0,
- 'num_threads': 28,
- 'pid': 9872,
- 'ppid': 9690,
- 'status': 'S',
- 'time_since_update': 1,
- 'username': 'nicolargo'},
- {'cmdline': ['/usr/lib/firefox/firefox',
- '-contentproc',
- '-childID',
- '4',
- '-isForBrowser',
- '-prefsLen',
- '4855',
- '-prefMapSize',
- '253021',
- '-jsInitLen',
- '278884',
- '-parentBuildID',
- '20211215221728',
- '-appDir',
- '/usr/lib/firefox/browser',
- '4964',
- 'true',
- 'tab'],
- 'cpu_percent': 0.0,
- 'cpu_times': pcputimes(user=157.91, system=26.98, children_user=0.0, children_system=0.0, iowait=0.03),
- 'gids': pgids(real=1000, effective=1000, saved=1000),
- 'io_counters': [9154560, 0, 0, 0, 0],
- 'key': 'pid',
- 'memory_info': pmem(rss=413597696, vms=3211755520, shared=44220416, text=643072, lib=0, data=648302592, dirty=0),
- 'memory_percent': 5.269431079289866,
- 'name': 'WebExtensions',
- 'nice': 0,
- 'num_threads': 21,
- 'pid': 5235,
- 'ppid': 4964,
- 'status': 'S',
- 'time_since_update': 1,
- 'username': 'nicolargo'}]
+ [{"cmdline": ["/snap/firefox/2605/usr/lib/firefox/firefox"],
+ "cpu_percent": 0.0,
+ "cpu_times": [5239.7, 1595.52, 4093.05, 570.73, 0.0],
+ "gids": [1000, 1000, 1000],
+ "io_counters": [3503764480, 5856641024, 0, 0, 0],
+ "key": "pid",
+ "memory_info": [468434944, 22123225088, 114802688, 618496, 0, 1282670592, 0],
+ "memory_percent": 5.977844695423366,
+ "name": "firefox",
+ "nice": 0,
+ "num_threads": 160,
+ "pid": 10541,
+ "status": "S",
+ "time_since_update": 1,
+ "username": "nicolargo"},
+ {"cmdline": ["/snap/firefox/2605/usr/lib/firefox/firefox",
+ "-contentproc",
+ "-childID",
+ "6",
+ "-isForBrowser",
+ "-prefsLen",
+ "38436",
+ "-prefMapSize",
+ "241898",
+ "-jsInitLen",
+ "240056",
+ "-parentBuildID",
+ "20230424185118",
+ "-appDir",
+ "/snap/firefox/2605/usr/lib/firefox/browser",
+ "{c94b5dea-52c6-4c75-a314-5de48bda9cdc}",
+ "10541",
+ "true",
+ "tab"],
+ "cpu_percent": 0.0,
+ "cpu_times": [914.43, 104.03, 0.0, 0.0, 0.0],
+ "gids": [1000, 1000, 1000],
+ "io_counters": [131410944, 0, 0, 0, 0],
+ "key": "pid",
+ "memory_info": [438992896, 3601903616, 70893568, 618496, 0, 1002868736, 0],
+ "memory_percent": 5.602125520939235,
+ "name": "WebExtensions",
+ "nice": 0,
+ "num_threads": 20,
+ "pid": 11043,
+ "status": "S",
+ "time_since_update": 1,
+ "username": "nicolargo"}]
Get a specific field::
# curl http://localhost:61208/api/3/processlist/pid
- {'pid': [9872,
- 5235,
- 4964,
- 16062,
- 5294,
- 5305,
- 16229,
- 15998,
- 5894,
- 4033,
- 15053,
- 20039,
- 20161,
- 15933,
- 16038,
- 15966,
- 5060,
- 20727,
- 20793,
- 20685,
- 5648,
- 8850,
- 16111,
- 16075,
- 2185,
- 22482,
- 3875,
- 2233,
- 15983,
- 22458,
- 3789,
- 16242,
- 3846,
- 2410,
- 7066,
- 5563,
- 15938,
- 1332,
- 15937,
- 5595,
- 4119,
- 14247,
- 14256,
- 9690,
- 349,
- 1160,
- 3787,
- 4305,
- 4193,
- 4094,
- 2380,
- 4187,
- 1315,
- 2197,
- 1320,
- 4192,
+ {"pid": [10541,
+ 11043,
+ 10770,
+ 55857,
+ 10778,
+ 181461,
+ 59195,
+ 3927,
+ 60503,
+ 10774,
+ 59454,
+ 195248,
+ 228679,
+ 165661,
+ 10790,
+ 4288,
+ 11646,
+ 10733,
+ 59069,
+ 229507,
+ 229901,
+ 229717,
+ 421,
+ 59523,
+ 59161,
+ 60232,
+ 60489,
+ 230002,
+ 2398,
+ 230013,
+ 60104,
+ 3810,
+ 60106,
+ 195141,
+ 59525,
+ 4243,
+ 60134,
+ 11381,
+ 10710,
+ 11380,
+ 4385,
+ 1618,
+ 59663,
+ 143262,
+ 143263,
+ 193297,
+ 193376,
+ 59182,
+ 2636,
+ 1771,
+ 4023,
+ 3730,
+ 60191,
+ 4666,
+ 60192,
1,
- 4088,
- 1173,
- 1175,
- 4627,
- 1199,
- 5024,
- 3531,
- 9684,
- 4062,
- 2189,
- 4130,
- 2386,
- 10484,
- 4191,
- 14266,
- 4232,
- 3777,
- 4019,
- 4194,
- 4213,
- 4589,
- 4167,
- 14265,
- 15940,
- 1039,
- 4308,
+ 193364,
1584,
- 4188,
- 4105,
- 4198,
- 4064,
- 3762,
- 1326,
- 3824,
- 1196,
- 1365,
- 4057,
- 3831,
- 1142,
- 3900,
- 1158,
- 3813,
- 4276,
- 4203,
- 9177,
- 16135,
- 8860,
- 1201,
- 1195,
- 2384,
- 3797,
- 4190,
- 4209,
- 1166,
- 3855,
- 3872,
- 2385,
- 1192,
- 4068,
- 4079,
- 4102,
- 4229,
+ 227509,
+ 56140,
+ 17997,
4179,
- 3988,
- 4186,
- 4061,
- 3791,
- 4600,
- 3536,
- 1186,
-