Package oshi.hardware
Interface ComputerSystem
- All Known Implementing Classes:
AbstractComputerSystem
@Immutable public interface ComputerSystem
The ComputerSystem represents the physical hardware, of a computer
system/product and includes BIOS/firmware and a motherboard, logic board,
etc.
-
Method Summary
Modifier and Type Method Description Baseboard
getBaseboard()
Get the computer system baseboard/motherboard.Firmware
getFirmware()
Get the computer system firmware/BIOS.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.
-
Method Details
-
getManufacturer
java.lang.String getManufacturer()Get the computer system manufacturer.- Returns:
- The manufacturer.
-
getModel
java.lang.String getModel()Get the computer system model.- Returns:
- The model.
-
getSerialNumber
java.lang.String getSerialNumber()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, hardware UUID, 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"
-
getFirmware
Firmware getFirmware()Get the computer system firmware/BIOS.- Returns:
- A
Firmware
object for this system
-
getBaseboard
Baseboard getBaseboard()Get the computer system baseboard/motherboard.- Returns:
- A
Baseboard
object for this system
-