发布时间:2015-04-25 09:48:32
Source Insight常用的快捷键: Ctrl+= :Jump to definition Alt+/ :Look up reference F3 : search backward F4 : search forward F5: go to Line F7 :Look up symbols F8 :Look up local symbols F9 :I.........【阅读全文】
发布时间:2015-04-23 23:18:27
#!/bin/bash#CPU监控CPULoad(){cpu_idle=`top -b -n 1 | grep Cpu | awk '{print $4}' | cut -f 2 -d "," | awk -F% '{print $1}' | cut -f 1 -d "."`if [ $cpu_idle -lt 20 ] then echo "CPU负载过高,请处理,当前剩余$cpu_idle%" >> /home/log &nbs.........【阅读全文】
发布时间:2015-04-23 23:17:02
CPU信息/proc/cpuinfo文件包含了你的系统处理器单元的信息。例如,这里就是python版的linux命令cat /proc/cpuinfo所做的事:#! /usr/bin/env python""" print out the /proc/cpuinfo file"""from __future__ import print_functionwith open('/proc/cpuinfo') as f: for line in f:&nbs.........【阅读全文】