github.com/e154/smart-home@v0.17.2-0.20240311175135-e530a6e5cd45/doc/content/en/docs/plugins/hdd.md (about)

     1  
     2  ---
     3  title: "HDD"
     4  linkTitle: "hdd"
     5  date: 2021-10-20
     6  description: >
     7    
     8  ---
     9  
    10  {{< figure src="/smart-home/hdd1.png" width="300" >}}
    11  
    12  &nbsp;
    13  
    14  &nbsp;
    15  
    16  In the **Smart Home** system, there is a "hdd" plugin that provides the display of hard disk parameters. This plugin allows you to obtain information about various characteristics of the hard disk. Here are some of these parameters:
    17  
    18  1. `path`: The `path` parameter contains the path to the mount point of the hard disk.
    19  
    20  2. `fstype`: The `fstype` parameter indicates the file system type used on the hard disk.
    21  
    22  3. `total`: The `total` parameter displays the total size of the hard disk in bytes.
    23  
    24  4. `free`: The `free` parameter shows the amount of free space on the hard disk in bytes.
    25  
    26  5. `used`: The `used` parameter indicates the used space on the hard disk in bytes.
    27  
    28  6. `used_percent`: The `used_percent` parameter shows the percentage of space used on the hard disk.
    29  
    30  7. `inodes_total`: The `inodes_total` parameter displays the total number of inodes on the hard disk.
    31  
    32  8. `inodes_used`: The `inodes_used` parameter indicates the number of used inodes on the hard disk.
    33  
    34  9. `inodes_free`: The `inodes_free` parameter shows the number of free inodes on the hard disk.
    35  
    36  10. `inodes_used_percent`: The `inodes_used_percent` parameter indicates the percentage of inodes used on the hard disk.
    37  
    38  Additionally, the "hdd" plugin has a `mount_point` settings option that allows you to specify the mount point to display parameters for a specific hard disk.
    39  
    40  Here's an example of using the "hdd" plugin to retrieve hard disk parameters:
    41  
    42  ```javascript
    43  const hddParams = EntityGetAttributes('hdd.hdd1')
    44  const hddSettings = EntityGetSettings('hdd.hdd1')
    45  console.log(hddSettings.mount_point);
    46  console.log(hddParams.path);
    47  console.log(hddParams.fstype);
    48  console.log(hddParams.total);
    49  console.log(hddParams.free);
    50  console.log(hddParams.used);
    51  console.log(hddParams.used_percent);
    52  console.log(hddParams.inodes_total);
    53  console.log(hddParams.inodes_used);
    54  console.log(hddParams.inodes_free);
    55  console.log(hddParams.inodes_used_percent);
    56  ```
    57  
    58  You can use these parameters to display information about the hard disk in your **Smart Home** project.