Closed porg closed 2 years ago
Some thoughts:
sed | uniq
pipeline, i.e. when fatrace writes directly to the TTY? This uses line buffering, while pipelining switches to much larger buffers (usually around 1K or so). Version 0.16.3 improved this so that pipelining/sed etc. works as expected, but you are still using the previous version.#define DEBUG 1
here, and give me the output?Thanks!
Sorry that I forgot to mention:
$ fatrace | sed -En 's!/dev-disk-by-uuid-[^/]+/!/âĸâĸâĸ/!p' | uniq
/srv/dev-disk-by-uuid-LONG-UID
is an EXT4echo "bla" > /srv/dev-disk-by-uuid-LONG-UID/file.txt
I strangely get no output.I meant if you just call fatrace
, do you get events for that device?
Otherwise, try the ARM binary from https://github.com/martinpitt/fatrace/issues/19#issuecomment-1186807249 , that includes the buffering improvement.
For enabling debugging, I meant that you replace the existing line 48
#define DEBUG 0
with
#define DEBUG 1
and build.
fatrace
.fatrace
with the grep "test-
pipe after it at least, which I had to use b/c currently there was too much noise on my system going on.
File deletion events triggered by "rm test-*" were not picked up
You will get an event on the directory that contained the file you removed, not the file itself. Sorry, that's all that Linux gives -- as the thing that is modified with a deletion is really the containing directory. The file itself is never touched.
Ok. Good to know. If needed to test for file deletions one day one could then find some workaround, e.g. to check for the non-existence of a file and then see whether its parent directory changed its change-timestamps, and from this can deduce that a deletion must have taken place.
This addressed my last open question. The rest worked fine.
â Closing issue. Thanks for the conversation!
Reproduction
In one Terminal window I am already on my NAS via SSH as root. There I have a fatrace up for monitoring: (with sed shortening the ultra long disk-uid for better readability)
In another Terminal window I now connect to my NAS via SSH as me (myself)
I now
ls -l
the HDD filepath:đ No file events in fatrace.
I now press TAB for autocompletion: (which also means a read operation)
đ No file events in fatrace.
I now
ls -l
a bit deeper into the HDD filepath:đ No file events in fatrace.
Now let's do some writing in the shell to the HDD filepath
đ No file events in fatrace.
Why does fatrace show no file activity when this comes from a Shell?
Environment