FreeBSD view system log
One of the daily operations as FreeBSD administrator is to check system log and system resources usage, also system logs are my favorite friend to debug and solve system problems.
Here a summary list for commands used to check system log.
- cat /var/log/messages will display all the system log
- tail -f /var/log/messages will display the tail of system log, use Ctrl+C to exit.
- less /var/log/messages will display system log page by page, press Q to exit.
- cat /var/log/messages | grep error will display only the lines contain the keyword error.
- vi /var/log/messages use :q to exit vi viewer (vi is the default editor that comes with the UNIX operating)
Other important logs you should check:
- cat /var/log/auth.log | grep error
- cat /var/log/maillog | grep error
iefreer