get permanent root on the motorola cliq

Get Permanent root on an android motorola cliq

See what is mounted.
$ adb shell
$ mount
rootfs / rootfs ro 0 0
tmpfs /dev tmpfs rw,mode=755 0 0
devpts /dev/pts devpts rw,mode=600 0 0
proc /proc proc rw 0 0
sysfs /sys sysfs rw 0 0
tmpfs /sqlite_stmt_journals tmpfs rw,size=4096k 0 0
/dev/block/mtdblock1 /system yaffs2 ro 0 0
/dev/block/mtdblock2 /data yaffs2 rw,nosuid,nodev 0 0
/dev/block/mtdblock5 /cache yaffs2 rw,nosuid,nodev 0 0
/dev/block//vold/179:1 /sdcard vfat rw,dirsync,nosuid,nodev,noexec,uid=1000,gid=1000,fmask=0711,dmask=0700,allow_utime=0022,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8 0 0
$


Make sure that your /dev/block/mtdblock1 partition is mounted on /system
/dev/block/mtdblock1 /system yaffs2 ro 0 0
If yes create the following script on your PC otherwise adjust it appropriately.
$ cat install-root.sh 
mount -o rw,remount /dev/block/mtdblock1 /system
cat /sdcard/su > /system/bin/su
chown root.root /system/bin/su
chmod 755 /system/bin/su
mount -o ro,remount /dev/block/mtdblock1 /system


Copy the needed files to your device.
$ adb push su /sdcard/su
$ adb push install-root.sh /data/local/tmp/install-root.sh
$ adb shell "chmod 755 /data/local/tmp/install-root.sh"


Fire up a Terminal Emulator on your cliq and execute the install-root script
#/data/local/tmp/install-root.sh


Try to su root from an adb shell
$ adb shell
$ ls /root
opendir failed, Permission denied
$ cd /root
cd: can't cd to /root
$ su
# cd /root
# pwd
/root
# exit
$ exit


Cool, from now on you have root at will.



Get Permanent Root on Motorola Cliq

get root on your motorola cliq

How to get root on your Motorola cliq.



$ adb install Term.apk
$ adb push rageagainstthecage-arm5.bin /data/local/tmp/rageagainstthecage-arm5.bin


$ adb shell
$ chmod 755 /data/local/tmp/rageagainstthecage-arm5.bin 
$ exit


Fire up the Term Application on your cliq and type
$ cd /data/local/tmp
$ ./rageagainstthecage-arm5.bin


Wait for
[+] Forked ..
#


Any time you open the Terminal Emulator untill you Power off your android device you shoud be root and your prompt a # instead of a $.
# id
uid=0(root) gid=10049(app_49) groups=...





Get Permanent Root on Motorola Cliq



Get Root on your Motorola Cliq

a 10.0.0.0/8 exception

This is an `easy` way to add all routes except 10.0.0.0/8

#!/bin/bash
#g0 2013 , http://alog.ipduh.com/2013/03/a-100008-exception.html
#silly 10/8 exception
#
#https://ipduh.com/ip/list/?list=%0A0.0.0.0/5%20--%20%0A8.0.0.0/7%20--%20%0A11.0.0.0/8%20--%0A12.0.0.0/6%20--%0A16.0.0.0/4%20--%0A32.0.0.0/3%20--%0A64.0.0.0/3%20--%0A96.0.0.0/3%20--%0A128.0.0.0/1%20--%20_%20--%0A&title=10/8%20exception

DEFAULT_GATEWAY="203.0.113.1"
ROUTE="/sbin/route"

${ROUTE} add -net 0.0.0.0 netmask 248.0.0.0 gw ${DEFAULT_GATEWAY}
${ROUTE} add -net 8.0.0.0 netmask 254.0.0.0 gw ${DEFAULT_GATEWAY}
${ROUTE} add -net 11.0.0.0 netmask 255.0.0.0 gw ${DEFAULT_GATEWAY}
${ROUTE} add -net 12.0.0.0 netmask 252.0.0.0 gw ${DEFAULT_GATEWAY}
${ROUTE} add -net 16.0.0.0 netmask 240.0.0.0 gw ${DEFAULT_GATEWAY}
${ROUTE} add -net 32.0.0.0 netmask 224.0.0.0 gw ${DEFAULT_GATEWAY}
${ROUTE} add -net 64.0.0.0 netmask 224.0.0.0 gw ${DEFAULT_GATEWAY}
${ROUTE} add -net 96.0.0.0 netmask 224.0.0.0 gw ${DEFAULT_GATEWAY}
${ROUTE} add -net 128.0.0.0 netmask 128.0.0.0 gw ${DEFAULT_GATEWAY}


     


$ wget kod.ipduh.com/lib/all-routes-except-10A.sh


all-routes-except-10A.sh





Add all except 10.0.0.0/8 routes

adb setup linux debian based

Get the Android SDK Tools from http://developer.android.com/sdk/index.html

$ mkdir ~/android
$ cd ~/android/
$ wget  http://dl.google.com/android/android-sdk_r21.1-linux.tgz
$ tar xvzf android-sdk_r21.1-linux.tgz


Install the JDK.
$ sudo apt-get install openjdk-6-jdk 


Install the Android SDK Tools and Android SDK platform tools using the android SDK manager
$ ~/android/android-sdk-linux/tools/android
Check Android SDK Tools & Android SDK Platform-tools
Hit the Install ... Button ...

Optionally add the SDK tools and platform-tools directories to your path. ( I assume that you are using bash )
$ cd ~/android/android-sdk-linux/
$ echo "export PATH=${PATH}:$(pwd)/tools:$(pwd)/platform-tools" >> ~/.bashrc
$ source ~/.bashrc


Attach the Android operated device to the USB port and Set udev rules.
$ lsusb
Bus 001 Device 002: ID F000:DAFF Android Device
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
On the example above the Android Device is accessible by the kernel at
/dev/bus/usb/001/002.

Hence, we can see more stuff about it with udevadm using the following command.
 $ udevadm info -a path -n /dev/bus/usb/001/002 

Udevadm info starts with the device specified by the devpath and then
walks up the chain of parent devices. It prints for every device
found, all possible attributes in the udev rules key format.
A rule to match, can be composed by the attributes of the device
and the attributes from one single parent device.

  looking at device '/devices/pci0000:00/0000:00:1d.7/usb1/1-5':
    KERNEL=="1-5"
    SUBSYSTEM=="usb"
    DRIVER=="usb"
    ATTR{configuration}=="Android Device Config 142"
    ATTR{bNumInterfaces}==" 2"
    ATTR{bConfigurationValue}=="1"
    ATTR{bmAttributes}=="80"
    ATTR{bMaxPower}=="500mA"

    ...


The udev rules are put in their own file in /etc/udev/rules.d/. Our udev rule(s) need some distinct attribute(s) (eg: Vendor ID ) to kick on and set the mode-?umask? and group ownership. We may need more than one rule for more than one device.

An example rule seen at http://developer.android.com/tools/device.html
SUBSYSTEM=="usb", ATTR{idVendor}=="0bb4", MODE="0666", GROUP="plugdev" 


If you do not feel like scrolling use the following command to get the vendor ID --the first idVendor seen above the device-manufacturer of your android device.
$ udevadm info -a path -n /dev/bus/usb/001/002 |egrep -i "manufac|vendor"
    ATTR{idVendor}=="22b8"
    ATTR{manufacturer}=="Motobrickola "
    ATTRS{idVendor}=="1d69"
    ATTRS{manufacturer}=="Linux 3.2.0-32-generic-pae ehci_hcd"
    ATTRS{vendor}=="0x8086"
    ATTRS{subsystem_vendor}=="0x1028"
From above the Vendor ID of Motobrickola is 22b8.

Adding the Rule.
$ sudo -s
# echo '"SUBSYSTEM=="usb", ATTR{idVendor}=="22b8", MODE="0666", GROUP="plugdev"' > /etc/udev/rules.d/09-android.rules
# chmod 755 /etc/udev/rules.d/09-android.rules
# /etc/init.d/udev restart


Check if it works.
# adb devices
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
List of devices attached 
TA19995RGH device



Get shell on the phone.
$ adb shell
$ cat /proc/cpuinfo
Processor : ARMv6-compatible processor rev 2 (v6l)
BogoMIPS : 122.77
Features : swp half thumb fastmult edsp java 
CPU implementer : 0x41
CPU architecture: 6TEJ
CPU variant : 0x1
CPU part : 0xb36
CPU revision : 2
Cache type : write-back
Cache clean : cp15 c7 ops
Cache lockdown : format C
Cache format : Harvard
I size  : 32768
I assoc  : 4
I line length : 32
I sets  : 256
D size  : 32768
D assoc  : 4
D line length : 32
D sets  : 256

Hardware : Morrison
Revision : 0a00
Serial  : 0000000000000000


A few --of the 1 gazillion relative resources-- that do not suck!
http://developer.android.com/tools/device.html





adb setup debian based linux

to Greek that you can read ... little iconv script -- Windows-1253 -> UTF8

Many text files containing Greek Characters made in Windows systems are encoded with Windows-1253 and end up looking like the following on Linux Systems.

$ cat directions-in-greek.txt
        ������
������������ �� ������ ���� ����� ������ (STORAGE CARD)
������� ���� ��������� -->���������-->



iconv is the easiest way to encode such files to UTF8 eg:
$ iconv -f WINDOWS-1253 -t UTF-8 directions-in-greek.txt
        ΟΔΗΓΙΕΣ
ΑΝΤΙΓΡΑΦΟΥΜΕ ΤΟ ΑΡΧΕΙΟ ΣΤΗΝ ΚΑΡΤΑ ΜΝΗΜΗΣ (STORAGE CARD)
ΚΑΤΟΠΙΝ ΠΑΜΕ ΡΥΘΜΙΣΕΙΣ -->ΕΦΑΡΜΟΓΕΣ-->


However, even when you know about iconv it still gets annoying if you are working with such files a lot. Hence the following little script.

#!/bin/bash
#g0 2013 , http://alog.ipduh.com/2013/03/to-greek-that-you-can-read-little-iconv.html
#convert files in WINDOWS-1253 to UTF8

ICONV="/usr/bin/iconv"
FILE_IN=${1}

if [ $# -eq 1 ]; then

if [ -f ${FILE_IN} ]; then
        ${ICONV} -f WINDOWS-1253 -t UTF-8 ${FILE_IN} -o ${FILE_IN}.utf8
        /bin/cat ${FILE_IN}.utf8
        echo ""
        echo ""
        echo "win2utf8:${FILE_IN} encoded in UTF8 at ${FILE_IN}.utf8"
        exit 0
else
        echo "${FILE_IN} does not exist"
        exit 404
fi

else
        echo "Please enter 1 File name"
        exit 500

fi








     


Install win2utf8
# wget kod.ipduh.com/lib/win2utf8
# mv win2utf8 /usr/bin/
# chmod 755 /usr/bin/win2utf8


Use win2utf8
$ win2utf8 directions-in-greek.txt
        ΟΔΗΓΙΕΣ
ΑΝΤΙΓΡΑΦΟΥΜΕ ΤΟ ΑΡΧΕΙΟ ΣΤΗΝ ΚΑΡΤΑ ΜΝΗΜΗΣ (STORAGE CARD)
ΚΑΤΟΠΙΝ ΠΑΜΕ ΡΥΘΜΙΣΕΙΣ -->ΕΦΑΡΜΟΓΕΣ-->


win2utf8:directions-in-greek.txt encoded in UTF8 at directions-in-greek.txt.utf8






To Greek that you can Read -- iconv script

adding the 3TB drive - linux

A quick how-to add a `large` disk to a linux system. Why? Because I just realized how confusing and bad-written a similar post of mine is and because tonnes of friends and acquaintances just bought a `hot` in Greece microserver along with extra 3TB hard drives. This way I may not have to set them up all.

See the disks.
# lshw -C disk
  *-disk:0                
       description: ATA Disk
       product: VB0250EAVER
       physical id: 0
       bus info: scsi@0:0.0.0
       logical name: /dev/sda
       version: HPG7
       serial: Z3T174VN
       size: 232GiB (250GB)
       capabilities: partitioned partitioned:dos
       configuration: ansiversion=5 signature=00008cb6
  *-disk:1
       description: ATA Disk
       product: WDC WD30EFRX-68A
       vendor: Western Digital
       physical id: 1
       bus info: scsi@1:0.0.0
       logical name: /dev/sdb
       version: 80.0
       serial: WD-WMC1T2590452
       size: 2794GiB (3TB)
       capabilities: gpt-1.00 partitioned partitioned:gpt
       configuration: ansiversion=5 guid=a605f0d3-a21a-4fee-b805-59946c3516b8
  *-disk:2
       description: ATA Disk
       product: WDC WD30EFRX-68A
       vendor: Western Digital
       physical id: 0.0.0
       bus info: scsi@2:0.0.0
       logical name: /dev/sdc
       version: 80.0
       serial: WD-WMC1T2588956
       size: 2794GiB (3TB)
       configuration: ansiversion=5


See partitions seen by the system.
# cat /proc/partitions 
major minor  #blocks  name

   8        0  244198584 sda
   8        1  242232320 sda1
   8        2          1 sda2
   8        5    1964032 sda5
   8       16 2930266584 sdb
   8       17 2930265088 sdb1
   8       32 2930266584 sdc


and what is mounted where along with file system usage.
# df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/sda1       228G  1.5G  215G   1% /
udev            930M  4.0K  930M   1% /dev
tmpfs           376M  232K  376M   1% /run
none            5.0M     0  5.0M   0% /run/lock
none            939M     0  939M   0% /run/shm
/dev/sdb1       2.7T  201M  2.7T   1% /data01


Apparently the new one is at /dev/sdc.

Set gpt and create one large partition
# parted /dev/sdc
GNU Parted 2.3
Using /dev/sdc
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) mklabel gpt 
(parted) mkpart primary 0GB 3001GB                                    
(parted) print                                                            
Model: ATA WDC WD30EFRX-68A (scsi)
Disk /dev/sdc: 3001GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt

Number  Start   End     Size    File system  Name     Flags
 1      1049kB  3001GB  3001GB               primary
(parted) quit
Information: You may need to update /etc/fstab.                           



Format with ext4 the new partition
# mkfs.ext4 /dev/sdc1
mke2fs 1.42 (29-Nov-2011)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=0 blocks, Stripe width=0 blocks
183148544 inodes, 732566272 blocks
36628313 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=4294967296
22357 block groups
32768 blocks per group, 32768 fragments per group
8192 inodes per group
Superblock backups stored on blocks: 
 32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208, 
 4096000, 7962624, 11239424, 20480000, 23887872, 71663616, 78675968, 
 102400000, 214990848, 512000000, 550731776, 644972544

Allocating group tables: done                            
Writing inode tables: done                            
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: done       



Create a mount directory.
# mkdir /data02


Mount the new partition.
# mount /dev/sdc1 /data02


See mounted partitions and File System Usage.
# df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/sda1       228G  1.5G  215G   1% /
udev            930M  4.0K  930M   1% /dev
tmpfs           376M  236K  376M   1% /run
none            5.0M     0  5.0M   0% /run/lock
none            939M     0  939M   0% /run/shm
/dev/sdb1       2.7T  201M  2.7T   1% /data01
/dev/sdc1       2.7T  201M  2.6T   1% /data02


Unmount the new partition.
# umount /data02
make sure it is not mounted.
# mount
/dev/sda1 on / type ext4 (rw,errors=remount-ro)
proc on /proc type proc (rw,noexec,nosuid,nodev)
sysfs on /sys type sysfs (rw,noexec,nosuid,nodev)
none on /sys/fs/fuse/connections type fusectl (rw)
none on /sys/kernel/debug type debugfs (rw)
none on /sys/kernel/security type securityfs (rw)
udev on /dev type devtmpfs (rw,mode=0755)
devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=0620)
tmpfs on /run type tmpfs (rw,noexec,nosuid,size=10%,mode=0755)
none on /run/lock type tmpfs (rw,noexec,nosuid,nodev,size=5242880)
none on /run/shm type tmpfs (rw,nosuid,nodev)
/dev/sdb1 on /data01 type ext4 (rw)


Reclaim the 5% reserved for the system.
# tune2fs -m 0 /dev/sdc1
tune2fs 1.42 (29-Nov-2011)
Setting reserved blocks percentage to 0% (0 blocks)


Add the new partition and mount point to fstab.
# echo "/dev/sdc1 /data02 ext4 defaults 0 2" >> /etc/fstab


Mount everything on fstab.
# mount -a


See what is mounted where and filesystem usage again!
# df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/sda1       228G  1.5G  215G   1% /
udev            930M  4.0K  930M   1% /dev
tmpfs           376M  236K  376M   1% /run
none            5.0M     0  5.0M   0% /run/lock
none            939M     0  939M   0% /run/shm
/dev/sdb1       2.7T  201M  2.7T   1% /data01
/dev/sdc1       2.7T  201M  2.7T   1% /data02


done.



Adding a 3TB drive - Linux

a simple NTP server status web-page

A quick how-to create a simple NTP server status web-page.

I will be using apache to serve the status web-page, but any cgi capable web-server will do.

The NTP server status script.

#!/usr/bin/perl
#g0 2013  , http://ipduh.com/contact
#simple ntp server status web-page
#Prerequisites: ntpdate & ntptrace
use strict;
#configure
my $myNTPIP="10.21.241.4";
my $myNTPDNS="ntp.ipduh.awmn";
my $ntptrace="/usr/bin/ntptrace";
my $ntpdate="/usr/sbin/ntpdate";
#configure END

my $epoch=time();
my @ntptrace=`$ntptrace $myNTPIP`;
my @date=`$ntpdate -q $myNTPIP`;
my @fields=();
my $liin;
my @ntptrace_out=();
foreach my $li(@ntptrace){
 @fields=split(/:/,$li);
 $fields[0]="<a href=http://ipduh.com/apropos/?$fields[0]>$fields[0]</a>";
 $liin="$fields[0]".":"."$fields[1]";
 push(@ntptrace_out,$liin); 
}

print <<"TOP";
Content-type: text/html \n\n
<!doctype html><html><head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>$myNTPDNS</title>
<meta name='description' content='$myNTPIP - $myNTPDNS NTP server status web-page' /> 
<style>
p { padding-left: 0px; font-family:  Fixed, monospace; font-weight: 1em; }
.little { padding-left: 0px; font-family:  monospace; font-weight: .4em; }
.board { position:absolute; top:100px; left:100px; }
a.goto:link { color:#000000; text-decoration:underline; }
a.goto:visited { color:#000000; text-decoration:underline; }
a.goto:hover {color:#000000;text-decoration:none;background:yellow;}
a.goto:active {color:#00FF00;text-decoration:none;background:yellow;
</style>
</head><body>
<div class=board>
TOP
print "<p> $myNTPIP - $myNTPDNS </p><pre> @date <br /> @ntptrace_out </pre>";
print <<'BOT';
<pre>
|__________   ________________________________________________________________________|
           \ |
            \|
            
        |   /\________/\   |
        |  /____    ____\  |
        |_/     \__/     \_|
        [_       __       _]
          \_____/  \_____/
           \    ____    / 
            |   \__/   |   
          _  \________/  _
          \\  /|    |\  //
           \\IPDUHHUD9I//

</pre>
BOT
print <<"TOEND";
<center><p class=little> &copy; <a href=http://ipduh.com>ipduh</a> <a href="http://ipduh.com/epoch/?$epoch" class=goto>$epoch</a>
</p></center><br /><br /><br /><br /></div></body></html>
TOEND


    


A sample apache2 virtual host configuration.


<VirtualHost 10.21.241.4:80>
        DocumentRoot "/var/www/ntp.ipduh.awmn/www/"
        ServerName  ntp.ipduh.awmn
        ScriptAlias /cgi-bin2/ "/var/www/ntp.ipduh.awmn/www/"
        AddHandler cgi-script .pl

<Directory "/var/www/ntp.ipduh.awmn/www">
        AllowOverride None
        Options       ExecCGI
        Order         allow,deny
        Allow         from all
        DirectoryIndex index.pl index.html index.htm
</Directory>

ErrorLog  "|/usr/sbin/rotatelogs /var/www/ntp.ipduh.awmn/logs/error/ntp.ipduh.awmn-error_log.%Y%m%d 86400"
CustomLog "|/usr/sbin/rotatelogs /var/www/ntp.ipduh.awmn/logs/access/ntp.ipduh.awmn-access_log.%Y%m%d 86400" combined
</VirtualHost>



To install the ntp-status-page put the ntp-status script to a cgi directory. You can get the ntp-status script from http://kod.ipduh.com/lib/ntp-status-web.pl
If you are planning on using an apache2 virtual host similar to the one above just for this you could do the following.
$ cd /path/to/vhost-web-root
$ wget http://kod.ipduh.com/lib/ntp-status-web.pl
$ mv ntp-status-web.pl index.pl
$ chmod 755 index.pl




A simple NTP status web-page script

SMART ...

Self-Monitoring, Analysis, and Reporting Technology SMART.

#apt-get install smartmontools


See HardDrives
#lshw -C disk
or you could figure it out from
#cat /proc/partitions


See if SMART support is available and enabled
#smartctl -i /dev/sdb
If SMART support is available and not enabled
#smartctl -s on /dev/sdb


Print all SMART information that smartctl can find about a disk drive
#smartctl -a /dev/sdb


Print generic SMART capabilities and how much time would take to run Self-tests.
#smartclt -c /dev/sdb


Run a short test.
#smartctl -t short /dev/sdb
smartctl version 5.38 [x86_64-unknown-linux-gnu] Copyright (C) 2002-8 Bruce Allen
Home page is http://smartmontools.sourceforge.net/

=== START OF OFFLINE IMMEDIATE AND SELF-TEST SECTION ===
Sending command: "Execute SMART Short self-test routine immediately in off-line mode".
Drive command "Execute SMART Short self-test routine immediately in off-line mode" successful.
Testing has begun.
Please wait 2 minutes for test to complete.
View test statistics
#smartctl -l selftest /dev/sdb
smartctl version 5.38 [x86_64-unknown-linux-gnu] Copyright (C) 2002-8 Bruce Allen
Home page is http://smartmontools.sourceforge.net/

=== START OF READ SMART DATA SECTION ===
SMART Self-test log structure revision number 1
Num  Test_Description    Status                  Remaining  LifeTime(hours)  LBA_of_first_error
# 1  Short offline       Completed without error       00%     15033         -


To enable the SMARTmontools Daemon set-uncomment start_smartd=yes in /etc/default/smartmontools
# grep start_smartd /etc/default/smartmontools
start_smartd=yes


Configure smartd in /etc/smartd.conf You could use the directive DEVISCAN to let smartd find disk drives or list the drives you want tested explicitly. The configuration file has many examples that you can adjust to your needs eg.
#DEVICESCAN -m root -M exec /usr/share/smartmontools/smartd-runner
/dev/sda -a m syswatch -M test
/dev/sdb -a m syswatch -M test

# Monitor all attributes except normalized Temperature (usually 194),
# but track Temperature changes >= 4 Celsius, report Temperatures
# >= 45 Celsius and changes in Raw value of Reallocated_Sector_Ct (5).
# Send mail on SMART failures or when Temperature is >= 55 Celsius.
/dev/sda -a -I 194 -W 4,45,55 -R 5 -m syswatch@bot.ipduh.com
/dev/sdb -a -I 194 -W 4,45,55 -R 5 -m syswatch@bot.ipduh.com

# A very silent check.  Only report SMART health status if it fails
# But send an email in this case
/dev/sda -H -C 0 -U 0 -m syswatch@bot.ipduh.com
/dev/sdb -H -C 0 -U 0 -m syswatch@bot.ipduh.com

# A very silent check.  Only report SMART health status if it fails
# But send an email in this case
/dev/sda -H -C 0 -U 0 -m syswatch@bot.ipduh.com
/dev/sdb -H -C 0 -U 0 -m syswatch@bot.ipduh.com




/etc/init.d/smartmontools start
Starting S.M.A.R.T. daemon: smartd.


Check
# tail -f /var/log/syslog |grep smartd
Mar  8 11:17:26 looky smartd[8738]: Device: /dev/sdb [SAT], initial Temperature is 53 Celsius (Min/Max ??/53)
Mar  8 11:17:26 looky smartd[8738]: Device: /dev/sdb [SAT], Temperature 53 Celsius reached limit of 45 Celsius (Min/Max ??/53)
Mar  8 11:17:26 looky smartd[8738]: Device: /dev/sda [SAT], state written to /var/lib/smartmontools/smartd.ST2000DM001_9YN164-Z1E0BMF4.ata.state






SMART ... linux ...