草庐IT

logroate

全部标签

Linux 系统 logroate日志管理

1.简介Logrotate是基于CRON来运行的,其脚本是「/etc/cron.daily/logrotate」#!/bin/sh/usr/sbin/logrotate-s/var/lib/logrotate/logrotate.status/etc/logrotate.confEXITVALUE=$?if[$EXITVALUE!=0];then/usr/bin/logger-tlogrotate"ALERTexitedabnormallywith[$EXITVALUE]"fiexit0实际运行时,Logrotate会调用配置文件「/etc/logrotate.conf」weeklyrotat

Linux 系统 logroate日志管理

1.简介Logrotate是基于CRON来运行的,其脚本是「/etc/cron.daily/logrotate」#!/bin/sh/usr/sbin/logrotate-s/var/lib/logrotate/logrotate.status/etc/logrotate.confEXITVALUE=$?if[$EXITVALUE!=0];then/usr/bin/logger-tlogrotate"ALERTexitedabnormallywith[$EXITVALUE]"fiexit0实际运行时,Logrotate会调用配置文件「/etc/logrotate.conf」weeklyrotat