# tobert/pcstat

Page Cache stat: get page cache stats for files on Linux

Repository: https://github.com/tobert/pcstat
Canonical: https://ross.abutalabs.com/products/pcstat
Language: Go
License: Apache-2.0
License Family: permissive
Last push: 2024-07-25T15:43:52+00:00

## Health v2 (maintenance only)
Score: 23/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 0, release rhythm 8, longevity 100
- inputs: {"age_days": 4508, "days_push": 769, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1310, forks 153 (observed 2026-08-28T04:04:19.882392+00:00)

## What it is
pcstat is a small Go command-line utility that reports Linux page cache statistics for individual files using the mincore(2) syscall. It shows file size, page count, cached pages, and cache percentage, with human-readable, terse, JSON, and histogram output modes.

## Use cases
- check if linux is caching my file
- see which database files are in page cache
- page cache statistics for files on linux
- verify sstable caching for cassandra
- diagnose why my database reads are hitting disk
- scriptable cache usage report per file

## When to choose
- you are tuning a database like Cassandra or another IO-intensive app on Linux and need to confirm whether the kernel is caching your data files
- you want a quick point-in-time per-file cache report from the shell
- you need machine-readable output (terse or JSON) to feed into scripts or monitoring

## When to avoid
- you are on a non-Linux platform, since the tool targets the Linux page cache and mincore syscall
- you need continuous, long-term cache metrics collection rather than on-demand snapshots
- you need per-process memory or cache accounting instead of per-file cache status

## Facets
- artifact type: cli-tool
- maturity: stable
- function: cli, monitoring, developer-tools
- domain: developer-tools, performance, databases, operating-systems
- platform: go, cli
- tags: page-cache, mincore, linux-kernel, io-tuning, database-tuning, cassandra, filesystem, system-administration, performance-diagnostics, json-output, command-line, linux

## Member repositories
- tobert/pcstat (main) score 23

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:04:19.882392+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T04:49:56.886235+00:00, confidence not recorded.
  - readme: https://github.com/tobert/pcstat (fetched 2026-08-28T04:04:19.882392+00:00, sha 15019243c84d)
- Data as of 2026-08-30T08:39:29.467469+00:00.
