加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > Linux > 正文

Linux环境中的实用程序`memhog`的详细信息?

发布时间:2020-12-13 16:41:24 所属栏目:Linux 来源:网络整理
导读:我正在研究运行Amazon内核的EC2实例上的内存使用情况,并在实用程序/usr/bin/memhog中运行,但它没有联机帮助页.在盲目奔跑之前,我想知道它的作用以及它是如何使用它的. 任何人都使用它并知道它的作用? 解决方法 在你提到它之前我从来没有听说过它.然而,在关
我正在研究运行Amazon内核的EC2实例上的内存使用情况,并在实用程序/usr/bin/memhog中运行,但它没有联机帮助页.在盲目奔跑之前,我想知道它的作用以及它是如何使用它的.

任何人都使用它并知道它的作用?

解决方法

在你提到它之前我从来没有听说过它.然而,在关于实用程序的 SCO Unix,My system is slow (Old Sco Unix)上的一篇文章中,它听起来并不适合你想要做的事情.

Linux systems have “memhog” if numactl is installed. Numactl can
assign specific a process to a specific cpu and control memory policy
in other ways. The “memhog” does something very simple: it eats up
memory and then releases it. Why would you ever do that?

Well,possibly to test how another app performs when starved for
memory or to push unused memory in other apps out to swap (that can
help you see what’s really available should you need it).

显然,您为该实用程序提供了一个参数,指定您希望它采取多少内存,例如: memhog 512m – 见Issue 19: crash with repeated cycles of memhog (x86 and x64)

也许5 commands to check memory usage on Linux中提到的其中一个实用程序更适合您的目的.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读