最後更新: 2021-09-18
目錄
- System Setting
- OpenWrt top
System Setting
Configure file
/etc/config/system
Hostname
config system option hostname 'OpenWrt'
Log
config system ... log_size 16 # Default: 16. Unit: KiB, circular memory log_type circular # Default circular. 另有選項 file, 它會 log 到 "log_file" log_file /var/log/messages log_ip <IP> # log 到其他的 syslog 上 log_port 512 # default port
ntp
config system ... option timezone 'HKT-8' config timeserver 'ntp' list server '0.openwrt.pool.ntp.org' list server '1.openwrt.pool.ntp.org' list server '2.openwrt.pool.ntp.org' list server '3.openwrt.pool.ntp.org' option enable_server '1'
OpenWrt 's top
CPU: 0% usr 1% sys 0% nic 39% idle 0% io 0% irq 58% sirq
* nic does not mean the network, but "nice"
/proc/stat
cpu 2691739 0 3224734 539739873 0 0 25054799 0 0 0 cpu0 2691739 0 3224734 539739873 0 0 25054799 0 0 0 intr 3295101952 0 0 1046234995 0 803958857 865580988 0 579327029 0 0 0 83 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ctxt 1718921015 btime 1620790192 processes 1746 procs_running 1 procs_blocked 0 softirq 2466000894 0 569346969 3447375 812285661 0 0 1044100039 0 118 36820732
"cpu" line aggregates the numbers in all of the other "cpuN" lines
- user: normal processes executing in user mode
- nice: niced processes executing in user mode
- system: processes executing in kernel mode
- idle: twiddling thumbs
- iowait: waiting for I/O to complete
- irq: servicing interrupts
- softirq: servicing softirqs
"intr" line gives counts of interrupts serviced since boot time
"ctxt" line gives the total number of context switches across all CPUs.
"btime" line gives the time at which the system booted, in seconds since the Unix epoch.
"processes" line gives the number of processes and threads created
"softirq" number of softirq for all CPUs.