CentOS dstat 命令详解(四)深层次分析命令简录

深层次分析命令

# high-level OS check
head -1 /root/checkOS/checkOS.info_$(date '+%F')*|awk '{print "|"$1"|"$11"|"$12"|"$13"|"$14"|"$15"|"$16"|"$17"|"$18"|"$19"|"$20"|"}'>/root/checkOS/result.txt
cat /root/checkOS/checkOS.info_$(date '+%F')*|grep -v '\----system----'|awk -F'|' '{print "|"$1"|"$11"|"$12"|"$13"|"$14"|"$15"|"$16"|"$17"|"$18"|"$19"|"$20"|"}'>>/root/checkOS/result.txt
head -1 /root/checkOS/checkOS.info_$(date '+%F' -d '1 day ago')*|awk '{print "|"$1"|"$11"|"$12"|"$13"|"$14"|"$15"|"$16"|"$17"|"$18"|"$19"|"$20"|"}'>/root/checkOS/result.txt
cat /root/checkOS/checkOS.info_$(date '+%F' -d '1 day ago')*|grep -v '\----system----'|awk -F'|' '{print "|"$1"|"$11"|"$12"|"$13"|"$14"|"$15"|"$16"|"$17"|"$18"|"$19"|"$20"|"}'>>/root/checkOS/result.txt

# disk utilization in percentage check
head -1 /root/checkOS/checkOS.info_$(date '+%F')*|awk '{print "|"$1"|"$21"|"$22"|"$23"|"$24"|"$25"|"$26"|"$27"|"$28"|"$29"|"$30"|"$31"|"$32"|"$33"|"$34"|"$35"|"$36"|"$37"|"$38"|"$39"|"}'>/root/checkOS/result.txt
cat /root/checkOS/checkOS.info_$(date '+%F')*|grep -v '\----system----'|awk -F'|' '{print "|"$1"|"$21"|"}'>>/root/checkOS/result.txt
head -1 /root/checkOS/checkOS.info_$(date '+%F' -d '1 day ago')*|awk '{print "|"$1"|"$21"|"$22"|"$23"|"$24"|"$25"|"$26"|"$27"|"$28"|"$29"|"$30"|"$31"|"$32"|"$33"|"$34"|"$35"|"$36"|"$37"|"$38"|"$39"|"}'>/root/checkOS/result.txt
cat /root/checkOS/checkOS.info_$(date '+%F' -d '1 day ago')*|grep -v '\----system----'|awk -F'|' '{print "|"$1"|"$21"|"}'>>/root/checkOS/result.txt

# per filesystem disk usage check
head -1 /root/checkOS/checkOS.info_$(date '+%F')*|awk '{print "|"$1"|"$40"|"$41"|"$42"|"$43"|"$44"|"$45"|"$46"|"$47"|"$48"|"$49"|"}'>/root/checkOS/result.txt
cat /root/checkOS/checkOS.info_$(date '+%F')*|grep -v '\----system----'|awk -F'|' '{print "|"$1"|"$22"|"}'>>/root/checkOS/result.txt
head -1 /root/checkOS/checkOS.info_$(date '+%F' -d '1 day ago')*|awk '{print "|"$1"|"$40"|"$41"|"$42"|"$43"|"$44"|"$45"|"$46"|"$47"|"$48"|"$49"|"}'>/root/checkOS/result.txt
cat /root/checkOS/checkOS.info_$(date '+%F' -d '1 day ago')*|grep -v '\----system----'|awk -F'|' '{print "|"$1"|"$22"|"}'>>/root/checkOS/result.txt

# net-packets received and transmitted|sum processes|ticks/s check
head -1 /root/checkOS/checkOS.info_$(date '+%F')*|awk '{print "|"$1"|"$50"|"$51"|"$52"|"}'>/root/checkOS/result.txt
cat /root/checkOS/checkOS.info_$(date '+%F')*|grep -v '\----system----'|awk -F'|' '{print "|"$1"|"$23"|"$24"|"$25"|"}'>>/root/checkOS/result.txt
head -1 /root/checkOS/checkOS.info_$(date '+%F' -d '1 day ago')*|awk '{print "|"$1"|"$50"|"$51"|"$52"|"}'>/root/checkOS/result.txt
cat /root/checkOS/checkOS.info_$(date '+%F' -d '1 day ago')*|grep -v '\----system----'|awk -F'|' '{print "|"$1"|"$23"|"$24"|"$25"|"}'>>/root/checkOS/result.txt

# top block I/O process|top CPU process|top I/O process|top latency process|top memory process check
head -1 /root/checkOS/checkOS.info_$(date '+%F')*|awk '{print "|"$1"|"$53"|"$54"|"$55"|"$56"|"$57"|"}'>/root/checkOS/result.txt
cat /root/checkOS/checkOS.info_$(date '+%F')*|grep -v '\----system----'|awk -F'|' '{print "|"$1"|"$26"|"$27"|"$28"|"$29"|"$30"|"}'>>/root/checkOS/result.txt
head -1 /root/checkOS/checkOS.info_$(date '+%F' -d '1 day ago')*|awk '{print "|"$1"|"$53"|"$54"|"$55"|"$56"|"$57"|"}'>/root/checkOS/result.txt
cat /root/checkOS/checkOS.info_$(date '+%F' -d '1 day ago')*|grep -v '\----system----'|awk -F'|' '{print "|"$1"|"$26"|"$27"|"$28"|"$29"|"$30"|"}'>>/root/checkOS/result.txt

# 以上分析报表统一查看命令
less -r /root/checkOS/result.txt

猜你喜欢

转载自blog.csdn.net/zwjzqqb/article/details/80827795
今日推荐