1. Do not ‘rm’ log files
Part time CTO
Masato Bito
2. Experience like this?
Daemon outputs lots of data into a log file
Disk becomes full
Service stops(no space left on device)
‘rm’ a huge log file(to get free space)
still disk full
Restart a daemon(stuck here, nothing comes up)
Ctrl-C doesn’t work
kill -KILL doesn’t work
11. Reference counting
One of garbage collection algorithms
Each object counts the number of references
An object would be removed when references
became “0”
12. What was happened
/var/log/apache2/access_log httpd
8823836
log file
references: 2
13. What was happened
rm /var/log/apache2/access_log
8823836
log file
references: 1
httpd
14. What was happened
service httpd restart
8823836
log file
references: 0
httpd
stuck
start removing