`arc_summary` no longer works with kernel 5.15. It used to work with previous kernel like 5.13.
# Steps to reproduce
1) setup 20.04 with HWE kernel 5.15
2) install `zfsutils-linux`
3) run `arc_summary`
$ arc_summary
Traceback (most recent call last):
File "/usr/sbin/arc_summary", line 875, in <module>
main()
File "/usr/sbin/arc_summary", line 826, in main
kstats = get_kstats()
File "/usr/sbin/arc_summary", line 259, in get_kstats
with open(PROC_PATH+section, 'r') as proc_location:
FileNotFoundError: [Errno 2] No such file or directory: '/proc/spl/kstat/zfs/xuio_stats'
# Issue description
`arc_summary` no longer works with kernel 5.15. It used to work with previous kernel like 5.13.
# Steps to reproduce
1) setup 20.04 with HWE kernel 5.15 arc_summary" , line 875, in <module> arc_summary" , line 826, in main arc_summary" , line 259, in get_kstats PATH+section, 'r') as proc_location: spl/kstat/ zfs/xuio_ stats'
2) install `zfsutils-linux`
3) run `arc_summary`
$ arc_summary
Traceback (most recent call last):
File "/usr/sbin/
main()
File "/usr/sbin/
kstats = get_kstats()
File "/usr/sbin/
with open(PROC_
FileNotFoundError: [Errno 2] No such file or directory: '/proc/
Indeed, the xuio_stats file isn't there anymore: kstat/zfs/
$ ll /proc/spl/
total 0
dr-xr-xr-x 21 root root 0 Jul 6 10:49 ./
dr-xr-xr-x 4 root root 0 Jul 6 10:49 ../
-rw-r--r-- 1 root root 0 Jul 6 10:49 abdstats
-rw-r--r-- 1 root root 0 Jul 6 10:49 arcstats
dr-xr-xr-x 20 root root 0 Jul 6 10:49 data/
-rw------- 1 root root 0 Jul 6 10:49 dbgmsg
-rw------- 1 root root 0 Jul 6 10:49 dbufs
-rw-r--r-- 1 root root 0 Jul 6 10:49 dbufstats
dr-xr-xr-x 70 root root 0 Jul 6 10:49 default/
-rw-r--r-- 1 root root 0 Jul 6 10:49 dmu_tx
-rw-r--r-- 1 root root 0 Jul 6 10:49 dnodestats
-rw-r--r-- 1 root root 0 Jul 6 10:49 fletcher_4_bench
-rw-r--r-- 1 root root 0 Jul 6 10:49 fm
-rw-r--r-- 1 root root 0 Jul 6 10:49 import_progress
-rw-r--r-- 1 root root 0 Jul 6 10:49 metaslab_stats
-rw-r--r-- 1 root root 0 Jul 6 10:49 vdev_cache_stats
-rw-r--r-- 1 root root 0 Jul 6 10:49 vdev_mirror_stats
-rw-r--r-- 1 root root 0 Jul 6 10:49 vdev_raidz_bench
-rw-r--r-- 1 root root 0 Jul 6 10:49 zfetchstats
-rw-r--r-- 1 root root 0 Jul 6 10:49 zil
-rw-r--r-- 1 root root 0 Jul 6 10:49 zstd
# Workaround
This (naive) patch sidesteps the problem:
$ diff -Naur /usr/sbin/ arc_summary. old /usr/sbin/ arc_summary arc_summary. old 2022-07-06 10:59:50.752833101 -0400 arc_summary 2022-07-06 10:59:22.449113169 -0400 PATHS.values( )
--- /usr/sbin/
+++ /usr/sbin/
@@ -255,6 +255,8 @@
secs = SECTION_
for section in secs: exists( PROC_PATH+ section) :
+ if not os.path.
+ continue
with open(PROC_ PATH+section, 'r') as proc_location:
lines = [line for line in proc_location]
# Additional information generic- hwe-20. 04 us.archive. ubuntu. com/ubuntu focal-updates/main amd64 Packages dpkg/status 8.3-1ubuntu12. 9 500 security. ubuntu. com/ubuntu focal-security/main amd64 Packages 8.3-1ubuntu12 500 us.archive. ubuntu. com/ubuntu focal/main amd64 Packages generic- hwe-20. 04: 41.44~20. 04.13 41.44~20. 04.13 41.44~20. 04.13 400 us.archive. ubuntu. com/ubuntu focal-proposed/main amd64 Packages dpkg/status 13.0.52. 59~20.04. 31 500 us.archive. ubuntu. com/ubuntu focal-updates/main amd64 Packages security. ubuntu. com/ubuntu focal-security/main amd64 Packages us.archive. ubuntu. com/ubuntu focal/main amd64 Packages
$ lsb_release -rd
Description: Ubuntu 20.04.4 LTS
Release: 20.04
$ uname -r
5.15.0-41-generic
$ apt-cache policy zfsutils-linux linux-image-
zfsutils-linux:
Installed: 0.8.3-1ubuntu12.14
Candidate: 0.8.3-1ubuntu12.14
Version table:
*** 0.8.3-1ubuntu12.14 500
500 http://
100 /var/lib/
0.
500 http://
0.
500 http://
linux-image-
Installed: 5.15.0.
Candidate: 5.15.0.
Version table:
*** 5.15.0.
400 http://
100 /var/lib/
5.
500 http://
500 http://
5.4.0.26.32 500
500 http://