vmstat
例如 【相关文章:通用线程 -- sed 实例,第 3 部】
vmstat 可用來紀錄 processes, memory, paging, block io, traps, 與 cpu activity。 【扩展阅读:通用线程:Awk 实例,第 2部分】
【扩展信息:通用线程 -- sed 实例,第 2 部】$ vmstat 1 # 1 是更新速度,單位為秒procs -----------memory---------- ---swap-- -----io---- --system-- ----cpu---- r b swpd free buff cache si so bi bo in cs us sy id wa 1 0 549368 13316 102388 91992 12 6 9 8 2 12 72 3 25 0 2 0 549368 13316 102388 91992 0 0 0 0 156 1516 98 2 0 0 2 0 549368 13312 102388 91992 0 0 0 0 125 534 99 1 0 0 .... 第一列與第二列所代表是執行程式的資訊,接下來的是記憶體、swap、io、systm 與 cpu。 procs r: the number of processes waiting for run time. b: the number of processes in uninterruptible sleep. memory swpd: the amount of virtual memory used. free: the amount of idle memory. buff: the amount of memory used as buffers. cache: the amount of memory used as cache. ... 下一页