How to view logs in The Nux System (Common commands)

Source: Internet
Author: User

Cat
Tail-F

Japanese text 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 security-related log information
/Var/log/maillog and mail-related log information
/Var/log/cron log information related to scheduled tasks
/Var/log/Spooler logs related to UCP and news Devices
/Var/log/boot. log daemon starts and stops related log messages


System:
# Uname-A # view kernel/operating system/CPU Information
# Cat/etc/issue
# Cat/etc/RedHat-release # view the operating system version
# Cat/proc/cpuinfo # view CPU Information

# Cat/proc/cpuinfo | grep "physical ID" | sort | uniq | WC-l view the number of physical CPUs

# Cat/proc/cpuinfo | grep "CPU cores" | Number of cores of each physical CPU in uniq

# Modification time: Date-s "23:51 10/10/2014"

# Hostname # view the computer name
# Lspci-TV # list all PCI devices
# Lsusb-TV # list all USB devices
# Lsmod # list loaded Kernel Modules
# Env # view environment variables
Resource:
# Free-M # view memory usage and swap zone usage
# DF-h # view the usage of each partition
# Du-SH <Directory Name> # view the size of a specified directory
# Grep memtotal/proc/meminfo # view total memory
# Grep memfree/proc/meminfo # view the Amount of idle memory
# Uptime # view system running time, number of users, and load
# Cat/proc/loadavg # view system load
Disks and partitions:
# 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 parameters (only applicable to ide devices)
# Dmesg | grep ide # view the IDE Device Detection Status at startup
Network:
# Ifconfig # view the attributes of all network interfaces
# Iptables-L # view firewall settings
# Route-N # view the route table
# Netstat-lntp # view all listening ports
# Netstat-antp # view all established connections
# Netstat-s # view network statistics
Process:
# Ps-Ef # view all processes
# Top # display Process status in real time (for details in another article)
User:
# W # view active users
# Id <User Name> # view specified user information
# Last # view User Logon logs
# Cut-D:-F1/etc/passwd # view all users in the system
# Cut-D:-F1/etc/group # view all groups in the system
# Crontab-L # view the scheduled tasks of the current user
Service:
# Chkconfig-list # list all system services
# Chkconfig-list | grep on # list all started system services
Program:
# Rpm-Qa # view all installed software packages

This article is from the "diaosi life" blog and will not be reproduced!

How to view logs in The Nux System (Common commands)

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.