FAPOLICYD.STATE(5)
π NAME π
fapolicyd.state β the fapolicyd runtime state report file. That's the whole concept, bestie. (You're reading FAPOLICYD.STATE(5), in case the terminal dropped you here and you forgot how you got in π
)
πΈ DESCRIPTION πΈ
okay so, picture this: /run/fapolicyd/fapolicyd.state is the file that holds the most recent daemon state report. Where does it come from? Either you asked for it with fapolicyd-cli --check-status, or it just β¨appearedβ¨ because periodic interval reporting did its thing. Both count. π«Ά
And what is a state report, you ask? It's the answer to the eternal question: is my daemon healthy and configured the way I expected? π©Ί If you want the numbers-numbers β runtime counters, rule hit counts, cache effectiveness metrics, attribute lookup tables, and queue/defer activity β those live in /run/fapolicyd/fapolicyd.metrics, not here. Different file, different vibe.
Formatting tea, real quick, because it matters when you're grepping:
- Every field is printed as a
name: valueline. Every single one. - Section headers end in a colon. That's how you spot 'em.
- Worker-specific health and queue drill-down fields get indented by two spaces, tucked under the section they belong to. Cute little nesting situation. πͺ
π STATE REPORT π
π§ Operating mode
Permissiveβ is the daemon running in permissive mode or not? And here's the plot twist you need to know: in permissive mode, policy denials still get reported as denied decisions, but the response that actually goes back to the kernel allows access. Denial in the report, yes in real life. πIntegrityβ the configured file integrity mode used for trust checks. Whatever you set, it shows up here.reset_strategyβ which metrics reset strategy is active. The options are:never, which just lets metrics grow for the daemon's whole lifetime (no thoughts, head empty, forever);auto, which resets timer-generated metrics reports; andmanual, which allows privileged signal-generated reset requests like the one fromfapolicyd-cli --reset-metrics. πConfig generationβ the immutable decision configuration generation the daemon has currently published. Every successful reload publishes a fresh generation for decision-used fields like permissive mode and integrity mode, so that one decision never mixes values from different reloads. Consistency queen. β¨Ruleset generationβ the current in-memory ruleset generation. This number increments every time the daemon publishes a fully validated ruleset. Fully validated, no shortcuts.Trust database generationβ the trust database generation currently published, and the one new decision reads use. Heads up: this is a daemon-runtime generation that starts at1during startup. The effective-since timestamp is the moment the generation got published. πLMDB environment generationβ the physical LMDB environment generation currently opened by the daemon. Starts at1during startup and increments when fapolicyd publishes a rebuilt LMDB environment during controlled compaction. And yes, these are two different things, don't confuse them: a trust database generation is a logical content epoch inside an environment, while an LMDB environment generation is the storage epoch holding the LMDB page map, free list, and high-water state. Two layers, both real. π§Trust database entriesβ how many records are in the currently published trust database generation. Count 'em.Timing collection modeβ the configured timing collection control mode.Timing collection armedβ is a manual timing run active right now, or nah?Timing collection last start timeβ the wall-clock time of the last successful timing start request, orneverif timing has never been started.Timing collection last stop timeβ the wall-clock time of the last successful timing stop request, orneverif timing has never been stopped. β±οΈ
π₯ Headline activity
Allowed accessesβ the number of policy decisions that allowed access. Slay. πDenied accessesβ the number of policy decisions that denied access. And here's the reminder: in permissive mode these decisions are still counted as denials, even though the daemon lets the kernel have access anyway. The counter does not care about your feelings. π
π οΈ Resource configuration
Daemon PIDβ the process ID of the daemon process that wrote this very report. It's signing its work. ποΈCPU coresβ the number of online processor cores the system reported.decision_threadsβ the configured decision worker count, straight fromfapolicyd.conf.Per worker q_sizeβ the configured size of each decision worker's internal event queue.Per worker Subject defer array sizeβ how many preallocated entries each decision worker's subject-slot defer array has to work with.Per worker Subject cache sizeβ the configured number of entries in each decision worker's subject cache.Per worker Object cache sizeβ the configured number of entries in each decision worker's object cache.Trust database max pagesβ the current maximum LMDB map page count for the trust database environment. This reflects the map size the daemon has currently opened, including any automatic resize it applied for reload headroom. πTrust database max readersβ the configured LMDB reader-slot limit. It's sized fordecision_threadsplus maintenance readers, so everybody gets a seat. πͺ
π Resource utilization
Trust database pages in useβ the number and percentage of LMDB pages currently used by the active trust database contents. Important distinction, bestie: this is the active named-database footprint, not the LMDB environment high-water mark. πTrust database allocated high-water pagesβ the number and percentage of LMDB map pages that have been allocated in the environment. This follows LMDB's file high-water mark, and it can be higher than the active trust database footprint after drop/rebuild reloads β because LMDB can't reuse pages until transactions and freelist metadata allow it. It's not being wasteful on purpose, it's just LMDB rules. π And whendb_max_sizeis set toauto, fapolicyd uses this value as reload-headroom pressure, while active pages show the steady-state trust database size.Retired trust database generationsβ how many old trust generations are sitting around waiting for readers to drain before their named databases can be reclaimed. They're in the waiting room. ποΈOldest retired trust database generation ageβ the age in seconds of the oldest retired trust generation still waiting for a safe reclamation.Max trust database generation reclaim delayβ the longest delay in seconds anyone has ever observed between retiring an old trust generation and reclaiming its named database. Personal record. πTrust database resize recommendedβ does the current LMDB sizing state suggest bumping up a manually configureddb_max_size? Heads up on the print rules: this field only shows up whendb_max_sizeis a numeric value. It gets omitted whendb_max_sizeisauto, because auto mode grows the map itself before rebuilds. It's got it handled. πTrust database resize reasonβ the short explanation for that manual resize recommendation.Trust database resize targetβ the recommended minimumdb_max_sizein MiB. Printed only when manual resize is actually recommended.Trust database compaction recommendedβ does the current LMDB sizing state suggest running controlled trust database compaction? Compaction gets recommended when the allocated LMDB high-water mark is much larger than the active trust database footprint and no retired trust generations are pinned.Trust database compaction reasonβ short explanation for the recommendation. And if retired generations are pinned, the recommendation isno, because readers must drain before the environment can be safely replaced. Safety first, always. π¦ΊTrust database compaction targetβ the current map-size target in MiB for a compact rebuilt environment. Printed when compaction is recommended.Subject slots in useβ the number and percentage of subject cache slots currently occupied.Object slots in useβ the number and percentage of object cache slots currently occupied.glibc arena (total memory) isβ the current total glibc heap arena size in KiB, followed by the value from the previous report. Only printed when the daemon is built withmallinfo2(3)support.glibc uordblks (in use memory) isβ the current allocated heap memory in KiB, followed by the value from the previous report. Only printed whenmallinfo2(3)support is available.glibc fordblks (total free space) isβ the current free heap memory in KiB, followed by the value from the previous report. Only printed whenmallinfo2(3)support is available.
π¨ Health indicators
Any non-zero counter in this section warrants investigation. Like, genuinely. Go look. π
Kernel queue overflowβ the number ofFAN_Q_OVERFLOWevents the kernel reported. A non-zero value means kernel fanotify events were lost before the daemon could even process them. That's data that just vanished. πFilesystem errorsβ the number ofFAN_FS_ERRORevents reported by the kernel. Note the category: these are filesystem health events, not policy decisions. Different thing entirely.Filesystem error last statusβ parser status for the most recentFAN_FS_ERRORevent. One of:none,ok,missing_error_record, ormalformed.Filesystem error last seenβ the wall-clock time of the most recentFAN_FS_ERRORevent, orneverwhen no filesystem error has been reported. (Hope it saysneverπ«Ά)Filesystem error last errnoβ the errno-style error code from the most recent parseable filesystem error event.Filesystem error last suppressed countβ the kernel-reported count of additional filesystem errors that got suppressed behind the most recent error notification. Yeah, there were more. πReply errorsβ the number of failed or short writes when sending fanotify permission responses back to the kernel. The reply didn't land. That's bad.Decision worker N healthβ a compact health line for one decision worker. It packs in a derived state, heartbeat age, and current event age. The state isidle,busy, orstalled. An idle worker reportscurrent_event=idle. And queue depth plus oldest queued event age? Those come from the per-worker queue entries that follow, not from this line. β¨Decision worker N current queue depthβ the number of fanotify permission events currently waiting in that worker's queue.Decision worker N max queue depthβ the highest queue depth that worker has hit since the last metrics reset. Its personal best, unfortunately. πDecision worker N queue full countβ the number of failed enqueue attempts for that worker since the last metrics reset.Decision worker N oldest queued ageβ the age of the oldest event currently waiting in that worker's queue. Formatted with a human-readable unit likemsors, so you don't have to do math. πSubject defer fallbacksβ the number of times the defer array was full and fapolicyd fell back to the historical subject cache eviction behavior. Plan B got used.Early subject cache evictionsβ the number of subject cache entries evicted before process startup state was complete. Rude, but it happens.Subject BUILDING tracer evictionsβ how many BUILDING subject cache entries got evicted because the process that owned the slot was being traced and could've justβ¦ sat there holding it forever π not on our watch.Subject BUILDING stale evictionsβ how many BUILDING subject cache entries got evicted because their startup state never finished in time, past the bounded stale window. bestie took too long getting ready, we left without her π«ΆSubject defer oldest ageβ the age of the oldest subject event that's currently deferred, formatted with a human-readable unit likemsors.Failure action queue_full (observe)β how many times the internal userspace event queue was full.Failure action kernel_queue_overflow (observe)β how many kernel fanotify queue overflow events happened.Failure action worker_stall (terminate)β how many decision worker stall detections happened.Failure action rule_reload_failure (observe)β how many rule reload failures happened. Heads up: a failed transactional reload preserves the previous published policy when one exists, so it's not the end of the world πFailure action trust_reload_failure (observe)β how many trust database reload failures happened.Failure action response_write_failure (observe)β how many fanotify response writes back to the kernel failed or came out incomplete.Failure action fanotify_filesystem_error (observe)β how manyFAN_FS_ERRORfilesystem health events the kernel reported. the kernel is basically sending you a "we need to talk" text π
π Watched mounts π
watching mountβ one line gets printed for every mount point that's currently marked for fanotify monitoring. one line per mount, no skimping β¨
π NOTES π
Okay so this next bit is important, don't scroll past it bestie π
These ones, and I mean all of these: Allowed accesses, Denied accesses, Config generation, Ruleset generation, Trust database generation, LMDB environment generation, Trust database entries, Decision worker N health, Decision worker N current queue depth, Decision worker N max queue depth, Decision worker N queue full count, Decision worker N oldest queued age, Subject defer fallbacks, Early subject cache evictions, Subject BUILDING tracer evictions, and Subject BUILDING stale evictions β they intentionally show up in both the state report and the metrics report. no, it's not a copy-paste accident, it's a design choice and it ate π₯
Why though? In the state report they're giving you health and activity context. In the metrics report they're describing the current report context and the counter window. same names, different job, main character energy in both π
β οΈ And this part matters: metrics resets only affect the counters in the metrics report. Static configuration, current utilization snapshots, watched mounts, and health indicators are not reset by fapolicyd-cli --reset-metrics. so don't come for them, they're staying πΈ
π FILES π
/run/fapolicyd/fapolicyd.stateβ the runtime state report file./run/fapolicyd/fapolicyd.metricsβ the runtime metrics report file./run/fapolicyd/fapolicyd.timingβ the manual decision timing report. it gets written when a privileged stop request ends an armed timing run, when a stop request finds timing unarmed, or when timing collection stops to avoid counter overflow. three very specific situations, and she shows up for all of them π
π¦ SEE ALSO π¦
fapolicyd(8), fapolicyd-cli(8), fapolicyd.conf(5), fapolicyd.metrics(5), fapolicyd.rules(5), fapolicyd.timing(5), and fapolicyd.trust(5). go read your sisters, they're all iconic π
and that's the whole page, bestie!! this one came from Red Hat, dated May 2026, and it lives at FAPOLICYD.STATE(5) β go forth and read your state report with confidence πβ¨
π¦ where this page comes from
- centos-stream 10: fapolicyd 2.0.1-1.el10 Β· GPL-3.0-or-later
- centos-stream 9: fapolicyd 2.0.1-1.el9 Β· GPL-3.0-or-later
- fedora 43: fapolicyd 2.0-1.fc43 Β· GPL-3.0-or-later
- fedora 44: fapolicyd 2.0.1-1.fc44 Β· GPL-3.0-or-later
- ubuntu stonking: fapolicyd 2.0-1 Β· GPL-3.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms