Opened 9 years ago

Closed 6 years ago

#520 closed enhancement (wontfix)

smartd should provide socket interface

Reported by: ballock Owned by:
Priority: minor Milestone:
Component: all Version: 6.3
Keywords: Cc:

Description

smartd has knowledge of the state of all the hard drives in the system, and as such it is a perfect abstraction layer between the hardware and services or software that would make use of such information.

Unfortunately, although it is a daemon, it currently behaves in a cron-like fashion, by querying the HDD at specified intervals and optionally sending emails when a fault is detected.

My proposal is to add a Unix socket interface to smartd so that the last-checked HDD state and drive inventory can be queried from external software. I am proposing a simple query interface: 1-line command, 1-line response.

What smartd should provide on the socket:

  • a hello, I am running message; smartd version string included
  • a command to shut down
  • a command to reload the configs
  • a command to provide internal daemon statistics, like daemon runtime, etc

For the drive data that should also be:

  • a command to enumerate the drives monitored by smartd
  • a command to provide SMART variables for the specified drive (including SCSI/ATA specifics)

Optionally, these might make sense too:

  • a command to get/change device settings (-g -s in smartctl)
  • a command to deal with self-tests, SMART-GPT logs

Change History (3)

comment:1 by ballock, 9 years ago

We would also use a simple socket client to print out the daemon state and data.

comment:2 by Christian Franke, 9 years ago

Milestone: undecided

comment:3 by Christian Franke, 6 years ago

Milestone: undecided
Resolution: wontfix
Status: newclosed

No feedback from reporter or contributor.

Note: See TracTickets for help on using tickets.