Wednesday 8 February 2012

Log files in Linux

All log files in linux are in the location /var/logs. And we can ready all logs by using tail or head command

# tail -f /var/log/messages

Common Linux log files are

/var/log/message      : General message and system related alerts
/var/log/auth.log    : Authenication logs
/var/log/kern.log  : Kernel logs
/var/log/cron.log    : Crond logs (cron job)
/var/log/maillog      : Mail server logs
/var/log/qmail/    : Qmail log directory 
 /var/log/httpd/      : Apache access and error logs directory
/var/log/lighttpd    : Lighttpd access and error logs directory
/var/log/boot.log    : System boot log
/var/log/mysqld.log: MySQL database server log file
/var/log/secure        : Authentication log
/var/log/utmp or /var/log/wtmp : Login records file
/var/log/yum.log      : Yum log files

These log rotation can be done by using daemon logrotate and monitor logs files using logwatch software.


No comments:

Post a Comment