avc_cache_stats(3)
β¨ NAME β¨
okay bestie, say hi to avc_cache_stats, avc_av_stats, and avc_sid_stats β the little trio that lets you obtain userspace SELinux AVC statistics. π
This page lives in the SELinux API documentation and it's literally called avc_cache_stats(3). π«Ά
πΈ SYNOPSIS πΈ
#include <selinux/selinux.h>
#include <selinux/avc.h>
void avc_av_stats(void);
void avc_sid_stats(void);
void avc_cache_stats(struct avc_cache_stats *stats);
π DESCRIPTION π
The userspace AVC maintains two internal hash tables, bestie: one to store security ID's and one to cache access decisions. β¨
avc_av_stats() and avc_sid_stats() produce log messages indicating the status of the access decision and SID tables, respectively. Those messages contain the number of entries in the table, number of hash buckets and number of buckets used, and maximum number of entries in a single bucket. π
avc_cache_stats() populates a structure whose fields reflect cache activity:
struct avc_cache_stats {
unsigned entry_lookups;
unsigned entry_hits;
unsigned entry_misses;
unsigned entry_discards;
unsigned cav_lookups;
unsigned cav_hits;
unsigned cav_probes;
unsigned cav_misses;
};
entry_lookupsβ Number of queries made. πentry_hitsβ Number of times a decision was found in theaerefargument. βentry_missesβ Number of times a decision was not found in theaerefargument. βentry_discardsβ Number of times a decision was not found in theaerefargument and theaerefargument was non-NULL. πcav_lookupsβ Number of cache lookups. πcav_hitsβ Number of cache hits. π―cav_missesβ Number of cache misses. πcav_probesβ Number of entries examined while searching the cache. π΅οΈβοΈ
π NOTES π
When the cache is flushed as a result of a call to avc_reset() or a policy change notification, the statistics returned by avc_cache_stats() are reset to zero. The SID table, however, is left unchanged. π«
When a policy change notification is received, a call to avc_av_stats() is made before the cache is flushed. β³
π«Ά AUTHOR π«Ά
Eamon Walsh <ewalsh@tycho.nsa.gov> β iconic. π
π SEE ALSO π
mwah π this page was served fresh on 27 May 2004, and it's literally avc_cache_stats(3) β periodt. β¨
π¦ where this page comes from
- alpine 3.24: libselinux-doc 3.10-r1 Β· Public-Domain
- centos-stream 10: libselinux-devel 3.11-3.el10 Β· LicenseRef-Fedora-Public-Domain
- centos-stream 9: libselinux-devel 3.6-5.el9 Β· Public Domain
- centos-stream 9: libselinux-devel 3.6-5.el9 Β· Public Domain
- debian bookworm: libselinux1-dev 3.4-1+b6
- debian trixie: libselinux1-dev 3.8.1-1 Β· LicenseRef-public-domain
- fedora 43: libselinux-devel 3.9-5.fc43 Β· LicenseRef-Fedora-Public-Domain
- fedora 43: libselinux-devel 3.9-5.fc43 Β· LicenseRef-Fedora-Public-Domain
- fedora 44: libselinux-devel 3.10-1.fc44 Β· LicenseRef-Fedora-Public-Domain
- fedora 44: libselinux-devel 3.10-1.fc44 Β· LicenseRef-Fedora-Public-Domain
- fedora 44: libselinux-devel 3.11-2.fc44 Β· LicenseRef-Fedora-Public-Domain
- fedora 44: libselinux-devel 3.11-2.fc44 Β· LicenseRef-Fedora-Public-Domain
- nixos 26.05: libselinux 3.10
- nixpkgs unstable: libselinux 3.11
- opensuse-leap 16.0: libselinux-devel 3.8.1-160000.4.1 Β· SUSE-Public-Domain
- opensuse-leap 16.0: libselinux-devel 3.8.1-160000.4.1 Β· SUSE-Public-Domain
- opensuse-leap 16.0: libselinux-devel 3.8.1-160000.4.1 Β· SUSE-Public-Domain
- opensuse-leap 16.0: libselinux-devel 3.8.1-160000.4.1 Β· SUSE-Public-Domain
- ubuntu jammy: libselinux1-dev 3.3-1build2
- ubuntu noble: libselinux1-dev 3.5-2ubuntu2 Β· LicenseRef-public-domain
- ubuntu noble: libselinux1-dev 3.5-2ubuntu2.1 Β· LicenseRef-public-domain
- ubuntu questing: libselinux1-dev 3.8.1-1build1
- ubuntu resolute: libselinux-dev 3.9-4build1 Β· LicenseRef-public-domain
- ubuntu stonking: libselinux-dev 3.11-2.1 Β· LicenseRef-public-domain
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms