Common commands for viewing logs in Linux

Source: Internet
Author: User
Common commands for viewing logs in Linux systems because in daily work, it is the habit of every administrator to view logs when a problem occurs. as a beginner, for future needs, I will share the following command to www.2cto today. description of the comcattail-f log file...
Common commands for viewing logs in Linux systems because in daily work, it is the habit of every administrator to view logs when a problem occurs. as a beginner, for future needs, today, I will share the following viewing commands with www.2cto.com cattail-f log file description/var/log/message information and error logs after the system is started, it is one of the most common logs in Red Hat Linux./var/log/secure and security-related log information/var/log/maillog and mail-related log information/var/log/cron and logs related to scheduled tasks/var/log/spooler logs related to UCP and news devices/var/log/boot. log daemon starts and stops the relevant log message system: www.2cto.com # uname-a # View kernel/OS/CPU information # cat/etc/issue # cat/etc/redhat-release # View OS version # cat/proc/cpuinfo # view CPU information # hostname # View Computer Name # lspci-TV # List all PCI devices # lsusb-TV # List all USB devices # lsmod # List loaded kernel modules # env # view the environment variable resources: # free-m # View memory usage and swap zone usage # df-h # view the usage of each partition # du-sh <目录名> # View the size of a specified directory # grep MemTotal/proc/meminfo # view the total memory # grep MemFree/proc/meminfo # view the amount of idle memory # uptime # view the system running time, number of users, and load # cat/proc/loadavg # view the system load disk and partition: # mount | column-t # view the status of the mounted partition # fdisk-l # View All partitions # swapon-s # View all swap partitions # hdparm-I/dev/hda # View disk parameter (applicable only to IDE devices) # dmesg | grep IDE # view the network of IDE device detection status at startup: # ifconfig # view the attributes of all network interfaces # iptables-L # View firewall settings # route-n # View route tables # netstat-lntp # View all listening ports # netstat-antp # View all established connection # netstat-s # View network statistics process: www.2cto.com # ps-ef # View all processes # top # real-time display of process status users: # w # View active users # id <用户名> # Viewing specified user information # last # viewing user logon logs # cut-d:-f1/etc/passwd # viewing all users in the system # cut-d: -f1/etc/group # View all groups in the system # crontab-l # view the scheduled task service of the current user: # chkconfig-list # list all system Services # chkconfig-list | grep on # list all started System Service programs: # rpm-qa # View all installed software packages
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.