Ubuntu Apache2監控可通過以下方式實現:
tail -f /var/log/apache2/access.log和tail -f /var/log/apache2/error.log實時查看訪問和錯誤日志,或用awk、grep等工具分析日志內容。mod_status模塊(編輯/etc/apache2/apache2.conf,添加LoadModule status_module等配置并重啟Apache),通過http://服務器IP/server-status查看狀態頁面。top、htop、vmstat、iostat、sar、dstat、glances等命令監控CPU、內存、磁盤等系統資源使用情況。