Skip to content
Snippets Groups Projects
Commit f14e61da authored by (no author)'s avatar (no author)
Browse files

This commit was manufactured by cvs2svn to create branch

'unlabeled-1.100.2'.

git-svn-id: https://smartmontools.svn.sourceforge.net/svnroot/smartmontools/branches/unlabeled-1.100.2@770 4ea69e1a-61f1-4043-bf83-b5c94c648137
parent 0c18d233
No related branches found
No related tags found
No related merge requests found
Showing with 0 additions and 10227 deletions
This diff is collapsed.
This diff is collapsed.
/*
* smartctl.h
*
* Home page of code is: http://smartmontools.sourceforge.net
*
* Copyright (C) 2002-3 Bruce Allen <smartmontools-support@lists.sourceforge.net>
* Copyright (C) 2000 Michael Cornwell <cornwell@acm.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2, or (at your option)
* any later version.
*
* You should have received a copy of the GNU General Public License
* (for example COPYING); if not, write to the Free
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
* This code was originally developed as a Senior Thesis by Michael Cornwell
* at the Concurrent Systems Laboratory (now part of the Storage Systems
* Research Center), Jack Baskin School of Engineering, University of
* California, Santa Cruz. http://ssrc.soe.ucsc.edu/
*
*/
#ifndef __SMARTCTL_H_
#define __SMARTCTL_H_
#ifndef SMARTCTL_H_CVSID
#define SMARTCTL_H_CVSID "$Id: smartctl.h,v 1.17 2003/03/06 07:27:17 ballen4705 Exp $\n"
#endif
/* Boolean Values */
#define TRUE 0x01
#define FALSE 0x00
// Return codes (bitmask)
// command line did not parse
#define FAILCMD (0x01<<0)
// device open failed or could not get identity info
#define FAILDEV (0x01<<1)
#define FAILID (0x01<<1)
// smart command failed
#define FAILSMART (0x01<<2)
// SMART STATUS returned FAILURE
#define FAILSTATUS (0x01<<3)
// Attributes found <= threshold with prefail=1
#define FAILATTR (0x01<<4)
// SMART STATUS returned GOOD but age attributes failed or prefail
// attributes have failed in the past
#define FAILAGE (0x01<<5)
// Device had Errors in the error log
#define FAILERR (0x01<<6)
// Device had Errors in the self-test log
#define FAILLOG (0x01<<7)
// Classes of SMART commands. Here 'mandatory' means "Required by the
// ATA/ATAPI-5 Specification if the device implements the S.M.A.R.T.
// command set." The 'mandatory' S.M.A.R.T. commands are: (1)
// Enable/Disable Attribute Autosave, (2) Enable/Disable S.M.A.R.T.,
// and (3) S.M.A.R.T. Return Status. All others are optional.
#define OPTIONAL_CMD 1
#define MANDATORY_CMD 2
#endif
This diff is collapsed.
This diff is collapsed.
# /etc/smartd.conf
# Sample configuration file for smartd. See man 5 smartd.conf.
# Home page is: http://smartmontools.sourceforge.net
# The file gives a list of devices to monitor using smartd, with one
# device per line. Text after a hash (#) is ignored, and you may use
# spaces and tabs for white space. You may use '\' to continue lines.
# You can usually identify which hard disks are on your system by
# looking in /proc/ide and in /proc/scsi.
# The word DEVICESCAN will cause any remaining lines in this
# configuration file to be ignored: it tells smartd to scan for all
# ATA and SCSI devices. DEVICESCAN may be followed by any of the
# Directives listed below, which will be applied to all devices that
# are found. Most users should comment out DEVICESCAN and explicitly
# list the devices that they wish to monitor.
DEVICESCAN
# First (primary) ATA/IDE hard disk. Monitor all attributes
/dev/hda -a
# Monitor SMART status, ATA Error Log, Self-test log, and track
# changes in all attributes except for attribute 194
/dev/hdb -H -l error -l selftest -t -I 194
# A very silent check. Only report SMART health status if it fails
# But send an email in this case
/dev/hdc -H -m admin@yoyodyne.com
# First two SCSI disks. This will monitor everything that smartd can
# monitor.
/dev/sda -d scsi
/dev/sdb -d scsi
# HERE IS A LIST OF DIRECTIVES FOR THIS CONFIGURATION FILE
# -d TYPE Set the device type: ata, scsi, removable
# -T TYPE set the tolerance to one of: normal, permissive
# -o VAL Enable/disable automatic offline tests (on/off)
# -S VAL Enable/disable attribute autosave (on/off)
# -H Monitor SMART Health Status, report if failed
# -l TYPE Monitor SMART log. Type is one of: error, selftest
# -f Monitor for failure of any 'Usage' Attributes
# -m ADD Send warning email to ADD for -H, -l error, -l selftest, and -f
# -M TYPE Modify email warning behavior (see man page)
# -p Report changes in 'Prefailure' Normalized Attributes
# -u Report changes in 'Usage' Normalized Attributes
# -t Equivalent to -p and -u Directives
# -r ID Also report Raw values of Attribute ID with -p, -u or -t
# -R ID Track changes in Attribute ID Raw value with -p, -u or -t
# -i ID Ignore Attribute ID for -f Directive
# -I ID Ignore Attribute ID for -p, -u or -t Directive
# -v N,ST Modifies labeling of Attribute N (see man page)
# -a Default: equivalent to -H -f -t -l error -l selftest
# -F TYPE Use firmware bug workaround. Type is one of: none, samsung
# -P TYPE Drive-specific presets: use, ignore, show, showall
# # Comment: text after a hash sign is ignored
# \ Line continuation character
# Attribute ID is a decimal integer 1 <= ID <= 255
# All but -d, -m and -M Directives are only implemented for ATA devices
#
# If the test string DEVICESCAN is the first uncommented text
# then smartd will scan for devices /dev/hd[a-l] and /dev/sd[a-z]
# DEVICESCAN may be followed by any desired Directives.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
#!/bin/bash
# chkconfig: 35 40 40
# smartmontools init file for smartd
#
# description: Self Monitoring and Reporting Technology (SMART) Daemon
#
# processname: smartd
#
# $Id: smartd.initd,v 1.6 2003/05/09 19:20:23 ballen4705 Exp $
#
# Copyright (C) 2002-3 Bruce Allen <smartmontools-support@lists.sourceforge.net>
#
# This program is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the Free
# Software Foundation; either version 2, or (at your option) any later
# version.
#
# You should have received a copy of the GNU General Public License (for
# example COPYING); if not, write to the Free Software Foundation, Inc., 675
# Mass Ave, Cambridge, MA 02139, USA.
#
# This code was originally developed as a Senior Thesis by Michael Cornwell
# at the Concurrent Systems Laboratory (now part of the Storage Systems
# Research Center), Jack Baskin School of Engineering, University of
# California, Santa Cruz. http://ssrc.soe.ucsc.edu/.
#
# source function library
. /etc/rc.d/init.d/functions
case "$1" in
start)
echo -n "Starting smartd: "
daemon /usr/sbin/smartd
touch /var/lock/subsys/smartd
echo
;;
stop)
echo -n "Shutting down smartd: "
killproc smartd
rm -f /var/lock/subsys/smartd
echo
;;
restart)
$0 stop
$0 start
;;
status)
status smartd
;;
*)
echo "Usage: smartd {start|stop|restart|status}"
exit 1
esac
exit 0
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
# Manufactures HTML file from XML file. Note: do NOT edit the HTML
# file, only the XML file.
all: smartmontools_scsi.html
smartmontools_scsi.html: smartmontools_scsi.xml
xmlto html-nochunks smartmontools_scsi.xml
upload: smartmontools_scsi.html index.html
scp smartmontools_scsi.html ballen4705@smartmontools.sourceforge.net:/home/groups/s/sm/smartmontools/htdocs
scp index.html ballen4705@smartmontools.sourceforge.net:/home/groups/s/sm/smartmontools/htdocs
scp examples/*.html ballen4705@smartmontools.sourceforge.net:/home/groups/s/sm/smartmontools/htdocs/examples
#!/bin/bash
# execute this script in the current shell, using for example
# . cvs_script
unset CVS_SERVER
export CVS_RSH=ssh
export CVSROOT=:ext:ballen4705@cvs.smartmontools.sourceforge.net:/cvsroot/smartmontools
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment