nCipher HSM log file rotation

The solution is based on CentOS “logrotation”

bash-4.2$ ls -la
total 28
drwxrwsr-x. 2 nfast nfast 177 Jan 15 22:14 .
drwxrwxr-x. 18 root root 230 Jan 7 01:32 ..
-rw-rw-r--. 1 root nfast 0 Jan 7 01:33 cmdadp-debug.log
-rw-rw-r--. 1 root nfast 0 Jan 7 01:33 cmdadp.log
-rw-r--r--. 1 nfast nfast 11146 Jan 15 22:40 hardserver.log
-rw-r-----. 1 nfast nfast 3932 Jan 15 20:56 hardserver.log-20190115.gz
-rw-r-----. 1 nfast nfast 6 Jan 15 20:56 hardserver.pid
lrwxrwxrwx. 1 root nfast 29 Jan 7 01:32 logfile -> /opt/nfast/log/hardserver.log
-rw-r-----. 1 raserv raserv 3671 Jan 15 20:56 raserv.log
-rw-r-----. 1 raserv raserv 6 Jan 15 20:56 raserv.pid
bash-4.2$ exit
[root@thalesrfs01 logrotate.d]# pwd
/etc/logrotate.d
[root@thalesrfs01 logrotate.d]# cat hardserver
/opt/nfast/log/hardserver.log {
su nfast nfast
missingok
notifempty
compress
size 100
daily
create 0644 nfast nfast
}
[root@thalesrfs01 logrotate.d]#

Leave a Reply

Your email address will not be published. Required fields are marked *

six + 5 =