Class OpenBsdComputerSystem
- All Implemented Interfaces:
ComputerSystem
@Immutable public class OpenBsdComputerSystem extends AbstractComputerSystem
-
Constructor Summary
Constructors Constructor Description OpenBsdComputerSystem()
-
Method Summary
Modifier and Type Method Description protected Baseboard
createBaseboard()
Instantiates the platform-specificBaseboard
objectprotected Firmware
createFirmware()
Instantiates the platform-specificFirmware
objectjava.lang.String
getHardwareUUID()
Get the computer system hardware UUID, if available.java.lang.String
getManufacturer()
Get the computer system manufacturer.java.lang.String
getModel()
Get the computer system model.java.lang.String
getSerialNumber()
Get the computer system serial number, if available.Methods inherited from class oshi.hardware.common.AbstractComputerSystem
getBaseboard, getFirmware, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Constructor Details
-
OpenBsdComputerSystem
public OpenBsdComputerSystem()
-
-
Method Details
-
getManufacturer
public java.lang.String getManufacturer()Description copied from interface:ComputerSystem
Get the computer system manufacturer.- Returns:
- The manufacturer.
-
getModel
public java.lang.String getModel()Description copied from interface:ComputerSystem
Get the computer system model.- Returns:
- The model.
-
getSerialNumber
public java.lang.String getSerialNumber()Description copied from interface:ComputerSystem
Get the computer system serial number, if available.Performs a best-effort attempt to retrieve a unique serial number from the computer system. This may originate from the baseboard, BIOS, processor, etc.
This value is provided for information only. Caution should be exercised if using this result to "fingerprint" a system for licensing or other purposes, as the result may change based on program permissions or installation of software packages. Specifically, on Linux and FreeBSD, this requires either root permissions, or installation of the (deprecated) HAL library (lshal command). Linux also attempts to read the dmi/id serial number files in sysfs, which are read-only root by default but may have permissions altered by the user.
- Returns:
- the System Serial Number, if available, otherwise returns "unknown"
-
getHardwareUUID
public java.lang.String getHardwareUUID()Description copied from interface:ComputerSystem
Get the computer system hardware UUID, if available.Performs a best-effort attempt to retrieve the hardware UUID.
- Returns:
- the Hardware UUID, if available, otherwise returns "unknown"
-
createFirmware
Description copied from class:AbstractComputerSystem
Instantiates the platform-specificFirmware
object- Specified by:
createFirmware
in classAbstractComputerSystem
- Returns:
- platform-specific
Firmware
object
-
createBaseboard
Description copied from class:AbstractComputerSystem
Instantiates the platform-specificBaseboard
object- Specified by:
createBaseboard
in classAbstractComputerSystem
- Returns:
- platform-specific
Baseboard
object
-