Java API

JAVA 21 / 17 PUBLIC TYPES

HostLens API 1.0.1

HostLens is a Java library for reading hardware and host information such as CPU, memory, and operating system details.

Source archive
HostLens-1.0.1-sources.jar
Packages
2
Source
Repository ↗

me.tamkungz.hostlens16

record CpuInfopublic record CpuInfo( String name, String vendor, String architecture, int physicalCores, int logicalCores, int availableProcessors, int packageCount, double maxFrequencyMhz, double systemLoadAverage, double systemCpuLoad, double processCpuLoad, String processorId ) record DiskInfopublic record DiskInfo( String name, String mount, String fileSystem, String type, long totalBytes, long usableBytes, long unallocatedBytes, boolean readOnly, long usedBytes, double usedPercent, String device, String volumeName, String driveType, String mediaType, boolean rootMount, boolean systemMount, boolean removable, boolean network, boolean virtual, boolean ssd, String source ) record GpuInfopublic record GpuInfo( String name, String vendor, String driverVersion, String deviceId, String type ) record HostCaptureContextpublic record HostCaptureContext( boolean includeCpu, boolean includeMemory, boolean includeGpu, boolean includeDisk, boolean includeNetwork ) interface HostInspectorpublic interface HostInspector class HostLenspublic final class HostLens class Builderpublic static final class Builder record HostLensErrorpublic record HostLensError( String source, String type, String message ) class HostLensExceptionpublic final class HostLensException extends RuntimeException class HostLensFormatterpublic final class HostLensFormatter record HostSnapshotpublic record HostSnapshot( Instant capturedAt, RuntimeInfo runtime, OperatingSystemInfo operatingSystem, CpuInfo cpu, MemoryInfo memory, List<GpuInfo> gpus, List<DiskInfo> disks, List<NetworkInterfaceInfo> networks, Map<String, String> properties, List<HostLensError> errors ) class Builderpublic static final class Builder record MemoryInfopublic record MemoryInfo( long heapUsedBytes, long heapCommittedBytes, long heapMaxBytes, long nonHeapUsedBytes, long nonHeapCommittedBytes, long nonHeapMaxBytes, long physicalTotalBytes, long physicalFreeBytes, long physicalAvailableBytes, long physicalUsedBytes, long swapTotalBytes, long swapFreeBytes, long swapUsedBytes, long cgroupMemoryLimitBytes, long cgroupMemoryUsageBytes, long cgroupSwapLimitBytes, long cgroupSwapUsageBytes, String source ) record NetworkInterfaceInfopublic record NetworkInterfaceInfo( String name, String displayName, String macAddress, boolean up, boolean loopback, boolean virtual, int mtu, List<String> addresses, int index, String type, boolean pointToPoint, boolean multicast, boolean primary, String status, long speedMbps, List<String> ipv4Addresses, List<String> ipv6Addresses, List<String> gateways, List<String> dnsServers, String dhcp ) record OperatingSystemInfopublic record OperatingSystemInfo( String name, String version, String architecture, String family, boolean windows, boolean linux, boolean mac, String hostName, String userName, String displayName, String distribution, String distributionVersion, String kernelVersion, String buildNumber, String kernelArchitecture, boolean wsl, boolean container ) record RuntimeInfopublic record RuntimeInfo( String javaVersion, int javaMajorVersion, String javaVendor, String javaVendorVersion, String javaVmName, String javaVmVendor, String javaVmVersion, String javaVmInfo, String javaRuntimeName, String javaRuntimeVersion, String javaSpecificationName, String javaSpecificationVersion, String javaHome, String userName, String userHome, String userDir, String fileEncoding, String nativeEncoding, String defaultLocale, String defaultCharset, String timeZone, long uptimeMillis, long startTimeMillis, long processId, int availableProcessors, long heapUsedBytes, long heapCommittedBytes, long heapMaxBytes, long nonHeapUsedBytes, long nonHeapCommittedBytes, List<String> inputArguments )

me.tamkungz.hostlens.demo1