Ignore:
Timestamp:
Nov 25, 2009, 9:20:27 PM (15 years ago)
Author:
george
Message:
  • Opraveno: Import stavu netwatch. * Opraveno: Chybné označení dokončení restartu konfigurace.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/system/generators/netwatch_import.php

    r248 r264  
    1515  $Routerboard->HostName = $Subnet['DHCP'];
    1616  $List = $Routerboard->ListGetPrint($Path, array('host', 'status'));
    17  
    1817  foreach($List as $Properties)
    1918  {
     
    2524        $Online = 1;
    2625        $Values = array('Online' => $Online, 'LastOnline' => 'NOW()');
     26        //echo($Properties['host']." up\n");
    2727      } else
    2828      {
    2929        $Online = 0;
    3030        $Values = array('Online' => $Online);
     31        //echo($Properties['host']." down\n");
    3132      }
    3233
     
    3940        $DbResult2 = $Database->select('NetworkInterfaceStat', '*', '(NetworkInterface="'.$InterfaceId.'") AND (Time = DATE_FORMAT(NOW(), "%Y-%m-%d %H:00:00"))');
    4041        if($DbResult2->num_rows == 0) $Database->query('REPLACE INTO NetworkInterfaceStat (NetworkInterface, Time) VALUES ("'.$InterfaceId.'", DATE_FORMAT(NOW(), "%Y-%m-%d %H:00:00"))');         
    41         $Database->query('UPDATE NetworkInterfaceStat SET Count = Count + 1 WHERE (NetworkInterface="'.$InterfaceId.'") AND (Time = DATE_FORMAT(NOW(), "%Y-%m-%d %H:00:00"))');
     42        $Database->query('UPDATE NetworkInterfaceStat SET PingCount = PingCount + 1 WHERE (NetworkInterface="'.$InterfaceId.'") AND (Time = DATE_FORMAT(NOW(), "%Y-%m-%d %H:00:00"))');
    4243      }
    4344    }
Note: See TracChangeset for help on using the changeset viewer.