FreeBSD查看系统日志

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.

  1. cat /var/log/messages will display all the system log
  2. tail -f /var/log/messages will display the tail of system log, use Ctrl+C to exit.
  3. less /var/log/messages will display system log page by page, press Q to exit.
  4. cat /var/log/messages | grep error will display only the lines contain the keyword error.
  5. 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:

  1. cat /var/log/auth.log | grep error
  2. cat /var/log/maillog | grep error


iefreer

你可能感兴趣的:(软件,Web)