SMART won't read from a data file?

Help
Julie
2010-06-11
2012-12-12
  • Julie
    Julie
    2010-06-11

    I have tried a variety of file names, but SMART always states 'No matching records found'
    I have changed SMART.config.php to:
    define('PSI_PLUGIN_SMART_ACCESS', 'data');

    These are some of the names I have tried for Drive C:
    SMART.txt
    SMART0.txt
    SMART1.txt
    SMART2.txt
    SMARTC.txt
    SMARTLocal Disk.txt
    SMARTLocal Disk (C).txt
    SMARTDisk 0.txt
    SMARTDisk%200.txt

    I even tried changing class.SMART.inc.php line 75, which didn't work:
    if ((CommonFunctions::rfts(APP_ROOT."/data/SMART{$dn}.txt", $buffer))&&(!empty($buffer))){
    To:
    if ((CommonFunctions::rfts(APP_ROOT."/data/SMART0.txt", $buffer))&&(!empty($buffer))){

    SMART what would disk number on Windows be for this file to be read?

    Here are my drives:

    If I can get this to work, I have an idea to make this work for Windows :D
    Thank you :)

     

  • Anonymous
    2011-10-25

    The SMART<number>.txt system is sequential.

    So if you device list is "C:,F:,D:" or something then

    C: is 0
    F: is 1
    and D: is 2

    That said, the data file isn't created on it's own!

    You need a cronjob/scheduled task to write and update that file

    Example for Cronjob:
    */5 * * * * /usr/sbin/smartctl -all /dev/sda > /var/www/monitoring/data/SMART0.txt

    That would update the file for your first device in list every 5 minutes :)