Linux Common commands View logs

Source: Internet
Author: User

Cat
Tail-f
Log file description

1 /var/log/message and error log after system startup is one  of the most commonly used logs in red Hat Linux 2 /var/ log/Secure  Security-related log information 3 /var/log/maillog Message-related log information   4 / var/log/cron log information  related to timed tasks 5 /var/log/Spooler Log information  related to UUCP and news devices 6 /var

System:

1 # uname-a # view kernel/OS/CPU information   2 # cat/etc/issue  3 # Cat/etc/redha T-Release # view OS  version 4 # cat/proc/cpuinfo # View CPU  information 5# hostname # view computer name   6 # LSPCI-TV # list all PCI devices   7 # LSUSB-TV # list all USB devices  /c19>8# lsmod # list loaded kernel modules   9

Resources:

1 # free-M # View memory usage and swap  usage 2 # DF-  H # View each partition usage 3 # du-sh < directory name >  # View the size of the specified directory 4 # grep memtotal/proc/meminfo # View  Total Memory 5 # grep MEMFR ee/proc/Meminfo #  View idle memory 6# uptime # View System uptime, number of users, load   7 # CAT/ PROC/LOADAVG # Viewing system load

Disks and partitions:

1 # Mount | Column-t # view  attached partition status 2 # fdisk-L # View all partitions   3 # swapon-S # view all swap partitions  /c7>4 # hdparm-i/dev/hda # View disk parameters (IDE device only)  5 # DMESG | grep IDE # view IDE device detection at startup  

Internet:

1 # ifconfig # View the properties  of all network interfaces  2 # iptables-L # View firewall settings   3 # route-N # View route table   4 # netstat-LNTP # View all listening ports   5 # netstat-ANTP # View all established connections   6

Process:

1 # PS-EF # View All Processes 2 # top # Real-time display process status (in another article there is a detailed introduction)

User:

1 # w # view active Users   2 # ID < user name > # View specified user information   3# Last # View user log on  log 4 # cut-d:-f1/etc /passwd # View system All users   5 # cut-d:-f1/etc/Group# View system all groups   6

Service:

1 # chkconfig–list # list all system services 2 # Chkconfig–list | grep on # list all started system services

Program:

1 # rpm-qa # View all installed packages

Linux Common commands View logs

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.