systemctl status httpd
● httpd.service - The Apache HTTP Server
Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled; vendor preset: disabled)
Active: active (running) since Fri 2019-10-11 00:35:58 EEST; 1 weeks 3 days ago
Docs: man:httpd(8)
man:apachectl(8)
Process: 29728 ExecReload=/usr/sbin/httpd $OPTIONS -k graceful (code=exited, status=0/SUCCESS)
Main PID: 10722 (httpd)
Status: "Total requests: 0; Current requests/sec: 0; Current traffic: 0 B/sec"
Memory: 8.7M
줄 아래에 호스트 이름을 인쇄하고 싶습니다.
Active: active (running) since Fri 2019-10-11 00:35:58 EEST; 1 weeks 3 days ago
답변1
systemctl --no-pager status httpd | grep Active
원하는 출력을 반환해야 합니다.