harddisk monitoring with s.m.a.r.t

Post support questions that directly relate to Linux/Unix operating systems.

Moderators: Developers, Moderators

Post Reply
User avatar
sumsum
Cacti User
Posts: 68
Joined: Mon Apr 26, 2004 7:18 am
Location: Switzerland
Contact:

harddisk monitoring with s.m.a.r.t

Post by sumsum »

Hello around the globe

is someone of you allready monitoring (in details) harddisks based on the S.M.A.R.T. (Self Monitoring, Analysis and Reporting Technology) Specification ?

any scripts available or in development ?
thanx for your help
cheers
tom
Last edited by sumsum on Tue Sep 21, 2004 1:17 am, edited 1 time in total.
JoeNetwork
Posts: 38
Joined: Mon Feb 16, 2004 2:01 pm
Location: Westland, MI

Post by JoeNetwork »

Eh? Is S.M.A.R.T. even accessible outside of BIOS/low-level disk reads?
User avatar
sumsum
Cacti User
Posts: 68
Joined: Mon Apr 26, 2004 7:18 am
Location: Switzerland
Contact:

Post by sumsum »

JoeNetwork wrote:Eh? Is S.M.A.R.T. even accessible outside of BIOS/low-level disk reads?
I'm allready montoring the disc temp. from harddiscs with s.m.a.r.t under linux accessible with smartmontools. with a little shell script you can grab your data , using the smartctl command. but this is a little bit boring.
dont know how to get that from a windows server, but under a linux server its possible.

i'm asking me if someone allready is grabing data with MIB's and snmp instead of shellscripting (etracting , greping values ...)

cheers
-t
http://www.lounge-radio.com/
tulmad
Posts: 7
Joined: Thu Sep 23, 2004 3:55 pm

Post by tulmad »

Fantastic, I was hoping there'd be a recent thread about this.

I have SMART monitoring working with a very simple perl script that outputs just the temperature in Farenheit. I've created the graph for it, and it's getting data and making the graph correctly. My problem is that it's putting the wrong value into the graph. For example, right now if I run my script it prints out 86. On the graph, it says the value is 32.

Where did I go wrong? I followed the step-by-step instructions, and just changed them where I needed for my stuff instead of using random numbers.
User avatar
sumsum
Cacti User
Posts: 68
Joined: Mon Apr 26, 2004 7:18 am
Location: Switzerland
Contact:

Post by sumsum »

hi

i found the following shellscript somewhere in this forum. it should be easy to adopt this to perl, since you can execute a simple shell comand within perl.

important, that you install the smartmontools (http://smartmontools.sourceforge.net) which will help you gathering SMART Data from your harddisk

maybe the failure is somewhere in your script, which converting Celsius in Farenheit. just post your script here, for debuging purpose. shure, someone can help you out in that.

cheers
-t

Code: Select all

#!/bin/sh
#
# this script returns the HD temperate of the selected disk - given with $1
#
if [ $# -ne 1 ]
then
	echo "usage: $0 device"
	echo "       device example: /dev/hda"
	exit 1
fi

sudo /usr/sbin/smartctl -a -d ata $1 | egrep -i "Celsius|RAW_VALUE | grep Temp" | cut -c 88-89
http://www.lounge-radio.com/
tulmad
Posts: 7
Joined: Thu Sep 23, 2004 3:55 pm

Post by tulmad »

As I was typing out a long winded response as to what I was seeing, I think I figured out what was wrong. I had setup sudo to let my cacti user run smartctl, but never bothered to add sudo to my perl script.

My bad.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest