This repository produces prebuilt static libraries (libsmartmon.a) from
smartmontools/smartmontools
for multiple platforms and architectures.
The upstream smartmontools source is included as a git submodule — not
forked. An SDK overlay (include/, lib/) wraps the library build targets
used by consumers such as
smartmontools-go.
| OS | Architecture |
|---|---|
| Linux | amd64, aarch64 |
| macOS (Darwin) | amd64, aarch64 |
| Windows | amd64 |
- Submodule —
smartmontools/points to a specific upstream release tag. - Build workflow — triggered on PR merge or manual dispatch, compiles
libsmartmon.afor all 5 platform/arch targets. - Release — artifacts are published as GitHub releases tagged with the
upstream version (e.g.
v8.0). Each release contains one.tar.gzper target withlib/libsmartmon.aandinclude/smartmon/*.h. - Automated updates — a daily workflow checks for new upstream release tags and opens a PR to update the submodule.
Download the appropriate archive from the releases page, then add the library and headers to your build:
tar -xzf libsmartmon-<version>-<target>.tar.gz -C /usr/local
# lib/libsmartmon.a → /usr/local/lib/libsmartmon.a
# include/smartmon/ → /usr/local/include/smartmon/Link against it with -lsmartmon (and -lstdc++ for C++ symbol resolution).
Requires: autoconf, automake, libtool, a C++11 compiler.
git clone --recurse-submodules https://github.com/dianlight/smartmontools-sdk.git
cd smartmontools-sdk
./autogen.sh
mkdir build && cd build
../configure --with-devel=yes
make -C include
make -j$(nproc) -C lib libsmartmon.laThe static library will be at build/lib/.libs/libsmartmon.a and the public
headers under include/smartmon/.
All public headers are installed under include/smartmon/:
| Header | Description |
|---|---|
dev_interface.h |
Core device abstraction (open, identify, passthrough) |
atacmds.h |
ATA/SATA command set |
nvmecmds.h |
NVMe command set |
scsicmds.h (via lib) |
SCSI/SAS command set |
json.h |
JSON output builder |
utility.h |
Logging, string helpers |
smartmon_defs.h |
Common macros and type definitions |
The smartmontools package implements the Self-Monitoring, Analysis and
Reporting Technology (SMART) protocol for ATA/SATA, SCSI/SAS and NVMe
storage devices. This SDK exposes the core library (libsmartmon) so that
other programs can query device health without spawning a subprocess.
Smartmontools uses GNU GPL Version 2 license.