linux / unix进程的峰值内存使用率 [英] Peak memory usage of a linux/unix process

查看:957
本文介绍了linux / unix进程的峰值内存使用率的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有一个工具将运行命令行并报告总共使用了多少RAM?

Is there a tool that will run a command-line and report how much RAM was used total?

我想象的是类似于/ usr / bin /时间

I'm imagining something analogous to /usr/bin/time

推荐答案

(这是已经回答的旧问题,但只是为了记录:

(This is an already answered, old question.. but just for the record :)

我的灵感来自杨的脚本,并提出了这个小工具,名为 memusg 。我只是将采样率增加到0.1以处理很短的生命过程。我不是监视单个进程,而是测量进程组的rss sum。 (是啊,我写了很多单独的程序,一起工作)它目前在Mac OS X和Linux上工作。其用法必须类似于时间

I was inspired by Yang's script, and came up with this small tool, named memusg. I simply increased the sampling rate to 0.1 to handle much short living processes. Instead of monitoring a single process, I made it measure rss sum of the process group. (Yeah, I write lots of separate programs that work together) It currently works on Mac OS X and Linux. The usage had to be similar to that of time:


memusg ls -alR / >/dev/null

它只显示峰值,但我有兴趣微缩扩展录制其他)统计信息。

It only shows the peak for the moment, but I'm interested in slight extensions for recording other (rough) statistics.

这是一个很好的工具,只需看看,我们开始任何严重的剖析。

It's good to have such simple tool for just taking a look before we start any serious profiling.

这篇关于linux / unix进程的峰值内存使用率的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆