获取某个进程的CPU使用情况
来源:互联网 发布:怎么做淘宝虚拟充值 编辑:程序博客网 时间:2024/05/20 06:55
Gain One Process Cpu Usage Info
First, top command to get all information
Then, grep command to get the process record that you want
Third,awk command to print out cpu info into file
The shell script file is attached here.
Use while sleep, get continuous cpu info of this process into log file.
And you have to use this script tool like this:
./getcpu.sh screen 2
#! /bin/bash
if [ $# -ne 2 ]
then
echo "Usage: $0 ProcessName InternalTime"
fi
Process=$1
Internal=$2
LogFile="Cpu.txt"
while sleep $Internal
do
top | grep $Process | awk '{ print $9, $10, $11}' >> $LogFile
done
- 获取某个进程的CPU使用情况
- 获取进程的CPU使用情况
- Linux上获取指定进程的cpu使用情况
- 用python计算top命令中某个进程的CPU,Memory使用情况
- 使用gawk记录一段时间内,某个进程占用内存和CPU的情况
- linux查看某个进程的CPU及占用情况
- 获取CPU、内存的使用情况
- linux代码获取某个进程的cpu、内存
- 统计某个进程的cpu使用率使用top命令
- 通过性能计数器(Process)来获取某个进程的CPU使用率、内存使用量、磁盘读写速率
- 获取系统CPU的核数、软件CPU使用数、内存使用情况、IO读写情况
- 编程获取Linux的cpu占用率和mem使用情况
- 获取Linux的cpu占用率和mem使用情况
- 编程获取Linux的cpu占用率和mem使用情况
- 编程获取Linux的cpu占用率和 mem使用情况
- Windows下用C语言获取进程cpu使用率,内存使用,IO情况
- Windows下用C语言获取进程cpu使用率,内存使用,IO情况
- Windows下用C语言获取进程cpu使用率,内存使用,IO情况
- 百万级访问量网站的技术准备工作
- MSDN关于RIL的翻译
- Activity和SurfaceView
- 关于mysql 自动更新时间的 类型说明
- Linux2.6内核的原子操作的实现
- 获取某个进程的CPU使用情况
- 关于业务系统中代码的管理
- .Net WebClient 上传文件错误集锦
- 20110410-VC6如何给main函数传参
- 杭电 hdu 1176 免费馅饼
- jquery之利用ajax与服务器交谈(完全控制ajax请求之带着所有的修整发起Ajax请求)
- MonoDroid学习笔记(八)—— 如IPhone拖动相片特效,Gallery画廊
- 毕业设计中,写下所有问题。
- 基于ARM+DSP进行应用开发 - 经验共享