系統緩存
uname -a # 查看內核/操做系統/CPU信息 head -n 1 /etc/issue # 查看操做系統版本 cat /proc/cpuinfo # 查看CPU信息 hostname # 查看計算機名 lspci -tv # 列出全部PCI設備 lsusb -tv # 列出全部USB設備 lsmod # 列出加載的內核模塊 env # 查看環境變量
資源bash
free -m # 查看內存使用量和交換區使用量 df -h # 查看各分區使用狀況 du -sh <目錄名> # 查看指定目錄的大小 grep MemTotal /proc/meminfo # 查看內存總量 grep MemFree /proc/meminfo # 查看空閒內存量 uptime # 查看系統運行時間、用戶數、負載 cat /proc/loadavg # 查看系統負載
磁盤和分區服務器
mount | column -t # 查看掛接的分區狀態 fdisk -l # 查看全部分區 swapon -s # 查看全部交換分區 hdparm -i /dev/hda # 查看磁盤參數(僅適用於IDE設備) dmesg | grep IDE # 查看啓動時IDE設備檢測情況
網絡網絡
ifconfig # 查看全部網絡接口的屬性 iptables -L # 查看防火牆設置 route -n # 查看路由表 netstat -lntp # 查看全部監聽端口 netstat -antp # 查看全部已經創建的鏈接 netstat -s # 查看網絡統計信息
進程app
ps -ef # 查看全部進程 top # 實時顯示進程狀態
用戶ide
w # 查看活動用戶 id <用戶名> # 查看指定用戶信息 last # 查看用戶登陸日誌 cut -d: -f1 /etc/passwd # 查看系統全部用戶 cut -d: -f1 /etc/group # 查看系統全部組 crontab -l # 查看當前用戶的計劃任務
服務ui
chkconfig --list # 列出全部系統服務 chkconfig --list | grep on # 列出全部啓動的系統服務
程序操作系統
rpm -qa # 查看全部安裝的軟件包
網卡型號日誌
lspci | grep Ethernet 00:19.0 Ethernet controller: Intel Corporation 82567V-2 Gigabit Network Connection
硬盤信息code
df -h Filesystem Size Used Avail Use% Mounted on /dev/sda5 2.0G 272M 1.6G 15% / /dev/sda8 199G 188M 189G 1% /home /dev/sda3 9.7G 1.3G 7.9G 15% /usr /dev/sda2 9.7G 198M 9.0G 3% /var /dev/sda1 99M 17M 77M 18% /boot
hdparm -i /dev/sda
dmesg | grep ATA
主板型號
dmidecode | more
# dmidecode 2.10 SMBIOS 2.4 present. structures occupying 2318 bytes. Table at 0x000E84B0. Handle 0x0000, DMI type 0, 24 bytes BIOS Information Vendor: Intel Corp. Version: GTG4310H.86A.0019.2009.0625.1334 Release Date: 06/25/2009 ..... System Information 服務器品牌 Manufacturer: Product Name: (沒有信息表示非品牌或未識別) Version: Serial Number: UUID: 889BD67E-8D96-11DE-AC40-0013D4D9C9E8 Wake-up Type: Power Switch SKU Number: Not Specified Family: Not Specified Handle 0x0002, DMI type 2, 15 bytes Base Board Information 主板型號/主板信息 Manufacturer: Intel Corporation Product Name: DG43GT Version: AAE62768-300 Serial Number: BTGT9340022N Processor Information CPU信息/CPU型號/CPU主頻 Socket Designation: PROCESSOR Type: Central Processor Family: Pentium D Manufacturer: Intel(R) Corp. ID: 7A 06 01 00 FF FB EB BF Signature: Type 0, Family 6, Model 23, Stepping 10 Version: Pentium(R) Dual-Core CPU E6500 @ 2.93GHz Voltage: 1.2 V External Clock: 266 MHz Max Speed: 4000 MHz Current Speed: 2931 MHz Status: Populated, Enabled Upgrade: Socket LGA775 Cache Information 硬件和CPU緩存狀況 Socket Designation: L1-Cache Configuration: Enabled, Not Socketed, Level 1 Operational Mode: Write Back Location: Internal Installed Size: 32 kB Maximum Size: 32 kB BIOS Language Information BIOS語言 Installable Languages: 1 en|US|iso8859-1 Currently Installed Language: en|US|iso8859-1 Physical Memory Array 主板最大支持內存 Location: System Board Or Motherboard Use: System Memory Error Correction Type: None Maximum Capacity: 16 GB Error Information Handle: Not Provided Number Of Devices: 4 Handle 0x002C, DMI type 19, 15 bytes Memory Array Mapped Address 目前的內存 Starting Address: 0x00000000000 Ending Address: 0x000FFFFFFFF Range Size: 4 GB Physical Array Handle: 0x002B Partition Width: 0 On Board Device Information 顯卡型號 Type: Video Status: Enabled Description: Intelr GMA X4500 Video Device