/etc/logrotate.conf /etc/logrotate.d/ /var/log
logrotate -vf /etc/logrotate.conf # force a log rotate with verbose output (i.e. just added a new config) logrotate -df /etc/logrotate.d/nginx # dry run force a specific log rotate to see what would happen
Once in a while you want to know what your computer's been up to behind your back.
Maybe you're totally paranoid and you want to see if hackers/aliens/AI are using your system for nefarious purposes.
Worse yet, maybe something's not working and you need to find out why!
Linux applications almost all allow you to create text logs in the /var/log folder.
(Almost all applications can be customized to put them in a different place as well...)
The Log Files are zipped automatically (linux magic aka "logrotate") so that they take up much less space (why doesn't windows do that?)
Note these have only been tested on linux versions (flavors) Ubuntu / Debian / Centos?
/var/log/auth.log Authenication logs
/var/log/syslog System Logs
/var/log/kern.log Kernel Logs (what's the OS done?) /var/log/boot.log Boot Log (oddly empty on my mahcines)
dmesg Messages from the last boot up
/var/log/dpkg.log Software Package Installer Log
/var/log/yum.log Software Package Installer Log
/var/log/daemon.log
/var/log/lpr.log Printer Log
/var/log/mysql.log MySQL Log /var/log/apache2/access.log web server access /var/log/apache2/error.log web server errors
vsftpd.log vsFTP log
/var/log/pycentral.log /var/log/lastlog ? /var/log/secure ?
TIPS AND TRICKS
FILE SIZES and File names ls /var/log/apache2 -lh | awk '{print $5,$8}'
JUST THE MOST RECENT 30 ITEMS tail -n 20 /var/log/auth.log more /var/log/syslog
logrotate: allows automatic rotation, compression, removal, and mailing of log files. cat /etc/logrotate.d/httpd nano /etc/logrotate.conf
http://linux.die.net/man/8/logwatch