#408 SMART on Windows7

closed
nobody
Code (200)
5
2012-11-01
2011-08-24
Scott Peters
No

I don't think this is just related to SMART however its what I'm running into the issues on using 3.0.13 on EasyPHP 5.3.6.1 and smartctl 5.41 2011-06-09 r3365 [i686-w64-mingw32-win7(64)-sp1] (sf-win32-5.41-1)

First in class.CommonFunctions.inc.php on line ~69, $strProgrammpath should have a \ on windows, so $strProgrammpath = $strPath."\\".$strProgram;

For some reason $open_basedir is null and triping the contrinue; on line ~67. ini_get('open_basedir') gives '' a blank string.

So hard coding around those 2 issues I get a proc_open() trying to run 'C:\Program Files (x86)\smartmontools\bin\smartctl.exe --all C:' that looks good howver it wont run in the normal command line because of the space and no "" around the command. For the benefit of the doubt I let it run. I get the error "'C:\Program' is not recognized as an internal or external command, operable program or batch file" with PSI_DEBUG = true; (that is a horrible debug output when looking at a XML file, lots of class.XML.inc.php errors).

So I add "" around the $strProgram to give me '"C:\Program Files (x86)\smartmontools\bin\smartctl.exe" --all C:' and now $process is a resource so that's good and $strBuffer looks good however the XML /phpsysinfo/xml.php?plugin=SMART is still mostly empty with no values.

Going back to class.SMART.inc.php on line ~60/61 $buffer looks good. checking line 103 everyone looks good on the foreach. Beyond this I don't really know much preg or smart so I can't really debug any more.

Discussion

  • Scott Peters
    Scott Peters
    2011-08-24

    Command Error

     
    Attachments
  • Scott Peters
    Scott Peters
    2011-08-24

    Smart Output

     
    Attachments
  • Scott Peters
    Scott Peters
    2011-08-24

    • summary: SMART on Windows --> SMART on Windows7
     
  • Two solutions:
    -Try to use the short name of the folder in a form like "c:\Progra~2\smartmontools\bin\smartctl.exe"
    (see what the 'dir /x c:\' in the cmd window)

    -Try data-mode
    define ('PSI_PLUGIN_SMART_ACCESS', 'data'); in SMART.config.php etc.

     
  • Scott Peters
    Scott Peters
    2011-08-26

    Using "c:\Progra~2\smartmontools\bin\" for PSI_ADD_PATHS worked, might want to add a note to that code to use abbreviated paths on windows.

    Data mode still has no results, I ran smartctl -a C: > phpsysinfo\data\SMART0.txt no errors in PSI_DEBUG = true;

     
  • Use full path like:
    smartctl -all C: > c:\EasyPHP\phpsysinfo\data\SMART0.txt
    or
    smartctl -a sda > c:\EasyPHP\phpsysinfo\data\SMART0.txt

     
    • status: open --> closed