Now let the script discover supported drives for you and generate the skeleton of the configuration
    file by executing the following command:
    
    
    
     [yourserver thepath]# php hddstatuscheck.php autodiscovery --savecfgonexit
    
    
    The output will be something like:
    
    
    
     Executing requested action : autodiscovery
     Found sda : reports SMART data
     {
       "smart":
       {
         "0":
         {
           "path": "/dev/sda",
           "desc": "sda",
           "model": "ST3500320NS",
           "firmware": "MA07",
           "serial": "xxxxxxxx"
           "smartctloptions": ""
         },
       },
       "nosmart":
       {
     
       }
     }
     New hard disk found : Model=<ST3500320NS>  Firmware=<MA07>  Serial=<xxxxxxxx>
     Saving configuration to hddstatuscheck.cfg
    
    
    Now edit the resulting configuration file with your favourite text editor (this tutorial uses 
nano):
    
    
    
     [yourserver thepath]# nano hddstatuscheck.cfg
    
    
    You must enter your real 
UserId and 
UserPass. In the 
hdds section you are allowed to
    modify only the 
desc field that contains the description of that drive. This description should be
    kept short, yet descriptive enough to let you identify the drive. Once you have done with the editing, you
    can run the following command to see what the script will actually parse:
    
    
    
     [yourserver thepath]# php hddstatuscheck.php showcfg
    
    
    The output should look like:
    
    
    
     Executing requested action : showcfg
     {
       "UserId": "myrealuserid",
       "UserPass": "myrealpassword",
       "DCName": "Rome office",
       "RoomName": "Room 1",
       "ServerName": "Server 1",
       "hdds":
       {
         "0":
         {
           "path": "/dev/sda",
           "desc": "sda",
           "model": "ST3500320NS",
           "firmware": "MA07",
           "serial": "xxxxxxxx"
           "smartctloptions": ""
         }
       }
     }