Linux modification time
On the command line, enter:
Date
Show current time Fri Aug 3 14:15:16 CST 2007
Date-S
Modified by string
You can modify only the date without changing the time. Enter: Date-S
Modify the time only. Enter date-s 14:15:00.
Modify the date and time at the same time. Note that double quotation marks are required. There is a space between the date and time. Enter date-s "14:15:00"
After modification, enter clock-w.
Write System Time to CMOS
Multi-CPU (support for SAR package rpm-IVH sysstat-5.0.5-11.rhel4.i386.rpm)
Sar-u-p all 1 1
Single CPU
Sar-u 1 1
Check memory
Top
Free
Adjust Auto Start Service
Chkconfig
Run the following command to view the version:
Kernel version
CAT/proc/version
Uname-
Uname-r CAT/etc/issue
Software Version
CAT/etc/issue
Sudo lsb_release-
Resource usage of a process
Top
# Uname-a # view kernel/operating system/CPU Information
# Head-n 1/etc/issue # view the operating system version
# Cat/proc/cpuinfo # view CPU Information
# 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
Resources
# 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
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
Intercepted UDP packets from Port 1812
Tcpdump UDP port 1812
Intercepted UDP packets and displayed content
Tcpdump-X-net-s 4096 UDP port 1812
PS-AF | grep Rad
Tail-f/app/radiusd/log/yyyymmdd. log