Skip to content

Releases: oshi/oshi

Release 7.7.3

Choose a tag to compare

@dbwiddis dbwiddis released this 31 Oct 07:36
Bug Fixes and Improvements
  • #3837: Reject IPv6 address text with a dotted IPv4 component before compressed zero groups - @PHJ2000.
  • #3843: HWDiskStore.getDiskType() on Windows now reports SSD, HDD, Removable or Virtual, read from the storage driver and falling back to MSFT_PhysicalDisk - @dbwiddis.
  • #3848: Fixed listing processes on DragonFly BSD, which could panic the kernel since 7.7.2. OSProcess.getPath() there now reads the full path from the kernel for the current process only, and argv[0] or the command name for others - @dbwiddis.
  • #3852: Fixed IPv4 and IPv6 addresses reported byte-reversed on big-endian Linux, such as s390x, in NetworkParams.getRoutes() and InternetProtocolStats.getConnections() - @dbwiddis.
  • #3853: NetworkParams.getIpv4DefaultGateway() and getIpv6DefaultGateway() on Linux now read the kernel routing table, so they no longer return an empty string when the route command is missing or not on the PATH - @dbwiddis.

Full change log

Release 7.7.2

Choose a tag to compare

@dbwiddis dbwiddis released this 20 Oct 13:35
Bug Fixes and Improvements
  • #3785: Fixed DragonFly BSD reporting 0 total swap, and the FFM implementation failing every sysctl read there - @dbwiddis.
  • #3785, #3795, #3800, #3801, #3803, #3822, #3831: Fixed the TCP and UDP statistics from InternetProtocolStats on Linux, macOS, AIX, FreeBSD, OpenBSD, NetBSD and DragonFly BSD, where many counters were read from the wrong field or at the wrong width. Counters a platform does not keep now report 0, including IPv6 UDP on FreeBSD and macOS, and connection failures and UDP receive errors on AIX - @dbwiddis.
  • #3787, #3816: ComputerSystem, Firmware and Baseboard now report SMBIOS values without root on FreeBSD and DragonFly BSD, and at all on NetBSD, where every value was unknown; NetBSD's serial numbers and UUID still need root. Firmware.getReleaseDate() is no longer garbled on any platform when the firmware does not write the date as MM/DD/YYYY - @dbwiddis.
  • #3788, #3807, #3814, #3824: Fixed NetworkIF on the BSDs: traffic statistics were 0 on OpenBSD and DragonFly BSD, and on NetBSD for interfaces without a link-level address, and getSpeed() was always 0 on FreeBSD, OpenBSD and NetBSD. NetworkParams now reports DragonFly BSD's default gateways and reads NetBSD's routing table from the kernel - @dbwiddis.
  • #3789, #3792, #3799, #3812, #3818: Fixed CentralProcessor on FreeBSD, NetBSD and DragonFly BSD, which miscounted cores, packages or logical processors and left identification and caches unknown, and on NetBSD ARM threw a StackOverflowError. AMD processors of family 16 and later now get the right family on OpenBSD and the right ProcessorID where OSHI builds one. FreeBSD context switch and interrupt counts no longer wrap at 2^32 - @dbwiddis.
  • #3791, #3798, #3819, #3833: Fixed getDiskStores() on the BSDs: DragonFly BSD returned no disks, FreeBSD listed each disk as a partition of the next, and NetBSD listed each wedge as a separate disk. Partitions now sit under their disk with their mount points, and on OpenBSD and NetBSD without root they no longer include another disk's or misread their size when BLOCKSIZE is set - @dbwiddis.
  • #3793, #3810, #3817, #3821, #3827, #3829, #3832: Fixed OSProcess on the BSDs. getPath() now returns the executable's full path from the kernel on FreeBSD, DragonFly BSD and NetBSD, as does getCurrentWorkingDirectory() on NetBSD. DragonFly BSD now reports bitness and affinity, FreeBSD other processes' open-file limits, and NetBSD every thread of a process and only real descriptors in getOpenFiles(). getServices() skips rcorder placeholders - @dbwiddis.
  • #3797, #3805, #3826: Fixed getPowerSources() on FreeBSD and DragonFly BSD, which reported a battery on machines with none and only one of several, with units and signs now matching other platforms; getGraphicsCards() on current FreeBSD, which reported the wrong vendor and no device ID; and getUsbDevices() on FreeBSD, which was empty - @dbwiddis.
  • #3808, #3820, #3823, #3825: Fixed FileSystem and OSFileStore on the BSDs. getMaxFileDescriptorsPerProcess() returns the per-process limit, NetBSD's getOpenFileDescriptors() is no longer 0, FreeBSD's getUUID() is found for every volume, and mount points with spaces and NetBSD and OpenBSD inode counts are read correctly - @dbwiddis.

Full change log

Release 7.7.1

Choose a tag to compare

@dbwiddis dbwiddis released this 10 Oct 16:27
Bug Fixes and Improvements
  • #3763: Standardizes connection reporting from InternetProtocolStats.getConnections() on the UNIX platforms. It now includes listening and unconnected sockets, as on Linux, and returns connections on Solaris, where it returned none. A tcp6 or udp6 connection to an IPv4 peer now has a 16-byte IPv4-mapped address rather than a 4-byte one - @dbwiddis.
  • #3771: Fixed Firmware.getManufacturer() on Linux, which never read the BIOS vendor from sysfs - @dbwiddis.
  • #3774: LogicalVolumeGroup.getPhysicalVolumes() on Linux now runs pvs through the oshi.os.linux.privileged.prefix when pvs is in oshi.os.linux.privileged.allowlist, so physical volumes that hold no logical volume can be listed without running the application as root - @dbwiddis.
  • #3777: Fixed the heap corruption behind intermittent JVM crashes on Solaris and illumos - @dbwiddis.
  • #3781: Sensors.getCpuTemperature() now returns a 0.0 sentinel on all platforms when the temperature is unavailable. FreeBSD previously returned NaN - @dbwiddis.
  • #3776, #3782: Fixed intermittent JVM crashes on Solaris (illumos), OpenBSD and DragonFly BSD when libcups is not installed - @dbwiddis.

Full change log

Release 7.7.0

Choose a tag to compare

@dbwiddis dbwiddis released this 29 Sep 18:31
New Features
  • #3745: The FFM implementation now reads NetBSD natively, through sysctl, getloadavg, _lwp_self and getrlimit, where it previously ran commands and parsed their output - @dbwiddis.
  • #3709, #3757: Display.getCurrentMode() returns the mode a display is driven in: its logical and pixel resolution, refresh rate, rotation, and position on the desktop. Display.isBuiltIn() reports whether it is a built-in panel, and Display.isPrimary() whether it is the primary display. All three are available on Windows, macOS, and on Linux and the other UNIX platforms through X11 - @ayonization, @dbwiddis.
Bug Fixes and Improvements
  • #3723: Windows Sensors now reads CPU temperature, fan speed and voltage from the ROOT\LibreHardwareMonitor WMI namespace when the LibreHardwareMonitor application is running, in addition to the ROOT\OpenHardwareMonitor namespace it already read. Users running the maintained LibreHardwareMonitor previously got its GPU metrics but no CPU sensor data - @dbwiddis.
  • #3727: The oshi.os.windows.ohm.disabled and oshi.os.windows.lhm.disabled configuration properties now skip the Open Hardware Monitor and Libre Hardware Monitor WMI namespaces, which OSHI otherwise queries on each sensor read until one returns data. The latter also covers GPU metrics - @dbwiddis.
  • #3730: Fixed Sensors.getCpuVoltage() on Windows when using the voltage published by Open Hardware Monitor or LibreHardwareMonitor - @dbwiddis.
  • #3742: NetworkParams.getRoutes() on NetBSD now reads the routing table from the kernel where the JNA native library is available - @dbwiddis.
  • #3743: Fixed three HWDiskStore faults on NetBSD: read and write byte totals that could decrease between readings, a doubled getTransferTime(), and a 1-byte disk or 512-byte partition size where the size is unknown, which also affected OpenBSD - @dbwiddis.
  • #3744: Fixed OSProcess naming on NetBSD: getPath() and getName() were truncated to seven characters, and where the kernel withholds a process's arguments, getCommandLine() returned ps's (command) placeholder and getName() kept its parentheses - @dbwiddis.
  • #3754: OperatingSystem.getProcessId() and getThreadId() return 0 when the ID is unknown on every platform. On NetBSD without JNA, getThreadId() returned a Java thread ID, and on failure some implementations returned -1, which led getCurrentProcess() to return an arbitrary process on the BSDs, Solaris and AIX. getProcess() with a negative PID now returns null on Solaris and AIX - @dbwiddis.

Full change log

Release 7.6.1

Choose a tag to compare

@dbwiddis dbwiddis released this 01 Sep 20:58
Bug Fixes and Improvements
  • #3710: Fix the bnd imports for oshi-core and oshi-core-ffm to make the JSpecify annotations optional, so both bundles resolve in an OSGi container without JSpecify - @dbwiddis.

Full change log

Release 7.6.0

Choose a tag to compare

@dbwiddis dbwiddis released this 23 Aug 18:30
Maven Central Publication Change

The oshi-dist zip is no longer published to Maven Central; download it from the GitHub release instead.

New Features
  • #3652: oshi-metrics reports the OpenTelemetry reserved state for system.filesystem.usage and system.filesystem.utilization, alongside the existing used and free. The three states partition the filesystem, so the usage gauges sum to system.filesystem.limit and the utilization gauges sum to 1.0 - @dbwiddis.
  • #3660,
    #3678: Display.getDevicePort() reports the port a display is attached to, and on systems with X RandR, Display.getOutputName() gives the name xrandr --output accepts for it - @ayonization, @dbwiddis.
Behavior Changes
  • #3705: OSDesktopWindow.getLocAndSize() returns a copy of the window's Rectangle and the constructor copies the one it is given, so the class honors the immutability its documentation promises. ApplicationInfo.getAdditionalInfo() returns an unmodifiable map. Code that wrote through either return value silently mutated OSHI's own state; it now has no effect, or throws UnsupportedOperationException for the map - @dbwiddis.
  • #3705: UsbDevice.compareTo() breaks ties on the unique device ID, vendor ID, product ID and serial number after comparing names, and AbstractUsbDevice implements equals() and hashCode() over the same fields. Two distinct devices sharing a name previously compared equal, so a TreeSet or SortedSet of them kept only one. The ordering is now a default method on UsbDevice, so every implementation shares it - @dbwiddis.
Bug Fixes and Improvements
  • #3651: OSFileStore now guarantees 0 <= getUsableSpace() <= getFreeSpace() <= getTotalSpace() on every platform. The three values are read by separate queries, so on a ZFS dataset or a swap-backed tmpfs they could previously contradict each other; they are now clamped downward to restore the ordering - @dbwiddis.
  • #3657: Fix the TcpState for the FFM implementation of InternetProtocolStats.getConnections() on macOS and set the process cap from the kernel - @dbwiddis.
  • #3661: Setting oshi.os.windows.hkeyperfdata to false now also skips the registry when fetching thread counters, matching its documented behavior and the existing handling for processes - @dbwiddis.
  • #3662: Reading the processor description from the registry no longer throws when a value is missing. CentralProcessor.getFeatureFlags() on Windows now reports every processor feature IsProcessorFeaturePresent() accepts, matching the PF_ defines in winnt.h - @dbwiddis.
  • #3665: NetworkParams.getRoutes() reads the routing table from the kernel through a NET_RT_DUMP sysctl on macOS, FreeBSD, DragonFly BSD and OpenBSD, rather than by running netstat twice - @dbwiddis.
  • #3670: NetworkParams.getHostName() on Linux reads the kernel host name from /proc/sys/kernel/hostname in every backend, fixing the native-free implementation, which truncated a fully qualified name at the first dot and reported localhost when the name did not resolve - @dbwiddis.
  • #3671: NetworkParams.getHostName() and getDomainName() report the empty-string sentinel when the local host name does not resolve, rather than the loopback address's localhost. NetBSD is the most affected platform, having no native host name query of its own - @dbwiddis.
  • #3672,
    #3674: CentralProcessor frequencies and PhysicalProcessor.getEfficiency() on Apple Silicon are correct regardless of call order and on the M4 and M5 generations. Frequencies previously fell back to a 2.4 GHz placeholder unless getProcessorIdentifier() happened to be called first, were reported a thousand times too low on the M4 and later, and a chip with more or fewer than two kinds of core was misclassified - @dbwiddis.
  • #3675: CentralProcessor.getCurrentFreq() on Apple Silicon can report the frequency the hardware actually ran at, rather than a nominal maximum that never changes. Set oshi.os.mac.cpu.frequency.ioreport to true; it is opt-in because it holds a subscription to a private framework for the lifetime of the process - @dbwiddis.
  • #3680: oshi-metrics reads a disk or network interface once per memoizer expiration window rather than once per meter, so a scrape makes one query where it previously made five or seven, and the meters of one device report the same reading. A rate computed across two of them, such as errors per packet, is now comparable - @dbwiddis.
  • #3681: GpuStats.getGpuUtilization() on Linux reads NVIDIA GPU utilization from NVML. It previously read only the amdgpu/i915/xe sysfs paths, none of which the NVIDIA driver exposes, so an NVIDIA card always returned the -1 sentinel - @Krillsson.
  • #3686: GpuStats.getGpuUtilization() on Windows reads NVIDIA utilization from NVML and AMD utilization from ADL, matching the source order of every other metric on the class. It previously ran only LibreHardwareMonitor and a PDH engine-tick delta, which needs two samples, so the first call returned the -1 sentinel - @dbwiddis.
  • #3687: GpuStats.getSharedMemoryUsed() on Linux reports the amdgpu GTT memory in use rather than always returning -1, and GraphicsCard.getVRam() on an amdgpu card reports the driver's own figure rather than the memory BAR size parsed from lspci or lshw. Several GpuStats metrics on Linux also now return the -1 sentinel when the sysfs file behind them is absent; they previously reported 0, so a card whose hwmon directory omits power1_average read as drawing 0.0 W - @dbwiddis.
  • #3698: OSProcess.getCurrentWorkingDirectory() on macOS returns the directory rather than an empty string in the FFM implementation, and NetworkParams.getDomainName() on macOS and the BSDs returns the canonical name rather than an empty string in both implementations - @dbwiddis.
  • #3705: An AIX process or thread that exits between enumeration and the /proc read is now reported as invalid rather than as a live process owned by root - @dbwiddis.
  • #3705: A failure of kstat_open() on Solaris throws rather than releasing no lock and passing a null control structure to the kernel. The chain lock is static, so a failed open previously blocked every later kstat query on any thread - @dbwiddis.

Full change log

Release 7.5.0

Choose a tag to compare

@dbwiddis dbwiddis released this 17 Aug 05:59
New Features
  • #3614 - #3636: Adopt JSpecify nullability annotations project-wide and enforce them in continuous integration with NullAway, so every type in a signature is non-null unless it is annotated @Nullable. A method not annotated @Nullable is now a checked guarantee rather than an aspiration, and a null check against one is dead code you can delete. The public API packages and the oshi.util tree carry the marking in their package-info.java, where every consumer sees it, including on a Java 8 or classpath build; the implementation packages are marked on their module descriptors; the native mapping packages under oshi.jna and oshi.ffm.platform opt out, because nullability there is the operating system's to state rather than OSHI's. The org.jspecify:jspecify dependency is optional and compile-time only, so it does not reach your runtime classpath. See the FAQ for what this does and does not promise - @dbwiddis.
  • #3615: Add ParseUtil.getStringValueOrEmpty, which normalizes a nullable string to "", alongside the existing getStringValueOrUnknown - @dbwiddis.
  • #3641: Add HardwareAbstractionLayer.getVirtualization(), which identifies the hypervisor, container runtime or cloud platform hosting the system, promoting the long-standing DetectVM demo into the library. It returns an Optional<String> naming the platform, or an empty Optional when no signature matched - which means undetermined, not confirmed bare metal. Detection reads the processor's CPUID vendor string, the computer system's manufacturer and model, and network interface MAC address OUIs, in that order. The signature tables ship as the oshi.vm.properties and oshi.vmmacaddr.properties resources; placing a file of either name earlier on the classpath replaces that table, so you can teach OSHI about a platform it does not know - @dbwiddis.
  • #3646, #3647: Add NetworkParams.getRoutes(), which returns the operating system's routing table as a list of IPRoute objects covering both address families - @dbwiddis.
Behavior Changes
  • #3646: NetworkParams.getIpv6DefaultGateway() on OpenBSD returns the IPv6 gateway. It previously omitted the -inet6 flag and returned the IPv4 gateway. NetworkParams default gateways on AIX return an empty string when no default route is configured, matching the documented contract. They previously returned Constants.UNKNOWN.
  • #3614 - #3636: Stating each nullability contract explicitly during the JSpecify sweep surfaced implementations that did not honor it. Values that were documented as unreadable but returned null now return the sentinel the rest of the API uses. The following user-facing behavior changed:
    • DisplayInfo's preferred resolution, model and product serial number return an empty string rather than null
      for a synthesized display such as the Apple Silicon built-in panel.
    • SoundCard.getDriverVersion() and getCodec() return Constants.UNKNOWN rather than null when the platform
      reports neither, and Linux reports an unreadable ALSA driver version as Constants.UNKNOWN rather than the
      string not available.
    • UsbDevice.getVendor() and getUniqueDeviceId() return an empty string rather than null on Windows.
    • ComputerSystem, Baseboard and Firmware fields return Constants.UNKNOWN rather than null on AIX,
      Windows and the BSDs.
    • An installed application's name, version and vendor return an empty string rather than null on every
      platform.
    • NetworkParams.getDomainName() returns an empty string rather than null on FreeBSD.
    • A macOS process whose passwd or group entry cannot be read reports its numeric user and group id through the
      FFM implementation, matching JNA.
  • #3616: Report a disk's model or serial number, and a macOS partition's UUID, as Constants.UNKNOWN when it reads as an empty string, matching every other unreadable value. Affects AIX disks whose lscfg serial field is blank, and the Linux device-mapper and macOS equivalents. Partition filesystem UUIDs and labels are unchanged.
  • #3641: NetworkIF.isKnownVmMacAddr() recognizes five more prefixes, so it now returns true for a VMware interface using the 00:1C:14 allocation and for Amazon Web Services and Google Cloud Platform instances. oshi.demo.DetectVM.identifyVM() is deprecated in favor of HardwareAbstractionLayer.getVirtualization(), and now returns curated product names rather than whichever raw signature happened to match.
Bug Fixes and Improvements
  • #3589: Ship oshi-dist as a single .zip, excluding oshi-demo and its jfreechart and jackson dependencies, and attach it to each GitHub release. Test-javadoc jars and oshi-benchmark are no longer published - @dbwiddis.
  • #3611, #3612: Log exceptions with their stack trace and cause chain rather than substituting getMessage() into the log text, and attach the underlying failure as the cause of the InstantiationException from AbstractNetworkIF and the UnsatisfiedLinkError from ForeignFunctions.dlopenWithFlags. Two Windows logs that had been losing their argument now report it - @dbwiddis.
  • #3614 - #3636: Harden reads of incomplete platform output, found while stating the nullability contracts above. An empty line in a /proc statistics file, an AIX logical volume missing its type or partition count, a BSD ps line missing its process state, and a Solaris system with no SMBIOS section of a given type no longer throw. Windows CPU ticks are no longer reported as all zero when an optional processor utility counter is unavailable - @dbwiddis.
  • #3639: Fix a race in the Windows GPU utilization calculation, which tested its cached previous tick sample for null and then dereferenced it in a second read, so a concurrent poll could throw a NullPointerException. That sample and the cached ADL adapter index are now volatile, as a @ThreadSafe class requires - @dbwiddis.
  • #3643: Harden getSessions() against a corrupt utmpx entry on Linux, macOS, FreeBSD and Solaris. A single unreadable record now skips that one session instead of abandoning the native read and re-querying everything through the who command. The utmpx table is not reentrant, so a session ending while OSHI iterates it can legitimately yield a partially written entry; the who fallback now applies only when the native read returns nothing at all - @dbwiddis.

Full change log

Release 7.4.4

Choose a tag to compare

@dbwiddis dbwiddis released this 06 Aug 22:41
Bug Fixes and Improvements
  • #3561: Fix AIX reporting the current instant as its boot time, and an uptime of zero, when the uptime command transiently failed; parse the year-less who -b format AIX 7.3 emits, and add ParseUtil.parseYearlessDateToEpoch - @dbwiddis.
  • #3562: Make Linux getMaxFreq() reproducible by resolving it from the cpufreq policy, lshw, and the vendor frequency rather than folding in a live frequency reading, returning -1 when none of those reports a maximum - @dbwiddis.
  • #3564: Fix Linux getSoftOpenFileLimit() returning -1 for a process whose hard open-file limit is unlimited, discarding a valid soft limit - @dbwiddis.
  • #3566: Read the OpenBSD host name from gethostname rather than resolving it, so getHostName() no longer reports localhost on a host whose name is not resolvable - @dbwiddis.
  • #3568: Fix the Windows FFM getProcess(pid) and getProcesses(pids) returning a process that getProcesses() does not list, reporting a recently exited process as running with no path, no threads, and no CPU time - @dbwiddis.
  • #3569: Fix three JNA/FFM divergences on the file-system and network paths: the macOS FFM file store never bailed when the DiskArbitration session failed to open (the guard tested a foreign pointer for Java null, which it can never be); Windows volumes whose mount-point list exceeds the buffer were dropped rather than re-read on ERROR_MORE_DATA (missing entirely on JNA, keyed on the wrong error code on FFM); and the Windows FFM TCP/UDP connection queries could transiently return no connections under connection churn, where JNA retries on ERROR_INSUFFICIENT_BUFFER - @dbwiddis.
  • #3573: Report Linux VRAM from NVML rather than summing the prefetchable PCI BARs, which measures the card's address aperture (capped at 256 MiB without Resizable BAR) instead of its memory size - @Krillsson.
  • #3574: Never report a decrease in a BSD process's or thread's kernel or user time across updateAttributes(). DragonFly's ps TIME column sums only the currently live LWPs, so an exiting thread takes its accumulated CPU time out of the process total - @dbwiddis.
  • #3577: Fix macOS OSProcess#getArguments() and getEnvironmentVariables() corrupting every entry after one containing a non-ASCII character. The KERN_PROCARGS2 parser advanced its offset by each entry's length in characters rather than bytes, landing mid-character and returning garbage in place of the remaining arguments - @dbwiddis.
  • #3578: Fix the Windows JNA AMD GPU path reporting a power draw of -1 on Overdrive 6-era Radeon cards. Power draw is read through the Overdrive 6 API but was gated on Overdrive N support, rejecting the cards that implement the call; the Overdrive capability check also ignored the library's supported flag - @dbwiddis.
  • #3579: Align the macOS FFM firmware, baseboard, computer system, and CPU manufacturer strings with the JNA backend when decoding IORegistry byte properties, which are NUL-terminated within a fixed-width buffer. The FFM path stripped every NUL and trimmed, so a property holding several NUL-separated strings would be returned concatenated and significant leading or trailing spaces discarded, where the JNA twin stopped at the first NUL. Add ParseUtil.decodeNulTerminated and decode through it on both backends - @dbwiddis.
  • #3581: Fix ParseUtil.parseHertz throwing NumberFormatException instead of returning the documented -1 when the decimals are introduced by something other than a decimal point, such as the comma separator a localized frequency string can carry - @dbwiddis.
  • #3582: Fix AIX dropping the highest-pid processes from getProcesses(), and getProcess() returning null for them, when enough processes spawn between the two perfstat_process calls to overrun the padded buffer. Because perfstat sorts by pid, the entry most often lost is the calling JVM's own - @dbwiddis.
  • #3583: Guarantee OperatingSystem#getCurrentProcess() never returns null. It delegated to getProcess(int), which is documented to return null, so a failed read of the calling process left every non-Linux getCurrentThread() throwing a NullPointerException - @dbwiddis.

Full change log

Release 7.4.3

Choose a tag to compare

@dbwiddis dbwiddis released this 31 Jul 13:23
Bug Fixes and Improvements
  • #3526: Fix a potential NullPointerException in the macOS FFM process backend when an IOPlatformDevice entry has no readable name, and guard the native passwd/group struct dereferences against a null return - @dbwiddis.
  • #3527: Consolidate the SLF4J log level dispatch duplicated in ExceptionUtil and PerfDataUtil into a new oshi.util.LogUtil, whose isEnabled method offers the slf4j 1.x-compatible equivalent of Logger#isEnabledForLevel - @dbwiddis.
  • #3531: Stop reporting an implausible CPU or GPU temperature on Apple Silicon. An idle core cluster is power-gated and its die sensors then report a fixed parked value below room ambient, which was previously returned as a reading; Sensors#getCpuTemperature now reports 0 (unavailable) instead - @dbwiddis.
  • #3535: Fix Sensors#getCpuTemperature returning 0 on Apple Silicon chips whose per-core SMC keys differ from the hardcoded set (e.g. the M3 Pro, where all five are absent). Prefer the chip-independent, firmware-computed CPU-die aggregate keys TCMb (die average) and TCMz (die max) before the per-core keys, reporting the die average - @dbwiddis.
  • #3536: Discover Apple Silicon GPU temperature SMC keys at runtime instead of reading a fixed list of four chip-specific keys, and report the hottest GPU cluster rather than the first one found. Adds oshi.os.mac.sensors.gputemperature.keys to override the discovered keys - @dbwiddis.
  • #3541: Identify Apple Silicon chips at runtime rather than from hardcoded tables that stopped at the M4. PhysicalProcessor#getEfficiency now classifies performance and efficiency cores from the IORegistry cluster-type property, fixing an all-zero classification (and the degraded per-core frequencies that followed from it) on newer chips, and ProcessorIdentifier#getMicroarchitecture falls back to a description derived from the core codenames instead of reporting unknown. An entry in oshi.architecture.properties still takes precedence where one exists - @dbwiddis.
  • #3555: Fix Linux graphics cards all reporting the same VRAM, DRM device and GPU metrics: request the stable lspci -vnnmm machine-readable format so the Slot: field exists, stop discarding the PCI slot when entering a card record, and identify display controllers by PCI class 0x03 rather than a VGA substring match (expands to include XGA and others) - @Krillsson.

Full change log

Release 7.4.2

Choose a tag to compare

@dbwiddis dbwiddis released this 24 Jul 12:00
Bug Fixes and Improvements
  • #3493: Document the CPU/memory trade-off of reusing versus recreating SystemInfo when polling, with supporting benchmarks - @dbwiddis.
  • #3499: Fix FreeBSD, NetBSD, and OpenBSD df -i inode parsing to include ZFS, tmpfs, devfs, and mfs filesystems that do not start with / - @dbwiddis.
  • #3504: Fix AIX processor cache detection, which read the POWER generation from the hostname (uname -n) instead of prtconf's Processor Version field, causing getProcessorCaches() to return an empty list - @dbwiddis.
  • #3505: Fix the AIX FFM backend reading perfstat_partition_config_t.processorMHz at the wrong struct offset (344 instead of 340), which reported the processor's vendor frequency as unknown - @dbwiddis.
  • #3507: Extend the native-free provider (oshi-common alone, no JNA or FFM) to NetBSD, so NetBSD users without the JNA native library can depend on oshi-common without --enable-native-access, as Linux already can - @dbwiddis.
  • #3518: Consolidate the duplicated sysctl utility code into shared command-line (BsdSysctlUtil), JNA (SysctlUtilJNA), and FFM (SysctlFFM) helpers, and fix a latent bug where reading an int-width sysctl (e.g. FreeBSD hw.clockrate) through the long API returned uninitialized bytes, intermittently reporting an absurd CPU vendor frequency such as 6.2 EHz - @dbwiddis.
  • #3519: Fix the Solaris JNA Kstat2 processor identifier reporting the CPU vendor frequency in MHz instead of Hz (missing the clock_MHz to Hz conversion applied on the other code paths) - @dbwiddis.
  • #3525: Carry the exception log level with a new oshi.util.LogLevel enum instead of org.slf4j.event.Level, so OSHI no longer class-loads a type added in slf4j-api 1.7.15 on non-exceptional code paths and works again against host-provided slf4j-api older than 1.7.15 (e.g. the 1.7.5 bundled by Apache Maven 3.3.x) - @wolfs.

Full change log