tobert / pcstat

Page Cache stat: get page cache stats for files on Linux
Apache License 2.0
1.23k stars 153 forks source link

some file appears to be 0 bytes in length #22

Open coboe opened 4 years ago

coboe commented 4 years ago

once a file is 0 bytes, pcstat is stop. and do not deal with other files.

$ ./pcstat /lib/x86_64-linux-gnu/libnsl-2.27.so |--------------------------------------+----------------+------------+-----------+---------| | Name | Size | Pages | Cached | Percent | |--------------------------------------+----------------+------------+-----------+---------| | /lib/x86_64-linux-gnu/libnsl-2.27.so | 97176 | 24 | 24 | 100.000 | |--------------------------------------+----------------+------------+-----------+---------|

$ ./pcstat /lib/x86_64-linux-gnu/libnsl-2.27.so /lib/x86_64-linux-gnu/liblzma.so.5.2.2 |----------------------------------------+----------------+------------+-----------+---------| | Name | Size | Pages | Cached | Percent | |----------------------------------------+----------------+------------+-----------+---------| | /lib/x86_64-linux-gnu/libnsl-2.27.so | 97176 | 24 | 24 | 100.000 | | /lib/x86_64-linux-gnu/liblzma.so.5.2.2 | 153984 | 38 | 38 | 100.000 | |----------------------------------------+----------------+------------+-----------+---------|

$ ./pcstat /home/gpu2/data1/rook/osd2/current/omap/LOCK 2019/11/21 08:07:04 /home/gpu2/data1/rook/osd2/current/omap/LOCK appears to be 0 bytes in length

$ ./pcstat /lib/x86_64-linux-gnu/libnsl-2.27.so /lib/x86_64-linux-gnu/liblzma.so.5.2.2 /home/gpu2/data1/rook/osd2/current/omap/LOCK 2019/11/21 08:08:30 /home/gpu2/data1/rook/osd2/current/omap/LOCK appears to be 0 bytes in length

wangdepeng commented 4 years ago

encountered the same issue.

tobert commented 3 years ago

Interesting. I can't seem to reproduce it locally but will keep trying.