CACHESTATS(1)
πΎ CACHESTATS πΎ
okay bestie, so cachestats is literally the tool that tells you how much of your file is chillin' in the cache versus how much of it is out there fighting for its life on disk. it prints the number of cached vs. not-cached pages. that's the whole vibe. no cap. β¨
πΈ SYNOPSIS πΈ
cachestats [-qv] file
π¦ DESCRIPTION π¦
so basically, it prints the number of cached pages versus the pages that are not cached. that's it, that's the tea. your file's cache status, served fresh. π
β¨ OPTIONS β¨
-v"Verbose mode" β turns on the verbose cache map, where every page that's actually present in the cache gets marked with anx. a whole lil grid of x's, it's giving spreadsheet but make it iconic. π-q"Quiet mode" β the exit status is0(success) if the file is fully cached. lowkey the perfect vibe check for scripting, iykyk. π«Ά
π EXAMPLE π
$ cachestats -v ~/somefile.mp3
pages in cache: 85/114 (74.6%) [filesize=453.5K, pagesize=4K]
cache map:
0: |x|x|x|x|x|x|x|x|x|x|x|x|x|x|x|x|x|x|x|x|x|x|x|x|x|x|x|x|x|x|x|x|
32: |x|x|x|x|x|x|x|x|x|x|x|x|x|x|x|x|x|x|x|x|x|x|x|x|x|x|x|x|x|x|x|x|
64: |x|x|x|x|x|x|x|x|x|x|x|x|x|x|x|x|x|x|x|x| | | | | | | | | | | | |
96: | | | | | | | | | | | | | | | | | |x|
look at all those x's going hard for the first 85 pages, and then the empty slots just... sitting there. the gap at the end of line 64 and most of line 96 is not the moment, fr fr. π but hey, 74.6% cached is still eating. π₯
π SEE ALSO π
Also, you can use vmstat 1 to view cache statistics. a little bonus bestie, go check it out. β
and that's the whole page, mwah. this one's cachestats, from March 2013 β go forth and cache-check your faves. π§π
π¦ where this page comes from
- debian bookworm: nocache 1.1-1+b1 Β· BSD-2-Clause
- debian trixie: nocache 1.2-0.1 Β· BSD-2-Clause
- ubuntu jammy: nocache 1.1-1 Β· BSD-2-Clause
- ubuntu noble: nocache 1.1-1 Β· BSD-2-Clause
- ubuntu questing: nocache 1.2-0.1
- ubuntu resolute: nocache 1.2-0.1build1 Β· BSD-2-Clause
- ubuntu stonking: nocache 1.2-0.1build1 Β· BSD-2-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms