public abstract class AbstractComputerSystem extends Object implements ComputerSystem
| Modifier and Type | Field and Description |
|---|---|
protected Baseboard |
baseboard |
protected Firmware |
firmware |
protected String |
manufacturer |
protected String |
model |
protected String |
serialNumber |
| Constructor and Description |
|---|
AbstractComputerSystem() |
| Modifier and Type | Method and Description |
|---|---|
String |
getManufacturer()
Get the computer system manufacturer.
|
String |
getModel()
Get the computer system model.
|
String |
getSerialNumber()
Get the computer system serial number, if available.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetBaseboard, getFirmwareprotected String manufacturer
protected String model
protected String serialNumber
protected Firmware firmware
protected Baseboard baseboard
public String getManufacturer()
getManufacturer in interface ComputerSystempublic String getModel()
getModel in interface ComputerSystempublic String getSerialNumber()
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.
getSerialNumber in interface ComputerSystemCopyright © 2010–2019 oshi. All rights reserved.