How linux system how to view the log (commonly used commands) to see linux system log (commonly used commands)

linux system how to view the log (commonly used commands)

 

CAT 
tail -f 

log file Description 
after the / var / log / message system startup information and error logs, Red Hat Linux is one of the most common log 
/ var / log / secure log security-related information 
/ var / log / maillog log information related to the mail 
/ var / log / cron tasks related to the timing of log 
/ var / log / spooler log information related to UUCP and news equipment 
/var/log/boot.log daemon start and stop related log message 


system: 
# uname -a # View kernel / operating system / CPU information 
# CAT / etc / Issue 
# CAT / etc / RedHat release #-check the OS version 
# cat / proc / cpuinfo # View CPU information 
# hostname # View computer name 
# lspci -tv # list all PCI devices 
# lsusb -tv # lists all USB devices 
# lsmod # listed loaded kernel modules 
# env # viewing environment variable 
resource: 
# -m # as Free to view memory usage and exchange the use of district 
# df -h # see how each partition usage 
# du -sh <directory name> # View the specified directory size 
# Grep MemTotal / proc / meminfo # view the amount of memory 
# grep MemFree / proc / meminfo # view the amount of free memory 
# uptime # View system uptime, number of users, load 
# cat / proc / loadavg # View system load 
disk and partition: 
# mount | column -t # View articulated partition status 
# fdisk -l # View all partition 
# swapon -s # View all swap partitions 
# hdparm -i / dev / hda # View disk parameters (only for IDE devices) 
# dmesg | grep IDE # view when you start the IDE device detection status 
network: 
# # ifconfig network interface to view all attributes 
# iptables -L # View firewall settings 
# route -n # View the routing table 
# netstat -lntp # View all listening ports 
# netstat -antp # view all established connections 
# netstat -s # View network statistics 
process: 
# # View PS -ef all processes 
# top # display real-time process status (another article which detailed description) 
user: 
# w # View active users 
# Id <user name> # Display the user information 
# last # view the user login log 
# cut -d: -f1 / etc / passwd # View all system users 
# cut -d: -f1 / etc / group # View all system groups 
# crontab -l # to view the current user's scheduled tasks 
service: 
# chkconfig -list to list all system services # 
# chkconfig -list | grep on # lists all system services to start 
the program: 
# # RPM -qa View all software installed package

CAT 
tail -f 

log file Description 
after the / var / log / message system startup information and error logs, Red Hat Linux is one of the most common log 
/ var / log / secure log security-related information 
/ var / log / maillog log information related to the mail 
/ var / log / cron tasks related to the timing of log 
/ var / log / spooler log information related to UUCP and news equipment 
/var/log/boot.log daemon start and stop related log message 


system: 
# uname -a # View kernel / operating system / CPU information 
# CAT / etc / Issue 
# CAT / etc / RedHat release #-check the OS version 
# cat / proc / cpuinfo # View CPU information 
# hostname # View computer name 
# lspci -tv # list all PCI devices 
# lsusb -tv # lists all USB devices 
# lsmod # listed loaded kernel modules 
# env # viewing environment variable 
resource: 
# -m # as Free to view memory usage and exchange the use of district 
# df -h # see how each partition usage 
# du -sh <directory name> # View the specified directory size 
# Grep MemTotal / proc / meminfo # view the amount of memory 
# grep MemFree / proc / meminfo # view the amount of free memory 
# uptime # View system uptime, number of users, load 
# cat / proc / loadavg # View system load 
disk and partition: 
# mount | column -t # View articulated partition status 
# fdisk -l # View all partition 
# swapon -s # View all swap partitions 
# hdparm -i / dev / hda # View disk parameters (only for IDE devices) 
# dmesg | grep IDE # view when you start the IDE device detection status 
network: 
# # ifconfig network interface to view all attributes 
# iptables -L # View firewall settings 
# route -n # View the routing table 
# netstat -lntp # View all listening ports 
# netstat -antp # view all established connections 
# netstat -s # View network statistics 
process: 
# # View PS -ef all processes 
# top # display real-time process status (another article which detailed description) 
user: 
# w # View active users 
# Id <user name> # Display the user information 
# last # view the user login log 
# cut -d: -f1 / etc / passwd # View all system users 
# cut -d: -f1 / etc / group # View all system groups 
# crontab -l # to view the current user's scheduled tasks 
service: 
# chkconfig -list to list all system services # 
# chkconfig -list | grep on # lists all system services to start 
the program: 
# # RPM -qa View all software installed package

Guess you like

Origin www.cnblogs.com/xududu/p/11128436.html