Welcome to Linux Knowledge Base and Tutorial
"The place where you learn linux"
Linux Magazine: The source for advanced Linux know-how

 Create an AccountHome | Submit News | Your Account  

Tutorial Menu
Linux Tutorial Home
Table of Contents

· Introduction to Operating Systems
· Linux Basics
· Working with the System
· Shells and Utilities
· Editing Files
· Basic Administration
· The Operating System
· The X Windowing System
· The Computer Itself
· Networking
· System Monitoring
· Solving Problems
· Security
· Installing and Upgrading
· Linux and Windows

Glossary
MoreInfo
Man Pages
Linux Topics
Test Your Knowledge

Site Menu
Site Map
FAQ
Copyright Info
Terms of Use
Privacy Info
Disclaimer
WorkBoard
Thanks
Donations
Advertising
Masthead / Impressum
Your Account

Communication
Feedback
Forums
Private Messages
Surveys

Features
HOWTOs
News Archive
Submit News
Topics
User Articles
Web Links

Google
Google


The Web
linux-tutorial.info

Who's Online
There are currently, 66 guest(s) and 0 member(s) that are online.

You are an Anonymous user. You can register for free by clicking here

  

sensord



SYNOPSIS

       sensord [ options ] [ chips ]


DESCRIPTION

       Sensord  is  a daemon that can be used to periodically log
       sensor readings from hardware health-monitoring  chips  to
       syslog(3)  or  a  round-robin  database (RRD) and to alert
       when a sensor alarm is signalled; for example,  if  a  fan
       fails, a temperature limit is exceeded, etc.

       Sensord knows about certain chips, and outputs nicely for­
       matted readings for them; but  it  can  also  display  the
       information  of  unknown  chips,  as long as libsensors(3)
       knows about them.


OPTIONS

       -i, --interval time
              Specify the interval between  scanning  for  sensor
              alarms; the default is to scan every minute.

              The time should be specified as a raw integer (sec­
              onds) or with a suffix `s'  for  seconds,  `m'  for
              minutes  or `h' for hours; for example, the default
              interval is `60' or `1m'.

              Specify an interval of zero  to  suppress  scanning
              explicitly for alarms.

       -l, --log-interval time
              Specify  the  interval  between  logging all sensor
              readings; the default is to log all readings  every
              half hour.

              The time is specified as before; e.g., `30m'.

              Specify  an interval of zero to suppress logging of
              regular sensor readings.

       -t, --rrd-interval time
              Specify the interval  between  logging  all  sensor
              readings  to a round-robin database; the default is
              to log all readings every five minutes if a  round-
              robin database is configured.

              The time is specified as before; e.g., `5m'.

       -r, --rrd-file file
              Specify  a  round-robin  database into which to log
              all sensor readings; e.g.,  `/var/log/sensord.rrd'.
              This database will be created if it does not exist.
              By default, no round-robin database is used.

       -p, --pid-file file
              Specify  what  PID file to write; the default is to
              write the file `/var/run/sensord.pid'.  You  should
              always  specify  an absolute path here. The file is
              removed when the daemon exits.

       -f, --syslog-facility facility
              Specify the syslog(3) facility to use when  logging
              sensor  readings  and alarms; the default is to use
              local4.

              Other possibile facilities include  local0  through
              local7, daemon or user.

       -g, --rrd-cgi directory
              Prints  out  a sample rrdcgi(1) CGI script that can
              be used to display graphs of recent sensor informa­
              tion in a Web page, and exits. You must specify the
              world-writable, Web-accessible directory where  the
              graphs  should  be  stored;  the CGI script assumes
              that this will be accessed  under  the  `/sensord/'
              directory  on  the Webserver. See the section ROUND
              ROBIN DATABASES below for more details.

       -a, --load-average
              Include the load average (multiplied by 10) in  the
              RRD  database.  You  should  also specify this flag
              when you create the CGI script.

       -d, --debug
              Prints  a  small  amount  of  additional  debugging
              information.

       -h, --help
              Prints a help message and exits.

       -v, --version
              Displays the program version and exits.


CHIPS

       To  restrict  the devices that are scanned by this daemon,
       you may optionally  specify  a  list  of  chip  names.  By
       default, all available chips are scanned.

       A  typical chip name would be `w83782d-*' (you may want to
       escape the `*'  for  your  shell)  which  would  scan  any
       W83782D  chips  on  any  bus. See sensors.conf(5) for more
       details. Another option is to simply not load  the  sensor
       modules for chips in which you have no interest.


SIGNALS

       Upon receipt of a SIGTERM (see signal(7) for details) this
       log.conf(5)  for  full details, however the following is a
       sample configuration:

              # Sample syslog.conf entries
              *.info;...;local4.none;local4.warn  /var/log/messages
              local4.info                        -/var/log/sensors
              local4.alert                        /dev/console
              local4.alert                        *

       The first line ensures that regular sensor readings do not
       clutter `/var/log/messages'; we first say `local4.none' to
       eliminate informational messages;  then  `local4.warn'  to
       enable warnings and above. The second line says to log all
       regular sensor readings to `/var/log/sensors'; the leading
       hyphen `-' means that this file is not flushed after every
       message. The  final  two  lines  ensure  that  alarms  are
       printed  to the system console as well as to all connected
       users   (in   addition    to    `/var/log/messages'    and
       `/var/log/sensors').


LOG ROTATION

       On  a typical system with a good sensor chip, expect about
       2KB per sensor reading in the log file. This works out  at
       about  3MB  per  month. You should be rotating your syslog
       files anyway, but just to be sure you'll want to use some­
       thing  like  logrotate(8)  or  equivalent.  You might, for
       example, want an entry in  `/etc/logrotate.d/syslog'  con­
       taining:

              # Sample logrotate.d entry
              /var/log/sensors {
                  postrotate
                      /usr/sbin/killall -HUP syslogd
                  endscript
              }

       Note,  of  course, that you want to restart syslogd(8) and
       not sensord(8)


ALARMS

       Alarms generally indicate a critical condition; for  exam­
       ple, a fan failure or an unacceptable temperature or volt­
       age. However, some sensor chips  do  not  support  alarms,
       while  others  are  incorrectly  configured and may signal
       alarms incorrectly.

       Typically, an alarm will only be signaled  once,  even  if
       the  critical  condition  persists.  This means that it is
       very easy to miss an alarm!

       In other cases, however, uninteresting alarms (e.g., chas­
       sis  intrusion  detection)  will be repeated continuously.
       Alternatively, you may be able to  reset  the  alarm  with
       your BIOS.


BEEPS

       If  you  see `(beep)' beside any sensor reading, that just
       means that your system is configured  to  issue  an  audio
       warning  from  the motherboard if an alarm is signalled on
       that sensor.


ROUND ROBIN DATABASES

       Sensord(8) provides support for storing sensor readings in
       a  round-robin  database. This may be a useful alternative
       to the use of syslog(3).

       Round-robin databases are constant-size databases that can
       be  used  to  store, for example, a week's worth of sensor
       readings. Subsequent readings stored in the database  will
       overwrite readings that are over a week old. This capabil­
       ity is extremely useful because it allows useful  informa­
       tion  to  be  stored  in an easily-accessible manner for a
       useful length of time, without the burden of  ever-growing
       log files.

       The  rrdtool(1) utility and its associated library provide
       the basic framework for the round-robin  database  beneath
       sensord(8).   In  addition,  the rrdcgi(1) and rrdgraph(1)
       utilities provide support for generating graphs  of  these
       data for display in a Web page.

       If  you  wish  to  use the default configuration of round-
       robin database, which holds one week of sensor readings at
       five-minute  intervals,  then  simply start sensord(8) and
       specify where you want the database stored. It will  auto­
       matically  be  created  and configured using these default
       parameters.

       If you wish readings to be stored for a longer period,  or
       want  multiple  readings to be averaged into each database
       entry, then you must manually  create  and  configure  the
       database  before starting sensord(8).  Consult the rrdcre­
       ate(1) manual for details. Note  that  the  database  must
       match  exactly the names and order of sensors read by sen­
       sord(8).  It is recommended that you  create  the  default
       database  and  then use rrdinfo(1) to obtain this informa­
       tion, and/or rrdtune(1) to change it.

       After creating the round-robin  database,  you  must  then
       configure  your  Web server to display the sensor informa­
       tion. This assumes that you have a Web  server  preconfig­
       ured and functioning on your machine.  Sensord(8) provides
       a command-line option --rrd-cgi to generate  a  basic  CGI
       script  to  display  these  graphs; you can then customize
       ging of sensor readings to syslog(3), and  enable  logging
       of the load average.

              mkdir /var/www/sensord
              chown www-data:staff /var/www/sensord
              chmod a=rwxs /var/www/sensord

       Here, we create a world-writable, Web-accessible directory
       in which graphs will be stored; we set the  ownership  and
       permissions on this directory appropriately. You will have
       to determine the location and ownership that is  appropri­
       ate for your machine.

              sensord --load-average \
                --rrd-file /var/log/sensord.rrd \
                --rrd-cgi /var/www/sensord \
                > /usr/lib/cgi-bin/sensord.cgi
              chmod a+rx /usr/lib/cgi-bin/sensord.cgi

       Here,  we  create  a  CGI  script that will display sensor
       readings from the database.  You must specify the location
       of the round-robin database, the location of the directory
       where the images should be stored, and  whether  you  want
       the  load  average  displayed.  The --rrd-cgi command-line
       parameter causes sensord(8)  to  display  a  suitable  CGI
       script  on stdout and then to exit. You will need to write
       this script to the CGI bin directory of your  Web  server,
       and  edit  the  script if the image directory you chose is
       not the `/sensord/' directory of your Web server.

       Finally, you should be able to view your  sensor  readings
       from the URL `http://localhost/cgi-bin/sensord.cgi'.


MODULES

       It is expected that all required sensor modules are loaded
       prior to this daemon being started.  This  can  either  be
       achieved  with  a  system  specific  module loading scheme
       (e.g., listing the required modules in the file `/etc/mod­
       ules'  under Debian) or with explicit modprobe(1) commands
       in an init script before loading the daemon.

       For example, a `sensord' initialization script might  con­
       tain (among others) the following commands:

              # Sample init.d scriptlet
              echo -n "Loading AMD756 module: "
              modprobe i2c-amd756 || { echo Fail. ; exit 1 ; }
              echo OK.
              echo -n "Loading W83781D module: "
              modprobe w83781d || { echo Fail. ; exit 1 ; }
              echo OK.
              echo -n "Starting sensord: "


FILES

       /etc/sensors.conf
              The system-wide libsensors(3)  configuration  file.
              See sensors.conf(5) for further details.
       /etc/syslog.conf
              The  system-wide  syslog(3) / syslogd(8) configura­
              tion file. See syslog.conf(5) for further  details.


CONFORMING TO

       lm_sensors-2.x


SEE ALSO

       sensors.conf(5)


AUTHORS

       Sensord  was written by Merlin Hughes <merlin@merlin.org>.
       Chip-specific formatting  code  was  ripped  from  sensors
       which  was  written  by  Frodo  Looijaard <frodol@dds.nl>.
       Basics of round-robin databases were misappropriated  from
       Mark D. Studebaker <mdsxyz123@yahoo.com>.

Version 0.6.3            October 23, 2002              sensord(8)
  
Show your Support for the Linux Tutorial

Purchase one of the products from our new online shop. For each product you purchase, the Linux Tutorial gets a portion of the proceeds to help keep us going.


Login
Nickname

Password

Security Code
Security Code
Type Security Code


Don't have an account yet? You can create one. As a registered user you have some advantages like theme manager, comments configuration and post comments with your name.

Help if you can!


Amazon Wish List

Did You Know?
The Linux Tutorial welcomes your suggestions and ideas.


Friends



Tell a Friend About Us

Bookmark and Share



Web site powered by PHP-Nuke

Is this information useful? At the very least you can help by spreading the word to your favorite newsgroups, mailing lists and forums.
All logos and trademarks in this site are property of their respective owner. The comments are property of their posters. Articles are the property of their respective owners. Unless otherwise stated in the body of the article, article content (C) 1994-2013 by James Mohr. All rights reserved. The stylized page/paper, as well as the terms "The Linux Tutorial", "The Linux Server Tutorial", "The Linux Knowledge Base and Tutorial" and "The place where you learn Linux" are service marks of James Mohr. All rights reserved.
The Linux Knowledge Base and Tutorial may contain links to sites on the Internet, which are owned and operated by third parties. The Linux Tutorial is not responsible for the content of any such third-party site. By viewing/utilizing this web site, you have agreed to our disclaimer, terms of use and privacy policy. Use of automated download software ("harvesters") such as wget, httrack, etc. causes the site to quickly exceed its bandwidth limitation and are therefore expressly prohibited. For more details on this, take a look here

PHP-Nuke Copyright © 2004 by Francisco Burzi. This is free software, and you may redistribute it under the GPL. PHP-Nuke comes with absolutely no warranty, for details, see the license.
Page Generation: 0.04 Seconds