Junior — Middle
What metrics did you use to assess the system's state during monitoring?
sobes.tech AI
Answer from AI
The following metrics are typically used to assess the system's condition during monitoring:
- CPU usage — shows how loaded the processor is, helps identify overloads.
- Memory usage (RAM) — allows tracking whether there is enough RAM and if there are leaks.
- Disk usage (Disk I/O, free space) — important for performance assessment and preventing overflow.
- Network traffic (Network throughput, errors) — helps monitor network delays and packet loss.
- Application response time (Latency) — a key indicator of user experience.
- Error and warning logs — for identifying failures and issues.
In Python, monitoring can be performed using libraries such as psutil:
import psutil
cpu_percent = psutil.cpu_percent(interval=1)
memory = psutil.virtual_memory()
disk = psutil.disk_usage('/')
print(f"CPU: {cpu_percent}%")
print(f"Memory: {memory.percent}% used")
print(f"Disk: {disk.percent}% used")
These metrics help detect problems promptly and ensure system stability.