Hi,
When i compile a non GENERIC kernel (which mainly removes some debugging and
devices i do not have) the Python program glances fails with the following
message.
[root at jailer ~]# glances
Traceback (most recent call last):
? File "/usr/local/bin/glances", line 8, in <module>
??? sys.exit(main())
? File "/usr/local/lib/python3.9/site-packages/glances/__init__.py",
line 143, in main
??? start(config=config, args=args)
? File "/usr/local/lib/python3.9/site-packages/glances/__init__.py",
line 108, in start
??? mode = GlancesMode(config=config, args=args)
? File "/usr/local/lib/python3.9/site-packages/glances/standalone.py",
line 78, in __init__
??? self.stats.update()
? File "/usr/local/lib/python3.9/site-packages/glances/stats.py", line
234, in update
??? self._plugins[p].update()
? File
"/usr/local/lib/python3.9/site-packages/glances/plugins/glances_plugin.py",
line 925, in wrapper
??? ret = fct(self, *args, **kw)
? File
"/usr/local/lib/python3.9/site-packages/glances/plugins/glances_plugin.py",
line 935, in wrapper
??? ret = fct(*args, **kw)
? File
"/usr/local/lib/python3.9/site-packages/glances/plugins/glances_cpu.py",
line 84, in update
??? stats = self.update_local()
? File
"/usr/local/lib/python3.9/site-packages/glances/plugins/glances_cpu.py",
line 118, in update_local
??? cpu_stats = psutil.cpu_stats()
? File "/usr/local/lib/python3.9/site-packages/psutil/__init__.py",
line 1866, in cpu_stats
??? return _psplatform.cpu_stats()
? File "/usr/local/lib/python3.9/site-packages/psutil/_psbsd.py", line
293, in cpu_stats
??? ctxsw, intrs, soft_intrs, syscalls, traps = cext.cpu_stats()
OSError: [Errno 12] Cannot allocate memory (originated from
sysctlbyname('vm.stats.sys.v_soft'))
[root at jailer ~]# sysctl vm.stats.sys.v_soft
vm.stats.sys.v_soft: 3101
[root at jailer ~]# uname -a
FreeBSD jailer.local 12.2-STABLE FreeBSD 12.2-STABLE r366936 JAILER? amd64
I don't understand what is breaking it as everything else works fine and i
only removed the usual stuff i do. Below is the custom kernel config.
Thanks.
# $FreeBSD: stable/12/sys/amd64/conf/GENERIC 365612 2020-09-10 20:46:16Z erj $
cpu???????????? HAMMER
ident?????????? JAILER
options???????? SCHED_ULE?????????????? # ULE scheduler
options???????? NUMA??????????????????? # Non-Uniform Memory Architecture
support
options???????? PREEMPTION????????????? # Enable kernel thread preemption
options???????? VIMAGE????????????????? # Subsystem virtualization, e.g. VNET
options???????? INET??????????????????? # InterNETworking
options???????? INET6?????????????????? # IPv6 communications protocols
options???????? IPSEC?????????????????? # IP (v4/v6) security
options???????? IPSEC_SUPPORT?????????? # Allow kldload of ipsec and tcpmd5
options???????? TCP_OFFLOAD???????????? # TCP offload
options???????? TCP_BLACKBOX??????????? # Enhanced TCP event logging
options???????? TCP_HHOOK?????????????? # hhook(9) framework for TCP
options???????? TCP_RFC7413???????????? # TCP Fast Open
options???????? SCTP??????????????????? # Stream Control Transmission Protocol
options???????? FFS???????????????????? # Berkeley Fast Filesystem
options???????? SOFTUPDATES???????????? # Enable FFS soft updates support
options???????? UFS_ACL???????????????? # Support for access control lists
options???????? UFS_DIRHASH???????????? # Improve performance on big directories
options???????? PROCFS????????????????? # Process filesystem (requires PSEUDOFS)
options???????? PSEUDOFS??????????????? # Pseudo-filesystem framework
options???????? GEOM_LABEL????????????? # Provides labelization
options???????? EFIRT?????????????????? # EFI Runtime Services support
options???????? SCSI_DELAY=5000???????? # Delay (in ms) before probing SCSI
options???????? KTRACE????????????????? # ktrace(1) support
options???????? STACK?????????????????? # stack(9) support
options???????? SYSVSHM???????????????? # SYSV-style shared memory
options???????? SYSVMSG???????????????? # SYSV-style message queues
options???????? SYSVSEM???????????????? # SYSV-style semaphores
options???????? _KPOSIX_PRIORITY_SCHEDULING # POSIX P1003_1B real-time
extensions
options???????? PRINTF_BUFR_SIZE=128??? # Prevent printf output being
interspersed.
options???????? KBD_INSTALL_CDEV??????? # install a CDEV entry in /dev
options???????? HWPMC_HOOKS???????????? # Necessary kernel hooks for hwpmc(4)
options???????? AUDIT?????????????????? # Security event auditing
options???????? CAPABILITY_MODE???????? # Capsicum capability mode
options???????? CAPABILITIES??????????? # Capsicum capabilities
options???????? MAC???????????????????? # TrustedBSD MAC Framework
options???????? DDB_CTF???????????????? # Kernel ELF linker loads CTF data
options???????? INCLUDE_CONFIG_FILE???? # Include this file in kernel
options???????? RACCT?????????????????? # Resource accounting framework
options???????? RACCT_DEFAULT_TO_DISABLED # Set kern.racct.enable=0 by default
options???????? RCTL??????????????????? # Resource limits
# Make an SMP-capable kernel by default
options???????? SMP???????????????????? # Symmetric MultiProcessor Kernel
options???????? EARLY_AP_STARTUP
# Bus support.
device????????? acpi
options???????? ACPI_DMAR
device????????? pci
options???????? PCI_HP????????????????? # PCI-Express native HotPlug
options???????? PCI_IOV???????????????? # PCI SR-IOV support
# ATA controllers
device????????? ahci??????????????????? # AHCI-compatible SATA controllers
device????????? ata???????????????????? # Legacy ATA/SATA controllers
# ATA/SCSI peripherals
device????????? scbus?????????????????? # SCSI bus (required for ATA/SCSI)
device????????? da????????????????????? # Direct Access (disks)
device????????? cd????????????????????? # CD
device????????? pass??????????????????? # Passthrough device (direct ATA/SCSI
access)
device????????? ses???????????????????? # Enclosure Services (SES and SAF-TE)
#device???????? ctl???????????????????? # CAM Target Layer
# RAID controllers interfaced to the SCSI subsystem
device????????? amr???????????????????? # AMI MegaRAID
device????????? ciss??????????????????? # Compaq Smart RAID 5*
# atkbdc0 controls both the keyboard and the PS/2 mouse
device????????? atkbdc????????????????? # AT keyboard controller
device????????? atkbd?????????????????? # AT keyboard
device????????? psm???????????????????? # PS/2 mouse
device????????? kbdmux????????????????? # keyboard multiplexer
device????????? vga???????????????????? # VGA video card driver
options???????? VESA??????????????????? # Add support for VESA BIOS Extensions
(VBE)
device????????? splash????????????????? # Splash screen and screen saver support
# syscons is the default console driver, resembling an SCO console
device????????? sc
options???????? SC_PIXEL_MODE?????????? # add support for the raster text mode
# vt is the new video console driver
device????????? vt
device????????? vt_vga
device????????? vt_efifb
# Serial (COM) ports
device????????? uart??????????????????? # Generic UART driver
# PCI Ethernet NICs that use the common MII bus controller code.
# NOTE: Be sure to keep the 'device miibus' line in order to use these
NICs!
device????????? miibus????????????????? # MII bus support
device????????? bce???????????????????? # Broadcom BCM5706/BCM5708 Gigabit
Ethernet
# Pseudo devices.
device????????? crypto????????????????? # core crypto support
device????????? loop??????????????????? # Network loopback
device????????? random????????????????? # Entropy device
device????????? padlock_rng???????????? # VIA Padlock RNG
device????????? rdrand_rng????????????? # Intel Bull Mountain RNG
device????????? ether?????????????????? # Ethernet support
device????????? vlan??????????????????? # 802.1Q VLAN support
device????????? tuntap????????????????? # Packet tunnel.
device????????? md????????????????????? # Memory "disks"
device????????? gif???????????????????? # IPv6 and IPv4 tunneling
device????????? firmware??????????????? # firmware assist module
device????????? cryptodev
device????????? aesni
# The `bpf' device enables the Berkeley Packet Filter.
# Be aware of the administrative consequences of enabling this!
# Note that 'bpf' is required for DHCP.
device????????? bpf???????????????????? # Berkeley packet filter
# USB support
options???????? USB_DEBUG?????????????? # enable debug msgs
device????????? uhci??????????????????? # UHCI PCI->USB interface
device????????? ohci??????????????????? # OHCI PCI->USB interface
device????????? ehci??????????????????? # EHCI PCI->USB interface (USB 2.0)
device????????? xhci??????????????????? # XHCI PCI->USB interface (USB 3.0)
device????????? usb???????????????????? # USB Bus (required)
device????????? ukbd??????????????????? # Keyboard
device????????? umass?????????????????? # Disks/Mass storage - Requires scbus
and da
# Netmap provides direct access to TX/RX rings on supported NICs
device????????? netmap????????????????? # netmap(4) support