Tag Info

New answers tagged

6

The file in /proc/<pid>/io represent what you need. It's a bit scripting work to get an output similar to iotop. See the linux kernel documentation to the /proc/<pid>/io file values: rchar I/O counter: chars read The number of bytes which this task has caused to be read from storage. This is simply the sum of bytes which this process ...


5

Brendan Gregg's iosnoop (part of his perf-tools) will give you detailed information about an application's I/O; for example: # ./iosnoop Tracing block I/O... Ctrl-C to end. COMM PID TYPE DEV BLOCK BYTES LATms supervise 1809 W 202,1 17039968 4096 1.32 supervise 1809 W 202,1 17039976 ...


3

You may try inotify (often packaged inotify tools since kernel 2.6). It will monitor a part of your filesystem and inform you on events like creating/deleting files or directories. A simple use would be: inotifywait -m -r /tmp/ Then, when filesystem activity occurs, you'll see: #=> I'm creating /tmp/b /tmp/ CREATE,ISDIR b /tmp/ OPEN,ISDIR b /tmp/ ...


0

You need more data; if you're having high %iowait you need to find out what is causing it. To do this you can use the following tools: iotop especially with -a. atop -d 1 sar is a great tool for historical logging; but you need to use a real-time tool for monitoring it. I made a pretty detailed post about doing this here: ...


0

You can use <<< to simply read from the variable containing the newline-separated data: while read -r line do echo "A line of input: $line" done <<<"$lines"



Top 50 recent answers are included