简体   繁体   English

已运行进程中的Linux总磁盘I / O

[英]Linux total disk I/O from already running process

I'm working on a performance tool and I'm interested in the total disk I/O i single process have done since it started. 我正在使用一种性能工具,并且我对自启动以来单个进程完成的总磁盘I / O感兴趣。 I have the porcess PID and i can easily get the current I/O rate with tools like iotop or sar, but not the total I/O. 我拥有porcess PID,我可以使用iotop或sar之类的工具轻松获得当前的I / O速率,但不能获得总I / O。

Is this even logged in Linux and is there a way to get it? 这甚至登录到Linux中,并且有办法获取吗?

/Mpresmann / Mpresmann

You can read the /proc/<PID>/io file for specific process 您可以读取/proc/<PID>/io文件以了解特定过程

 $ sudo cat /proc/1/io

rchar: 144440702940
wchar: 4615239440674
syscr: 156954128
syscw: 173077623
read_bytes: 113700176646
write_bytes: 100325525146
cancelled_write_bytes: 2596581376

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM