Junior — Middle
What methods can be used to monitor and check the status of Linux server resources?
sobes.tech AI
Answer from AI
The following methods are used for monitoring and checking the status of Linux server resources:
-
Command-line utilities:
top,htop— view CPU load, memory, processes.free— memory information.df— disk space usage.iostat— disk statistics.vmstat— overall system statistics.netstatorss— network connection status.
-
System logs: viewing through
journalctlor files in/var/log/to identify errors and warnings. -
Monitoring systems:
- Prometheus + Grafana — collection and visualization of metrics.
- Zabbix, Nagios — comprehensive monitoring with alerts.
-
Automated scripts: periodic checks of service status, resources, and sending notifications.
-
Using system daemons: systemd provides commands like
systemctl statusto check service status.
Example of checking CPU load and memory:
top -b -n1 | head -15
free -h
Thus, monitoring is a combination of tools for collecting, analyzing, and alerting about the system's state.