279 lines
7.3 KiB
HTML
279 lines
7.3 KiB
HTML
|
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
|
<HTML><HEAD><TITLE>Man page of HDDTEMP</TITLE>
|
|
</HEAD><BODY>
|
|
<H1>HDDTEMP</H1>
|
|
Section: Maintenance Commands (8)<BR>Updated: July 21, 2003<BR><A HREF="#index">Index</A>
|
|
<A HREF="/cgi-bin/man/man2html">Return to Main Contents</A><HR>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<A NAME="lbAB"> </A>
|
|
<H2>NAME</H2>
|
|
|
|
hddtemp - Utility to monitor hard drive temperature
|
|
<A NAME="lbAC"> </A>
|
|
<H2>SYNOPSIS</H2>
|
|
|
|
<B>hddtemp</B>
|
|
|
|
[<I>options</I>]<I> [type:]disk</I>...
|
|
|
|
<A NAME="lbAD"> </A>
|
|
<H2>DESCRIPTION</H2>
|
|
|
|
<P>
|
|
|
|
<B>hddtemp </B>
|
|
|
|
will give you the temperature of your hard drive by reading
|
|
Self-Monitoring Analysis and Reporting Technology (S.M.A.R.T.)
|
|
information on drives that support this feature. Only modern hard
|
|
drives have a temperature sensor. hddtemp supports reading S.M.A.R.T.
|
|
information from SCSI drives too.
|
|
<B>hddtemp</B>
|
|
|
|
can work as simple command line tool or as a daemon.
|
|
<P>
|
|
You can specify one or more device drive path, where each path can be prefixed
|
|
with a
|
|
<B>type</B>
|
|
|
|
like PATA, SATA or SCSI to force hddtemp too use one of these type
|
|
(because detection can fail).
|
|
<P>
|
|
<P>
|
|
<A NAME="lbAE"> </A>
|
|
<H2>OPTIONS</H2>
|
|
|
|
The program follows the usual GNU command line syntax, with long
|
|
options starting with two dashes (`-'). A summary of options is
|
|
included below.
|
|
<DL COMPACT>
|
|
<DT id="1"><B>-b, --drivebase</B>
|
|
|
|
<DD>
|
|
Display the database file that allows hddtemp to recognize a supported
|
|
drive.
|
|
<DT id="2"><B>-D, --debug</B>
|
|
|
|
<DD>
|
|
Display various S.M.A.R.T. fields and their values. Useful for
|
|
finding a value that seems to match the temperature and/or to send a
|
|
report. (done for every drive supplied)
|
|
<DT id="3"><B>-d, --daemon</B>
|
|
|
|
<DD>
|
|
Execute hddtemp in TCP/IP daemon mode (port 7634 by default).
|
|
<DT id="4"><B>-f, --file=</B><I>file</I>
|
|
|
|
<DD>
|
|
Specify the database file to use.
|
|
<DT id="5"><B>-F, --foreground</B>
|
|
|
|
<DD>
|
|
Don't fork into the background even in daemon mode. This is useful
|
|
when running under a process supervisor.
|
|
<DT id="6"><B>-l, --listen=</B><I>addr</I>
|
|
|
|
<DD>
|
|
Listen on a specific address. <I>addr</I> is a string containing a
|
|
host name or a numeric host address string. The numeric host address
|
|
string is a dotted-decimal IPv4 address or an IPv6 hex address.
|
|
<DT id="7"><B>-n, --numeric</B>
|
|
|
|
<DD>
|
|
Print only the temperature (without the unit).
|
|
<DT id="8"><B>-p, --port=</B><I>#</I>
|
|
|
|
<DD>
|
|
Port number to listen to (in TCP/IP daemon mode).
|
|
<DT id="9"><B>-s, --separator=</B><I>char</I>
|
|
|
|
<DD>
|
|
Separator to use between fields (in TCP/IP daemon mode). The default
|
|
separator is `|'.
|
|
<DT id="10"><B>-S, --syslog=</B><I>s</I>
|
|
|
|
<DD>
|
|
Switch to daemon mode and log temperatures to syslog every <I>s</I>
|
|
seconds.
|
|
<DT id="11"><B>-q, --quiet</B>
|
|
|
|
<DD>
|
|
Don't check if the drive is supported.
|
|
<DT id="12"><B>-u, --unit=</B><I>C|F</I>
|
|
|
|
<DD>
|
|
Force output temperature either in Celsius or Fahrenheit.
|
|
<DT id="13"><B>-v, --version</B>
|
|
|
|
<DD>
|
|
Display hddtemp version number.
|
|
<DT id="14"><B>-w, --wake-up</B>
|
|
|
|
<DD>
|
|
Wake-up the drive if needed (ATA drives only).
|
|
<DT id="15"><B>-4</B>
|
|
|
|
<DD>
|
|
Listen on IPv4 sockets only.
|
|
<DT id="16"><B>-6</B>
|
|
|
|
<DD>
|
|
Listen on IPv6 sockets only.
|
|
<P>
|
|
<P>
|
|
</DL>
|
|
<A NAME="lbAF"> </A>
|
|
<H2>DRIVE DATABASE</H2>
|
|
|
|
If you know your drive has a temperature sensor but it is being
|
|
reported unsupported, tell me which model and which manufacturer it
|
|
is, and/or just add a new entry in /etc/hddtemp.db. Each
|
|
line of hddtemp.db is either a comment, a blank line or a line
|
|
containing:
|
|
<DL COMPACT>
|
|
<DT id="17">- a regular expression that allow hddtemp to recognize a drive or a<DD>
|
|
set of drives from its model name or from a generic model name,
|
|
<DT id="18">- a value (ATTRIBUTE_ID from S.M.A.R.T.),<DD>
|
|
<DT id="19">- a C or an F to set the unit to Celsius or Fahrenheit,<DD>
|
|
<DT id="20">- a description.<DD>
|
|
</DL>
|
|
<P>
|
|
|
|
Feedback is welcome (see the REPORT section below).
|
|
<P>
|
|
<A NAME="lbAG"> </A>
|
|
<H2>TCP/IP DAEMON MODE</H2>
|
|
|
|
Example of type forcing:
|
|
<P>
|
|
|
|
# hddtemp SATA:/dev/sda PATA:/dev/hda
|
|
<P>
|
|
|
|
To test
|
|
<B>hddtemp</B>
|
|
|
|
in daemon mode, start it like this:
|
|
<P>
|
|
|
|
# hddtemp -d /dev/hd[abcd]
|
|
<P>
|
|
|
|
<P>
|
|
|
|
and use
|
|
<B>telnet</B>
|
|
|
|
or
|
|
<B>netcat</B>
|
|
|
|
(which is known as
|
|
<B>nc</B>
|
|
|
|
on some systems) to get a reply:
|
|
<P>
|
|
|
|
# netcat localhost 7634
|
|
<P>
|
|
|
|
The drive database is read only once at startup, so
|
|
<B>hddtemp</B>
|
|
|
|
must be restarted if the database is updated for the changes to take
|
|
effect.
|
|
<P>
|
|
<A NAME="lbAH"> </A>
|
|
<H2>REPORT</H2>
|
|
|
|
As I receive a lot of reports, things must be clarified. When
|
|
running hddtemp with debug options, hddtemp will show sort of a dump
|
|
of S.M.A.R.T. data. Each field corresponds to an information field.
|
|
The standard field for drive temperature is 194. But this is not
|
|
always the case (mostly for older drives). Even if your drive has
|
|
S.M.A.R.T. capabilities, it doesn't necessarily mean that it can
|
|
report its temperature. So, things must be determined through
|
|
experimentation.
|
|
<P>
|
|
|
|
So, you can try to guess which field by is the good one by running
|
|
hddtemp at regular intervals:
|
|
<DL COMPACT>
|
|
<DT id="21"><BR> - just after starting up your PC/server/station,<DD>
|
|
<DT id="22"><BR> - after opening a window (a physical window :),<DD>
|
|
<DT id="23"><BR> - after opening the case,<DD>
|
|
<DT id="24"><BR> - whatever you can think of...<DD>
|
|
</DL>
|
|
<P>
|
|
|
|
and looking for a field's value that would increase or decrease
|
|
depending on what effect you want to induce. Be careful, fields 4, 9,
|
|
and 12 are often reported to match a temperature field but after some
|
|
investigation they do not. But fields 194 (which is the standard
|
|
field for temperature) and 231 are good candidates.
|
|
<P>
|
|
|
|
Then, you can send me a report with outputs from `hddtemp --debug ...',
|
|
`smartctl' or `hdparm -i ...', and/or add an entry in hddtemp.db
|
|
yourself.
|
|
<P>
|
|
<A NAME="lbAI"> </A>
|
|
<H2>BUGS</H2>
|
|
|
|
If hddtemp crashes (yes, it might) for some unknown reasons, look for
|
|
a file named hddtemp.backtrace.<PID>.XXXXXX (where XXXXXX is a random
|
|
number generated at runtime) in /tmp. Then, you can then send me this
|
|
file and the hddtemp binary. The backtrace functionality is currently
|
|
supported on i386 architectures only.
|
|
<P>
|
|
<A NAME="lbAJ"> </A>
|
|
<H2>SEE ALSO</H2>
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?8+smartctl">smartctl</A></B>(8), <B><A HREF="/cgi-bin/man/man2html?3+syslog">syslog</A></B>(3), <B><A HREF="/cgi-bin/man/man2html?8+syslogd">syslogd</A></B>(8).
|
|
<P>
|
|
<A NAME="lbAK"> </A>
|
|
<H2>AUTHOR</H2>
|
|
|
|
<P>
|
|
|
|
Emmanuel Varagnat (<A HREF="mailto:hddtemp@guzu.net">hddtemp@guzu.net</A>).
|
|
<P>
|
|
|
|
This manual page was originally written by Aurelien Jarno <<A HREF="mailto:aurel32@debian.org">aurel32@debian.org</A>>,
|
|
for the Debian GNU/Linux system (but may be used by others).
|
|
<P>
|
|
|
|
<HR>
|
|
<A NAME="index"> </A><H2>Index</H2>
|
|
<DL>
|
|
<DT id="25"><A HREF="#lbAB">NAME</A><DD>
|
|
<DT id="26"><A HREF="#lbAC">SYNOPSIS</A><DD>
|
|
<DT id="27"><A HREF="#lbAD">DESCRIPTION</A><DD>
|
|
<DT id="28"><A HREF="#lbAE">OPTIONS</A><DD>
|
|
<DT id="29"><A HREF="#lbAF">DRIVE DATABASE</A><DD>
|
|
<DT id="30"><A HREF="#lbAG">TCP/IP DAEMON MODE</A><DD>
|
|
<DT id="31"><A HREF="#lbAH">REPORT</A><DD>
|
|
<DT id="32"><A HREF="#lbAI">BUGS</A><DD>
|
|
<DT id="33"><A HREF="#lbAJ">SEE ALSO</A><DD>
|
|
<DT id="34"><A HREF="#lbAK">AUTHOR</A><DD>
|
|
</DL>
|
|
<HR>
|
|
This document was created by
|
|
<A HREF="/cgi-bin/man/man2html">man2html</A>,
|
|
using the manual pages.<BR>
|
|
Time: 00:06:12 GMT, March 31, 2021
|
|
</BODY>
|
|
</HTML>
|