This project is a personal experiment to embed System Information (Hardware / Software) capabilities in a database that can easily be queried, as well as embedded into any embedded platfrom. As an experiment, it is still a work in progress, but it is also a proof of concept.
H2 is a lightweight Java Database that has sophisticated features, and is easily 2 MB in footprint. Making it easy to embed in any Embedded System.
- We took the H2 Database
- We took Oshi
- We married the capabilities of the 2
We integrated the following tables as part of INFORMATION_SCHEMA
:
SYSTEM_PROCESSES
(List of System Processes)FILE_SYSTEM_FILES
(File Systems)DISK_STORES
(Disk Stores / Disks)NETWORK_INTERFACES
(The Active Network Interfaces)SYSTEM_MEMORY
(RAM / Swap Metrics)SYSTEM_SENSORS
(Data from CPU - Temperature / Voltage)USB_DEVICES
(Connected USB devices)
SYSTEM_PROCESSES
:SELECT * FROM INFORMATION_SCHEMA.SYSTEM_PROCESSES
SYSTEM_PROCSSES
with aWHERE
clause:SELECT * FROM INFORMATION_SCHEMA.SYSTEM_PROCESSES where USER='ahmed'
- Very fast, open source, JDBC API
- Embedded and server modes; in-memory databases
- Browser based Console application
- Small footprint: around 2 MB jar file size
More information: https://h2database.com
H2 | Derby | HSQLDB | MySQL | PostgreSQL | |
---|---|---|---|---|---|
Pure Java | Yes | Yes | Yes | No | No |
Memory Mode | Yes | Yes | Yes | No | No |
Encrypted Database | Yes | Yes | Yes | No | No |
ODBC Driver | Yes | No | No | Yes | Yes |
Fulltext Search | Yes | No | No | Yes | Yes |
Multi Version Concurrency | Yes | No | Yes | Yes | Yes |
Footprint (embedded database) | ~2 MB | ~3 MB | ~1.5 MB | — | — |
Footprint (JDBC client driver) | ~500 KB | ~600 KB | ~1.5 MB | ~1 MB | ~700 KB |