如何创建一个Java程序来跟踪linux的性能(CPU,内存)? [英] How can I create a java program to track the linux performance(CPU,Memory) ?

查看:125
本文介绍了如何创建一个Java程序来跟踪linux的性能(CPU,内存)?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,
我是学生.我想创建一个可以跟踪linux系统性能的程序.请回复我.我该怎么办?????

Hello Everybody,
I am a student. I want to create a program that can track the linux system performances. Please reply me. How can I do it?????

推荐答案

您可以运行linux命令的实例(请参见 [顶部 [
You may run an instance of the linux command (see "How to run command-line or execute external application from Java"[^]) top[^] (that provides such info) and capture its output.
:-)


可以通过读取/proc文件系统中的伪文件来找到Linux系统性能信息.运行命令man 5 proc来查看/proc条目的Linux机器的内置文档.另请参阅: http://www.linuxinsight.com/proc_filesystem.html [ http://www.linux.com/archive/feature/126718 [ ^ ]
Linux system performance information can be found by reading the pseudo-files in the /proc filesystem. Run the command man 5 proc to see your Linux machine''s builtin documentation for the /proc entries. See also: http://www.linuxinsight.com/proc_filesystem.html[^] http://www.linux.com/archive/feature/126718[^]


这篇关于如何创建一个Java程序来跟踪linux的性能(CPU,内存)?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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