1. block_dump (see post 73). I should mention again that you may skip creating tempfs dir altogether.
2. find (see post 73).
3. ftrace
FTRACE
Note: ftrace should be enabled on most more or less recent systems by default.
Overall usage:
ATTENTION: overall rule - after you have traced whatever you wanted return all values to the state they were in before trace (usually disabled)! Use "cat" to check them beforehand.
1) sudo -i
2) enable required tracer (see below)
3) enable trace:
echo 1 > /sys/kernel/debug/tracing/tracing_on
4) see trace results:
cat /sys/kernel/debug/tracing/trace #Open as usual file.
OR
cat /sys/kernel/debug/tracing/trace_pipe #See trace results in real time. May be piped to file. Stop viewing with Ctrl+C. NOTE: reading from this file consumes its output.
#For example: "cat /sys/kernel/debug/tracing/trace_pipe > /tmp/mytemp/trace_results"
5) disable trace:
echo 0 > /sys/kernel/debug/tracing/tracing_on
6) disable whatever tracer you have used ("echo 0")
7) "exit" from root shell
Tracers:
echo 1 > /sys/kernel/debug/tracing/events/ext4/ext4_mark_inode_dirty/enable #will show how apps dirty inodes (they will be written to disk eventually). ATTENTION: redirect output to file in tmpfs instead of watching it in terminal (because terminal writes to pipe inode or socket when it outputs to the screen thus dirtying it and will just flood your output).
echo 1 > /sys/kernel/debug/tracing/events/ext4/ext4_sync_file_enter/enable #try to look if some application uses fsync aggressively thus making system to immediately write data to disk.
1. block_dump (see post 73). I should mention again that you may skip creating tempfs dir altogether.
2. find (see post 73).
3. ftrace
FTRACE
Note: ftrace should be enabled on most more or less recent systems by default.
Overall usage: debug/tracing/ tracing_ on debug/tracing/ trace #Open as usual file. debug/tracing/ trace_pipe #See trace results in real time. May be piped to file. Stop viewing with Ctrl+C. NOTE: reading from this file consumes its output. debug/tracing/ trace_pipe > /tmp/mytemp/ trace_results" debug/tracing/ tracing_ on
ATTENTION: overall rule - after you have traced whatever you wanted return all values to the state they were in before trace (usually disabled)! Use "cat" to check them beforehand.
1) sudo -i
2) enable required tracer (see below)
3) enable trace:
echo 1 > /sys/kernel/
4) see trace results:
cat /sys/kernel/
OR
cat /sys/kernel/
#For example: "cat /sys/kernel/
5) disable trace:
echo 0 > /sys/kernel/
6) disable whatever tracer you have used ("echo 0")
7) "exit" from root shell
Tracers:
echo 1 > /sys/kernel/ debug/tracing/ events/ ext4/ext4_ mark_inode_ dirty/enable #will show how apps dirty inodes (they will be written to disk eventually). ATTENTION: redirect output to file in tmpfs instead of watching it in terminal (because terminal writes to pipe inode or socket when it outputs to the screen thus dirtying it and will just flood your output).
echo 1 > /sys/kernel/ debug/tracing/ events/ ext4/ext4_ sync_file_ enter/enable #try to look if some application uses fsync aggressively thus making system to immediately write data to disk.