Smartmontools: Difference between revisions

From NixOS Wiki
m →‎Example: fix syntax error
Unabomberlive (talk | contribs)
mNo edit summary
Line 1: Line 1:
{{DISPLAYTITLE:smartmontools}}
{{DISPLAYTITLE:smartmontools}}
 
<translate>
'''smartmontools''' is a package which provides tools for monitoring drives which support the [[wikipedia:Self-Monitoring, Analysis and Reporting Technology|S.M.A.R.T.]] system for monitoring hard drive health.
'''smartmontools''' is a package which provides tools for monitoring drives which support the [[wikipedia:Self-Monitoring, Analysis and Reporting Technology|S.M.A.R.T.]] system for monitoring hard drive health.
 
</translate>
<translate>
It includes the '''smartd''' and '''smartctl''' programs. smartd can be enabled on NixOS systems with the {{Nixos:option|services.smartd}} module.
It includes the '''smartd''' and '''smartctl''' programs. smartd can be enabled on NixOS systems with the {{Nixos:option|services.smartd}} module.
 
</translate>
<translate>
== Example ==
== Example ==
</translate>
{{Template:file:nixos|<nowiki>{
{{Template:file:nixos|<nowiki>{
   services.smartd = {
   services.smartd = {
Line 11: Line 14:
     devices = [
     devices = [
       {
       {
        <translate>
         device = "/dev/sda"; # FIXME: Change this to your actual disk; use lsblk to find the appropriate value
         device = "/dev/sda"; # FIXME: Change this to your actual disk; use lsblk to find the appropriate value
</translate>
       }
       }
     ];
     ];

Revision as of 04:07, 1 August 2024

smartmontools is a package which provides tools for monitoring drives which support the S.M.A.R.T. system for monitoring hard drive health. It includes the smartd and smartctl programs. smartd can be enabled on NixOS systems with the services.smartd module.

Example

/etc/nixos/configuration.nix
{
  services.smartd = {
    enable = true;
    devices = [
      {
        &lt;translate&gt;
        device = "/dev/sda"; # FIXME: Change this to your actual disk; use lsblk to find the appropriate value
&lt;/translate&gt;
      }
    ];
  };
}