Logging & Troubleshooting

  1. How to view all messages generated by the system since the last reboot on RHEL7/CentOS 7?

    The boot process, kernel, and all systemd services put messages into the systemd journal.

  2. What are 7 different ways of showing the kernel messages?

  3. How can you continuously monitor logs as they come in?

    You can use tail -f /var/log/messages to continuously monitor the messages log file.

  4. Where can you find messages related to the installation of Linux?

    Messages related to the installation of Linux can be found in the anaconda.log file or /var/log/anaconda/anaconda.log.

  5. Where are most of the log files located?

    Most of the log files are located in the /var/log directory.

  6. How to check system load without the top command?

  7. By default, load average is shown in how many intervals?

  8. How can you get the physical and virtual memory statistics?

  9. How to check CPU utilization and other statistics?

  10. How to find the process ID of a process and kill it immediately?

  11. How to list all open files by a specified user?

  12. How to list all files opened by a particular command?

  13. How can you list all network connections by port 22?

  14. How to check scheduled jobs?

  15. If your cron job didn't work, how would you check?

    1. First check your system time,
    2. then crontab entry,
    3. then check /var/log/messages
  16. How to check open port on Linux system?

  17. How to check the IP of the VM