ps&CPU
void f();
int main() {
f();
return 0;
}
void f() {
int i=0;
//volatile int i=0;
while (i<100) { i=10; }
}
root 825 96.5 0.0 2460 724 pts/2 R+ 11:33 0:03 ./xxx
root@x:~# ps aux|grep xxx|grep -v grep
root 825 95.6 0.0 2460 724 pts/2 R+ 11:33 0:04 ./xxx
root@x:~# ps aux|grep xxx|grep -v grep
root 825 93.0 0.0 2460 724 pts/2 R+ 11:33 0:05 ./xxx
root@x:~# ps aux|grep xxx|grep -v grep
root 825 107 0.0 2460 724 pts/2 R+ 11:33 0:06 ./xxx
root@x:~# ps aux|grep xxx|grep -v grep
root 825 100 0.0 2460 724 pts/2 R+ 11:33 0:07 ./xxx
root@x:~# ps aux|grep xxx|grep -v grep
root 825 96.2 0.0 2460 724 pts/2 R+ 11:33 0:07 ./xxx
root@x:~# ps aux|grep xxx|grep -v grep
root 825 104 0.0 2460 724 pts/2 R+ 11:33 0:08 ./xxx
root@x:~# ps aux|grep xxx|grep -v grep
root 825 99.5 0.0 2460 724 pts/2 R+ 11:33 0:08 ./xxx
root@x:~# ps aux|grep xxx|grep -v grep
root 825 97.0 0.0 2460 724 pts/2 R+ 11:33 0:09 ./xxx
root@x:~# ps aux|grep xxx|grep -v grep
root 825 103 0.0 2460 724 pts/2 R+ 11:33 0:10 ./xxx
root@x:~# ps aux|grep xxx|grep -v grep
root 825 102 0.0 2460 724 pts/2 R+ 11:33 0:11 ./xxx
void f();
int main() {
f();
return 0;
}
void f() {
//int i=0;
volatile int i=0;
while (i<100) {
++i; i=10;
}
}
阅读(715) | 评论(0) | 转发(0) |
-->
ps&CPU的更多相关文章
- ps 和 top 的cpu的区别
cpu的计算 ps cpu的定义 man page中给出的定义: cpu utilization of the process in "##.#" format. Currentl ...
- Linux如何统计进程的CPU利用率
1.0 概述 在Linux的/proc文件系统,可以看到自启动时候开始,所有CPU消耗的时间片:对于个进程,也可以看到进程消耗的时间片.这是一个累计值,可以"非阻塞"的输出.获得一 ...
- Linux如何统计进程的CPU利用率[转]
0. 为什么写这篇博客 Linux的top或者ps都可以查看进程的cpu利用率,那为什么还需要了解这个细节呢.编写这篇文章呢有如下三个原因: * 希望在脚本中,能够以过”非阻塞”的方式获取进程cpu利 ...
- 学习笔记TF041:分布式并行
TensorFlow分布式并行基于gRPC通信框架,一个master负责创建Session,多个worker负责执行计算图任务. 先创建TensorFlow Cluster对象,包含一组task(每个 ...
- 学习笔记TF061:分布式TensorFlow,分布式原理、最佳实践
分布式TensorFlow由高性能gRPC库底层技术支持.Martin Abadi.Ashish Agarwal.Paul Barham论文<TensorFlow:Large-Scale Mac ...
- Linux下系统如何监控服务器硬件、操作系统、应用服务和业务
1.Linux监控概述 Linux服务器要保证系统的高可用性,需要实时了解到服务器的硬件.操作系统.应用服务等的运行状况,各项性能指标是否正常,需要使用各种LINUX命令.做到自动化运维就 ...
- 『TensorFlow』分布式训练_其三_多机分布式
本节中的代码大量使用『TensorFlow』分布式训练_其一_逻辑梳理中介绍的概念,是成熟的多机分布式训练样例 一.基本概念 Cluster.Job.task概念:三者可以简单的看成是层次关系,tas ...
- UNIX和Linux信号
1 ~ 31的信号为传统UNIX支持的信号,是不可靠信号(非实时的),编号为32 ~ 63的信号是后来扩充的,称做可靠信号(实时信号).不可靠信号和可靠信号的区别在于前者不支持排队,可能会造成信号丢失 ...
- 进程&进程池
进程 服务器中, s.listen(n) n不能无限大,以为内存不可能无限大,n表示内存同一时间接纳的等待连接数,可以看成一个(队列),取出一个拿去建立连接,然后再放进一个,队列中一直保持n个连接 请 ...
随机推荐
- POJ 之2386 Lake Counting
Lake Counting Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 20003 Accepted: 10063 D ...
- SPFA 算法(剪辑)(学习!)
SPFA算法 单源最短路径的算法最常用的是Dijkstra,些算法从时间复杂度来说为O(n^2),但是面对含有负权植的图来说就无能为力了,此时 Dellman-ford算法就有用了,这咱算法是采用的是 ...
- Codeforces Round #250 (Div. 2) D. The Child and Zoo 并查集
D. The Child and Zoo time limit per test 2 seconds memory limit per test 256 megabytes input standar ...
- Winform中的dataGridView添加自动编号
1.Winform中的dataGridView添加自动编号:http://blog.csdn.net/ohyoyo2014/article/details/38346887 2.如何为datagrid ...
- 使用SQL脚本创建数据库,操作主键、外键与各种约束(MS SQL Server)
在实际开发中,可能很少人会手写sql脚本来操作数据库的种种.特别是微软的MS SQL Server数据库,它的SQL Server Management Studio对数据库的图形化操作极致简便,从而 ...
- IpIImage -> CvMat 转换方法
Ipl转为CvMat 一般为这两种方法: 1: /*cvGetMat*/ CvMat matheader; CvMat * mat = cvGetMat(img, &matheader); 2 ...
- hdu-5650 so easy(水题)
题目链接: so easy Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Tota ...
- leetcode 204. Count Primes(线性筛素数)
Description: Count the number of prime numbers less than a non-negative number, n. 题解:就是线性筛素数的模板题. c ...
- Convolutional Neural Networks for Visual Recognition 6
-###Learning 前面,我们介绍了神经网络的构成,数据的预处理,权值的初始化等等.这一讲,我们将要介绍神经网络参数学习的过程. Gradient Checks 梯度的运算,在理论上是简单的,但 ...
- linux vsftpd 服务配置
vsftpd.conf配置如下: # Example config file /etc/vsftpd/vsftpd.conf # # The default compiled in settings ...