centos7.9怎么查看logrotate服务是否开启
时间: 2023-08-10 20:24:36 浏览: 212
centos 7.9服务器 离线 搭建svn服务器
你可以使用以下命令来检查logrotate服务是否在CentOS 7.9上运行:
```
systemctl status logrotate.service
```
如果logrotate服务正在运行,你应该会看到类似以下的输出:
```
● logrotate.service - Rotate log files
Loaded: loaded (/usr/lib/systemd/system/logrotate.service; static; vendor preset: disabled)
Active: active (exited) since Wed 2021-10-20 10:30:48 UTC; 2h 5min ago
Docs: man:logrotate(8)
man:logrotate.conf(5)
Process: 24792 ExecStart=/usr/sbin/logrotate /etc/logrotate.conf (code=exited, status=0/SUCCESS)
Main PID: 24792 (code=exited, status=0/SUCCESS)
```
如果logrotate服务未运行,则会显示不同的输出。
阅读全文