Skip to content

[FEATURE] Add fscache collector #3321

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,7 @@ devstat | Exposes device statistics | Dragonfly, FreeBSD
drm | Expose GPU metrics using sysfs / DRM, `amdgpu` is the only driver which exposes this information through DRM | Linux
drbd | Exposes Distributed Replicated Block Device statistics (to version 8.4) | Linux
ethtool | Exposes network interface information and network driver statistics equivalent to `ethtool`, `ethtool -S`, and `ethtool -i`. | Linux
fscache | Exposes FS-Cache statistics from `/proc/fs/fscache/stats`. | Linux
interrupts | Exposes detailed interrupts statistics. | Linux, OpenBSD
ksmd | Exposes kernel and system statistics from `/sys/kernel/mm/ksm`. | Linux
lnstat | Exposes stats from `/proc/net/stat/`. | Linux
Expand Down
64 changes: 64 additions & 0 deletions collector/fixtures/e2e-64k-page-output.txt
Original file line number Diff line number Diff line change
Expand Up @@ -829,6 +829,69 @@ node_filefd_maximum 1.631329e+06
# HELP node_forks_total Total number of forks.
# TYPE node_forks_total counter
node_forks_total 26442
# HELP node_fscache_acquire_attempts_total Number of acquire operations attempted (Acquire: n=attempts).
# TYPE node_fscache_acquire_attempts_total counter
node_fscache_acquire_attempts_total 31998
# HELP node_fscache_acquire_success_total Number of acquire operations successful (Acquire: ok=success).
# TYPE node_fscache_acquire_success_total counter
node_fscache_acquire_success_total 31986
# HELP node_fscache_allocations_success_total Number of successful allocation operations (Allocs: ok=success).
# TYPE node_fscache_allocations_success_total counter
node_fscache_allocations_success_total 0
# HELP node_fscache_allocations_total Number of allocation operations attempted (Allocs: n=attempts).
# TYPE node_fscache_allocations_total counter
node_fscache_allocations_total 0
# HELP node_fscache_attribute_changes_success_total Number of successful attribute change operations (AttrChg: ok=success).
# TYPE node_fscache_attribute_changes_success_total counter
node_fscache_attribute_changes_success_total 0
# HELP node_fscache_attribute_changes_total Number of attribute change operations attempted (AttrChg: n=attempts).
# TYPE node_fscache_attribute_changes_total counter
node_fscache_attribute_changes_total 0
# HELP node_fscache_invalidations_total Number of invalidation operations (Invals: n=tot).
# TYPE node_fscache_invalidations_total counter
node_fscache_invalidations_total 409
# HELP node_fscache_lookups_negative_total Number of negative lookup operations (Lookups: neg=negative).
# TYPE node_fscache_lookups_negative_total counter
node_fscache_lookups_negative_total 0
# HELP node_fscache_lookups_positive_total Number of positive lookup operations (Lookups: pos=positive).
# TYPE node_fscache_lookups_positive_total counter
node_fscache_lookups_positive_total 0
# HELP node_fscache_lookups_total Number of lookup operations (Lookups: n=tot).
# TYPE node_fscache_lookups_total counter
node_fscache_lookups_total 0
# HELP node_fscache_objects_allocated_total Number of index cookies allocated (Cookies: idx=allocated/available/unused).
# TYPE node_fscache_objects_allocated_total counter
node_fscache_objects_allocated_total 16
# HELP node_fscache_objects_available_total Number of index cookies available (Cookies: idx=allocated/available/unused).
# TYPE node_fscache_objects_available_total counter
node_fscache_objects_available_total 0
# HELP node_fscache_objects_culled_total Number of objects culled (CacheEv: cul=culled).
# TYPE node_fscache_objects_culled_total counter
node_fscache_objects_culled_total 0
# HELP node_fscache_objects_retired_total Number of objects retired (CacheEv: rtr=retired).
# TYPE node_fscache_objects_retired_total counter
node_fscache_objects_retired_total 0
# HELP node_fscache_relinquishes_total Number of relinquish operations (Relinqs: n=tot).
# TYPE node_fscache_relinquishes_total counter
node_fscache_relinquishes_total 31939
# HELP node_fscache_retrievals_nobuffer_total Number of retrieval (read) operations failed due to no buffer (Retrvls: nbf=nobuff).
# TYPE node_fscache_retrievals_nobuffer_total counter
node_fscache_retrievals_nobuffer_total 2.551742e+06
# HELP node_fscache_retrievals_success_total Number of successful retrieval (read) operations (Retrvls: ok=success).
# TYPE node_fscache_retrievals_success_total counter
node_fscache_retrievals_success_total 0
# HELP node_fscache_retrievals_total Number of retrieval (read) operations attempted (Retrvls: n=attempts).
# TYPE node_fscache_retrievals_total counter
node_fscache_retrievals_total 2.551742e+06
# HELP node_fscache_stores_success_total Number of successful store (write) operations (Stores: ok=success).
# TYPE node_fscache_stores_success_total counter
node_fscache_stores_success_total 0
# HELP node_fscache_stores_total Number of store (write) operations attempted (Stores: n=attempts).
# TYPE node_fscache_stores_total counter
node_fscache_stores_total 0
# HELP node_fscache_updates_total Number of update operations (Updates: n=tot).
# TYPE node_fscache_updates_total counter
node_fscache_updates_total 0
# HELP node_hwmon_chip_names Annotation metric for human-readable chip names
# TYPE node_hwmon_chip_names gauge
node_hwmon_chip_names{chip="nct6779",chip_name="nct6779"} 1
Expand Down Expand Up @@ -2973,6 +3036,7 @@ node_scrape_collector_success{collector="edac"} 1
node_scrape_collector_success{collector="entropy"} 1
node_scrape_collector_success{collector="fibrechannel"} 1
node_scrape_collector_success{collector="filefd"} 1
node_scrape_collector_success{collector="fscache"} 1
node_scrape_collector_success{collector="hwmon"} 1
node_scrape_collector_success{collector="infiniband"} 1
node_scrape_collector_success{collector="interrupts"} 1
Expand Down
64 changes: 64 additions & 0 deletions collector/fixtures/e2e-output.txt
Original file line number Diff line number Diff line change
Expand Up @@ -851,6 +851,69 @@ node_filefd_maximum 1.631329e+06
# HELP node_forks_total Total number of forks.
# TYPE node_forks_total counter
node_forks_total 26442
# HELP node_fscache_acquire_attempts_total Number of acquire operations attempted (Acquire: n=attempts).
# TYPE node_fscache_acquire_attempts_total counter
node_fscache_acquire_attempts_total 31998
# HELP node_fscache_acquire_success_total Number of acquire operations successful (Acquire: ok=success).
# TYPE node_fscache_acquire_success_total counter
node_fscache_acquire_success_total 31986
# HELP node_fscache_allocations_success_total Number of successful allocation operations (Allocs: ok=success).
# TYPE node_fscache_allocations_success_total counter
node_fscache_allocations_success_total 0
# HELP node_fscache_allocations_total Number of allocation operations attempted (Allocs: n=attempts).
# TYPE node_fscache_allocations_total counter
node_fscache_allocations_total 0
# HELP node_fscache_attribute_changes_success_total Number of successful attribute change operations (AttrChg: ok=success).
# TYPE node_fscache_attribute_changes_success_total counter
node_fscache_attribute_changes_success_total 0
# HELP node_fscache_attribute_changes_total Number of attribute change operations attempted (AttrChg: n=attempts).
# TYPE node_fscache_attribute_changes_total counter
node_fscache_attribute_changes_total 0
# HELP node_fscache_invalidations_total Number of invalidation operations (Invals: n=tot).
# TYPE node_fscache_invalidations_total counter
node_fscache_invalidations_total 409
# HELP node_fscache_lookups_negative_total Number of negative lookup operations (Lookups: neg=negative).
# TYPE node_fscache_lookups_negative_total counter
node_fscache_lookups_negative_total 0
# HELP node_fscache_lookups_positive_total Number of positive lookup operations (Lookups: pos=positive).
# TYPE node_fscache_lookups_positive_total counter
node_fscache_lookups_positive_total 0
# HELP node_fscache_lookups_total Number of lookup operations (Lookups: n=tot).
# TYPE node_fscache_lookups_total counter
node_fscache_lookups_total 0
# HELP node_fscache_objects_allocated_total Number of index cookies allocated (Cookies: idx=allocated/available/unused).
# TYPE node_fscache_objects_allocated_total counter
node_fscache_objects_allocated_total 16
# HELP node_fscache_objects_available_total Number of index cookies available (Cookies: idx=allocated/available/unused).
# TYPE node_fscache_objects_available_total counter
node_fscache_objects_available_total 0
# HELP node_fscache_objects_culled_total Number of objects culled (CacheEv: cul=culled).
# TYPE node_fscache_objects_culled_total counter
node_fscache_objects_culled_total 0
# HELP node_fscache_objects_retired_total Number of objects retired (CacheEv: rtr=retired).
# TYPE node_fscache_objects_retired_total counter
node_fscache_objects_retired_total 0
# HELP node_fscache_relinquishes_total Number of relinquish operations (Relinqs: n=tot).
# TYPE node_fscache_relinquishes_total counter
node_fscache_relinquishes_total 31939
# HELP node_fscache_retrievals_nobuffer_total Number of retrieval (read) operations failed due to no buffer (Retrvls: nbf=nobuff).
# TYPE node_fscache_retrievals_nobuffer_total counter
node_fscache_retrievals_nobuffer_total 2.551742e+06
# HELP node_fscache_retrievals_success_total Number of successful retrieval (read) operations (Retrvls: ok=success).
# TYPE node_fscache_retrievals_success_total counter
node_fscache_retrievals_success_total 0
# HELP node_fscache_retrievals_total Number of retrieval (read) operations attempted (Retrvls: n=attempts).
# TYPE node_fscache_retrievals_total counter
node_fscache_retrievals_total 2.551742e+06
# HELP node_fscache_stores_success_total Number of successful store (write) operations (Stores: ok=success).
# TYPE node_fscache_stores_success_total counter
node_fscache_stores_success_total 0
# HELP node_fscache_stores_total Number of store (write) operations attempted (Stores: n=attempts).
# TYPE node_fscache_stores_total counter
node_fscache_stores_total 0
# HELP node_fscache_updates_total Number of update operations (Updates: n=tot).
# TYPE node_fscache_updates_total counter
node_fscache_updates_total 0
# HELP node_hwmon_chip_names Annotation metric for human-readable chip names
# TYPE node_hwmon_chip_names gauge
node_hwmon_chip_names{chip="nct6779",chip_name="nct6779"} 1
Expand Down Expand Up @@ -2995,6 +3058,7 @@ node_scrape_collector_success{collector="edac"} 1
node_scrape_collector_success{collector="entropy"} 1
node_scrape_collector_success{collector="fibrechannel"} 1
node_scrape_collector_success{collector="filefd"} 1
node_scrape_collector_success{collector="fscache"} 1
node_scrape_collector_success{collector="hwmon"} 1
node_scrape_collector_success{collector="infiniband"} 1
node_scrape_collector_success{collector="interrupts"} 1
Expand Down
29 changes: 29 additions & 0 deletions collector/fixtures/proc/fs/fscache/stats
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
FS-Cache statistics
Cookies: idx=16 dat=31970 spc=0
Objects: alc=0 nal=0 avl=0 ded=0
ChkAux : non=0 ok=0 upd=0 obs=0
Pages : mrk=0 unc=0
Acquire: n=31998 nul=0 noc=0 ok=31986 nbf=0 oom=0
Lookups: n=0 neg=0 pos=0 crt=0 tmo=0
Invals : n=409 run=0
Updates: n=0 nul=0 run=0
Relinqs: n=31939 nul=0 wcr=0 rtr=0
AttrChg: n=0 ok=0 nbf=0 oom=0 run=0
Allocs : n=0 ok=0 wt=0 nbf=0 int=0
Allocs : ops=0 owt=0 abt=0
Retrvls: n=2551742 ok=0 wt=0 nod=0 nbf=2551742 int=0 oom=0
Retrvls: ops=0 owt=0 abt=0
Stores : n=0 ok=0 agn=0 nbf=0 oom=0
Stores : ops=0 run=0 pgs=0 rxd=0 olm=0
VmScan : nos=0 gon=0 bsy=0 can=0 wt=0
Ops : pend=0 run=0 enq=0 can=0 rej=0
Ops : ini=0 dfr=0 rel=0 gc=0
CacheOp: alo=0 luo=0 luc=0 gro=0
CacheOp: inv=0 upo=0 dro=0 pto=0 atc=0 syn=0
CacheOp: rap=0 ras=0 alp=0 als=0 wrp=0 ucp=0 dsp=0
CacheEv: nsp=0 stl=0 rtr=0 cul=0
RdHelp : RA=0 RP=0 WB=0 WBZ=0 rr=0 sr=0
RdHelp : ZR=0 sh=0 sk=0
RdHelp : DL=0 ds=0 df=0 di=0
RdHelp : RD=0 rs=0 rf=0
RdHelp : WR=0 ws=0 wf=0
Loading