Difference between revisions of "Hddtemp"

From ArchWiki
Jump to: navigation, search
(Usage: Changed language)
(Daemon: Remove rc.d info. Not supported by Arch anymore.)
(23 intermediate revisions by 12 users not shown)
Line 1: Line 1:
[[Category:Mainboards and BIOS (English)]]
+
[[Category:Status monitoring and notification]]
[[Category:HDD (English)]]
+
[https://savannah.nongnu.org/projects/hddtemp/ hddtemp] is a small utility (daemonizable) that gives you the temperature of your hard drive by reading S.M.A.R.T. information (for drives that support this feature).
[[Category:Daemons and system services (English)]]
+
[[Category:HOWTOs (English)]]
+
=Description=
+
  
'''Hddtemp''' is a daemon that monitors and reports hard disk temperature. It is a lightweight daemon and is useful for retrieving temperature readings for hard disks that have temperature sensors built into them.
+
==Installation==
 
+
=Installation=
+
  
 
Sync and install with pacman:
 
Sync and install with pacman:
 
  # pacman -S hddtemp
 
  # pacman -S hddtemp
  
Start the daemon:
+
==Usage==
# /etc/rc.d/hddtemp start
+
 
+
Add the daemon to the DAEMONS array in /etc/rc.conf to facilitate auto-start on boot:
+
# DAEMONS=(coretemp it87 ... hddtemp ...)
+
 
+
=Usage=
+
  
 
Hddtemp can be invoked with the drive as the argument:
 
Hddtemp can be invoked with the drive as the argument:
 
  # hddtemp /dev/sd[x]
 
  # hddtemp /dev/sd[x]
 
Where '''x''' is the drive.
 
Where '''x''' is the drive.
 +
 +
==Daemon==
 +
Running the daemon gives you the possibility to access the temperature via an TCP/IP request, so you could use this in order to check the temperature from outside, or within some scripts.
 +
 +
Once hddtemp has been installed, standard systemctl procedures work to start the daemon:
 +
# systemctl start hddtemp
 +
 +
To start it on boot, enable it:
 +
# systemctl enable hddtemp
 +
 +
{{Note|1=Arguments to {{ic|hddtemp}} are directly given in {{ic|/usr/lib/systemd/system/hddtemp.service}}. This is especially important if you have multiple disks, because in the default configuration only {{ic|/dev/sda}} is monitored. Here is how to add other drives:
 +
* Change the {{ic|ExecStart}} line in {{ic|/usr/lib/systemd/system/hddtemp.service}} adding the drives you want to monitor, e.g.:
 +
ExecStart=/usr/bin/hddtemp -dF /dev/sda /dev/sdb
 +
* Reload systemd's unit files:
 +
# systemctl --system daemon-reload
 +
* Restart hddtemp service:
 +
{{bc|# systemctl restart hddtemp}}
 +
}}
 +
 +
===Usage===
  
 
Another way to get the temperature is by connecting to the daemon which is listening on port 7634.
 
Another way to get the temperature is by connecting to the daemon which is listening on port 7634.
  
  # telnet localhost 7634
+
  $ telnet localhost 7634
Or with [[netcat]]:
+
Or with netcat:
  # netcat localhost 7634
+
  $ nc localhost 7634
 +
 
 +
Refer to the manpage for information like supported drives, logging, etc.
 +
$ man hddtemp
  
For other information like hard drives supported, logging e.t.c. refer to the manpage:
+
==Monitors==
# man hddtemp
+
  
=Monitors=
+
Hddtemp can be easily integrated with system monitors like [[Conky]], the {{pkg|sensors-applet}} for GNOME Panel or the {{pkg|xfce4-sensors-plugin}} for Xfce Panel.
  
Hddtemp can be easily integrated with system monitors like [[Conky]] or the GNOME sensors applet.
+
== See also ==
 +
[[lm sensors]]

Revision as of 13:35, 31 August 2013

hddtemp is a small utility (daemonizable) that gives you the temperature of your hard drive by reading S.M.A.R.T. information (for drives that support this feature).

Installation

Sync and install with pacman:

# pacman -S hddtemp

Usage

Hddtemp can be invoked with the drive as the argument:

# hddtemp /dev/sd[x]

Where x is the drive.

Daemon

Running the daemon gives you the possibility to access the temperature via an TCP/IP request, so you could use this in order to check the temperature from outside, or within some scripts.

Once hddtemp has been installed, standard systemctl procedures work to start the daemon:

# systemctl start hddtemp

To start it on boot, enable it:

# systemctl enable hddtemp
Note: Arguments to hddtemp are directly given in /usr/lib/systemd/system/hddtemp.service. This is especially important if you have multiple disks, because in the default configuration only /dev/sda is monitored. Here is how to add other drives:
  • Change the ExecStart line in /usr/lib/systemd/system/hddtemp.service adding the drives you want to monitor, e.g.:
ExecStart=/usr/bin/hddtemp -dF /dev/sda /dev/sdb
  • Reload systemd's unit files:
# systemctl --system daemon-reload
  • Restart hddtemp service:
# systemctl restart hddtemp

Usage

Another way to get the temperature is by connecting to the daemon which is listening on port 7634.

$ telnet localhost 7634

Or with netcat:

$ nc localhost 7634

Refer to the manpage for information like supported drives, logging, etc.

$ man hddtemp

Monitors

Hddtemp can be easily integrated with system monitors like Conky, the sensors-applet for GNOME Panel or the xfce4-sensors-plugin for Xfce Panel.

See also

lm sensors