├── readme.md └── monitor.php /readme.md: -------------------------------------------------------------------------------- 1 | ##自用php探针 2 | * 由雅黑探针修改而来 3 | * 使用bootstrap样式 4 | * 用于监控linux环境pc/vps概况 5 | 6 | ##示例 7 | 8 | [yjiang's cake -- 资源监控](https://yjiang.cn/other/monitor.php) 9 | 10 | ##todo 11 | * 支持osx 12 | -------------------------------------------------------------------------------- /monitor.php: -------------------------------------------------------------------------------- 1 | =0; $l--) 41 | { 42 | $allsize1[$l]=floor($size/pow(1024,$l)); 43 | $allsize[$l]=$allsize1[$l]-$allsize1[$l+1]*1024; 44 | } 45 | 46 | $len=count($allsize); 47 | 48 | for($j = $len-1; $j >=0; $j--) 49 | { 50 | $fsize=$fsize.$allsize[$j].$danwei[$j]; 51 | } 52 | return $fsize; 53 | } 54 | 55 | function valid_email($str) 56 | { 57 | return ( ! preg_match("/^([a-z0-9\+_\-]+)(\.[a-z0-9\+_\-]+)*@([a-z0-9\-]+\.)+[a-z]{2,6}$/ix", $str)) ? FALSE : TRUE; 58 | } 59 | 60 | //检测PHP设置参数 61 | function show($varName) 62 | { 63 | switch($result = get_cfg_var($varName)) 64 | { 65 | case 0: 66 | return '×'; 67 | break; 68 | 69 | case 1: 70 | return ''; 71 | break; 72 | 73 | default: 74 | return $result; 75 | break; 76 | } 77 | } 78 | 79 | //保留服务器性能测试结果 80 | $valInt = isset($_POST['pInt']) ? $_POST['pInt'] : "未测试"; 81 | 82 | if ($_GET['act'] == "phpinfo") 83 | { 84 | phpinfo(); 85 | exit(); 86 | } 87 | //网速测试-开始 88 | elseif($_POST['act']=="开始测试") 89 | { 90 | ?> 91 | 96 | "; 100 | } 101 | ?> 102 | 108 | "; 118 | Echo "这里显示系统所支持的所有函数,和自定义函数\n"; 119 | print_r($arr); 120 | echo ""; 121 | exit(); 122 | }elseif($_GET['act'] == "disable_functions") 123 | { 124 | $disFuns=get_cfg_var("disable_functions"); 125 | if(empty($disFuns)) 126 | { 127 | $arr = '×'; 128 | } 129 | else 130 | { 131 | $arr = $disFuns; 132 | } 133 | Function php() 134 | { 135 | } 136 | echo "
";
137 | 	Echo "这里显示系统被禁用的函数\n";
138 | 	print_r($arr);
139 | 	echo "
"; 140 | exit(); 141 | } 142 | 143 | 144 | //网络速度测试 145 | if(isset($_POST['speed'])) 146 | { 147 | $speed=round(100/($_POST['speed']/1000),2); 148 | } 149 | elseif($_GET['speed']=="0") 150 | { 151 | $speed=6666.67; 152 | } 153 | elseif(isset($_GET['speed']) and $_GET['speed']>0) 154 | { 155 | $speed=round(100/($_GET['speed']/1000),2); //下载速度:$speed kb/s 156 | } 157 | else 158 | { 159 | $speed=" 未探测 "; 160 | } 161 | 162 | 163 | function GetCoreInformation() {$data = file('/proc/stat');$cores = array();foreach( $data as $line ) {if( preg_match('/^cpu[0-9]/', $line) ){$info = explode(' ', $line);$cores[]=array('user'=>$info[1],'nice'=>$info[2],'sys' => $info[3],'idle'=>$info[4],'iowait'=>$info[5],'irq' => $info[6],'softirq' => $info[7]);}}return $cores;} 164 | function GetCpuPercentages($stat1, $stat2) {if(count($stat1)!==count($stat2)){return;}$cpus=array();for( $i = 0, $l = count($stat1); $i < $l; $i++) { $dif = array(); $dif['user'] = $stat2[$i]['user'] - $stat1[$i]['user'];$dif['nice'] = $stat2[$i]['nice'] - $stat1[$i]['nice']; $dif['sys'] = $stat2[$i]['sys'] - $stat1[$i]['sys'];$dif['idle'] = $stat2[$i]['idle'] - $stat1[$i]['idle'];$dif['iowait'] = $stat2[$i]['iowait'] - $stat1[$i]['iowait'];$dif['irq'] = $stat2[$i]['irq'] - $stat1[$i]['irq'];$dif['softirq'] = $stat2[$i]['softirq'] - $stat1[$i]['softirq'];$total = array_sum($dif);$cpu = array();foreach($dif as $x=>$y) $cpu[$x] = round($y / $total * 100, 2);$cpus['cpu' . $i] = $cpu;}return $cpus;} 165 | $stat1 = GetCoreInformation();sleep(1);$stat2 = GetCoreInformation();$data = GetCpuPercentages($stat1, $stat2); 166 | $cpu_show = $data['cpu0']['user']."%us, ".$data['cpu0']['sys']."%sy, ".$data['cpu0']['nice']."%ni, ".$data['cpu0']['idle']."%id, ".$data['cpu0']['iowait']."%wa, ".$data['cpu0']['irq']."%irq, ".$data['cpu0']['softirq']."%softirq"; 167 | function makeImageUrl($title, $data) {$api='http://api.yahei.net/tz/cpu_show.php?id=';$url.=$data['user'].',';$url.=$data['nice'].',';$url.=$data['sys'].',';$url.=$data['idle'].',';$url.=$data['iowait'];$url.='&chdl=User|Nice|Sys|Idle|Iowait&chdlp=b&chl=';$url.=$data['user'].'%25|';$url.=$data['nice'].'%25|';$url.=$data['sys'].'%25|';$url.=$data['idle'].'%25|';$url.=$data['iowait'].'%25';$url.='&chtt=Core+'.$title;return $api.base64_encode($url);} 168 | if($_GET['act'] == "cpu_percentage"){echo "
图片加载慢,请耐心等待!

";foreach( $data as $k => $v ) {echo '';}echo "
";exit();} 169 | 170 | // 根据不同系统取得CPU相关信息 171 | switch(PHP_OS) 172 | { 173 | case "Linux": 174 | $sysReShow = (false !== ($sysInfo = sys_linux()))?"show":"none"; 175 | break; 176 | 177 | case "FreeBSD": 178 | $sysReShow = (false !== ($sysInfo = sys_freebsd()))?"show":"none"; 179 | break; 180 | 181 | default: 182 | break; 183 | } 184 | 185 | //linux系统探测 186 | function sys_linux() 187 | { 188 | // CPU 189 | if (false === ($str = @file("/proc/cpuinfo"))) return false; 190 | $str = implode("", $str); 191 | @preg_match_all("/model\s+name\s{0,}\:+\s{0,}([\w\s\)\(\@.-]+)([\r\n]+)/s", $str, $model); 192 | @preg_match_all("/cpu\s+MHz\s{0,}\:+\s{0,}([\d\.]+)[\r\n]+/", $str, $mhz); 193 | @preg_match_all("/cache\s+size\s{0,}\:+\s{0,}([\d\.]+\s{0,}[A-Z]+[\r\n]+)/", $str, $cache); 194 | @preg_match_all("/bogomips\s{0,}\:+\s{0,}([\d\.]+)[\r\n]+/", $str, $bogomips); 195 | if (false !== is_array($model[1])) 196 | { 197 | $res['cpu']['num'] = sizeof($model[1]); 198 | /* 199 | for($i = 0; $i < $res['cpu']['num']; $i++) 200 | { 201 | $res['cpu']['model'][] = $model[1][$i].' ('.$mhz[1][$i].')'; 202 | $res['cpu']['mhz'][] = $mhz[1][$i]; 203 | $res['cpu']['cache'][] = $cache[1][$i]; 204 | $res['cpu']['bogomips'][] = $bogomips[1][$i]; 205 | }*/ 206 | if($res['cpu']['num']==1) 207 | $x1 = ''; 208 | else 209 | $x1 = ' ×'.$res['cpu']['num']; 210 | $mhz[1][0] = ' | 频率:'.$mhz[1][0]; 211 | $cache[1][0] = ' | 二级缓存:'.$cache[1][0]; 212 | $bogomips[1][0] = ' | Bogomips:'.$bogomips[1][0]; 213 | $res['cpu']['model'][] = $model[1][0].$mhz[1][0].$cache[1][0].$bogomips[1][0].$x1; 214 | if (false !== is_array($res['cpu']['model'])) $res['cpu']['model'] = implode("
", $res['cpu']['model']); 215 | if (false !== is_array($res['cpu']['mhz'])) $res['cpu']['mhz'] = implode("
", $res['cpu']['mhz']); 216 | if (false !== is_array($res['cpu']['cache'])) $res['cpu']['cache'] = implode("
", $res['cpu']['cache']); 217 | if (false !== is_array($res['cpu']['bogomips'])) $res['cpu']['bogomips'] = implode("
", $res['cpu']['bogomips']); 218 | } 219 | 220 | // NETWORK 221 | 222 | // UPTIME 223 | if (false === ($str = @file("/proc/uptime"))) return false; 224 | $str = explode(" ", implode("", $str)); 225 | $str = trim($str[0]); 226 | $min = $str / 60; 227 | $hours = $min / 60; 228 | $days = floor($hours / 24); 229 | $hours = floor($hours - ($days * 24)); 230 | $min = floor($min - ($days * 60 * 24) - ($hours * 60)); 231 | if ($days !== 0) $res['uptime'] = $days."天"; 232 | if ($hours !== 0) $res['uptime'] .= $hours."小时"; 233 | $res['uptime'] .= $min."分钟"; 234 | 235 | // MEMORY 236 | if (false === ($str = @file("/proc/meminfo"))) return false; 237 | $str = implode("", $str); 238 | preg_match_all("/MemTotal\s{0,}\:+\s{0,}([\d\.]+).+?MemFree\s{0,}\:+\s{0,}([\d\.]+).+?Cached\s{0,}\:+\s{0,}([\d\.]+).+?SwapTotal\s{0,}\:+\s{0,}([\d\.]+).+?SwapFree\s{0,}\:+\s{0,}([\d\.]+)/s", $str, $buf); 239 | preg_match_all("/Buffers\s{0,}\:+\s{0,}([\d\.]+)/s", $str, $buffers); 240 | 241 | $res['memTotal'] = round($buf[1][0]/1024, 2); 242 | $res['memFree'] = round($buf[2][0]/1024, 2); 243 | $res['memBuffers'] = round($buffers[1][0]/1024, 2); 244 | $res['memCached'] = round($buf[3][0]/1024, 2); 245 | $res['memUsed'] = $res['memTotal']-$res['memFree']; 246 | $res['memPercent'] = (floatval($res['memTotal'])!=0)?round($res['memUsed']/$res['memTotal']*100,2):0; 247 | 248 | $res['memRealUsed'] = $res['memTotal'] - $res['memFree'] - $res['memCached'] - $res['memBuffers']; //真实内存使用 249 | $res['memRealFree'] = $res['memTotal'] - $res['memRealUsed']; //真实空闲 250 | $res['memRealPercent'] = (floatval($res['memTotal'])!=0)?round($res['memRealUsed']/$res['memTotal']*100,2):0; //真实内存使用率 251 | 252 | $res['memCachedPercent'] = (floatval($res['memCached'])!=0)?round($res['memCached']/$res['memTotal']*100,2):0; //Cached内存使用率 253 | 254 | $res['swapTotal'] = round($buf[4][0]/1024, 2); 255 | $res['swapFree'] = round($buf[5][0]/1024, 2); 256 | $res['swapUsed'] = round($res['swapTotal']-$res['swapFree'], 2); 257 | $res['swapPercent'] = (floatval($res['swapTotal'])!=0)?round($res['swapUsed']/$res['swapTotal']*100,2):0; 258 | 259 | // LOAD AVG 260 | if (false === ($str = @file("/proc/loadavg"))) return false; 261 | $str = explode(" ", implode("", $str)); 262 | $str = array_chunk($str, 4); 263 | $res['loadAvg'] = implode(" ", $str[0]); 264 | 265 | return $res; 266 | } 267 | 268 | //FreeBSD系统探测 269 | function sys_freebsd() 270 | { 271 | //CPU 272 | if (false === ($res['cpu']['num'] = get_key("hw.ncpu"))) return false; 273 | $res['cpu']['model'] = get_key("hw.model"); 274 | //LOAD AVG 275 | if (false === ($res['loadAvg'] = get_key("vm.loadavg"))) return false; 276 | //UPTIME 277 | if (false === ($buf = get_key("kern.boottime"))) return false; 278 | $buf = explode(' ', $buf); 279 | $sys_ticks = time() - intval($buf[3]); 280 | $min = $sys_ticks / 60; 281 | $hours = $min / 60; 282 | $days = floor($hours / 24); 283 | $hours = floor($hours - ($days * 24)); 284 | $min = floor($min - ($days * 60 * 24) - ($hours * 60)); 285 | if ($days !== 0) $res['uptime'] = $days."天"; 286 | if ($hours !== 0) $res['uptime'] .= $hours."小时"; 287 | $res['uptime'] .= $min."分钟"; 288 | //MEMORY 289 | if (false === ($buf = get_key("hw.physmem"))) return false; 290 | $res['memTotal'] = round($buf/1024/1024, 2); 291 | 292 | $str = get_key("vm.vmtotal"); 293 | preg_match_all("/\nVirtual Memory[\:\s]*\(Total[\:\s]*([\d]+)K[\,\s]*Active[\:\s]*([\d]+)K\)\n/i", $str, $buff, PREG_SET_ORDER); 294 | preg_match_all("/\nReal Memory[\:\s]*\(Total[\:\s]*([\d]+)K[\,\s]*Active[\:\s]*([\d]+)K\)\n/i", $str, $buf, PREG_SET_ORDER); 295 | 296 | $res['memRealUsed'] = round($buf[0][2]/1024, 2); 297 | $res['memCached'] = round($buff[0][2]/1024, 2); 298 | $res['memUsed'] = round($buf[0][1]/1024, 2) + $res['memCached']; 299 | $res['memFree'] = $res['memTotal'] - $res['memUsed']; 300 | $res['memPercent'] = (floatval($res['memTotal'])!=0)?round($res['memUsed']/$res['memTotal']*100,2):0; 301 | 302 | $res['memRealPercent'] = (floatval($res['memTotal'])!=0)?round($res['memRealUsed']/$res['memTotal']*100,2):0; 303 | 304 | return $res; 305 | } 306 | 307 | //取得参数值 FreeBSD 308 | function get_key($keyName) 309 | { 310 | return do_command('sysctl', "-n $keyName"); 311 | } 312 | 313 | //确定执行文件位置 FreeBSD 314 | function find_command($commandName) 315 | { 316 | $path = array('/bin', '/sbin', '/usr/bin', '/usr/sbin', '/usr/local/bin', '/usr/local/sbin'); 317 | foreach($path as $p) 318 | { 319 | if (@is_executable("$p/$commandName")) return "$p/$commandName"; 320 | } 321 | return false; 322 | } 323 | 324 | //执行系统命令 FreeBSD 325 | function do_command($commandName, $args) 326 | { 327 | $buffer = ""; 328 | if (false === ($command = find_command($commandName))) return false; 329 | if ($fp = @popen("$command $args", 'r')) 330 | { 331 | while (!@feof($fp)) 332 | { 333 | $buffer .= @fgets($fp, 4096); 334 | } 335 | return trim($buffer); 336 | } 337 | return false; 338 | } 339 | 340 | //windows系统探测 341 | function sys_windows() 342 | { 343 | if (PHP_VERSION >= 5) 344 | { 345 | $objLocator = new COM("WbemScripting.SWbemLocator"); 346 | $wmi = $objLocator->ConnectServer(); 347 | $prop = $wmi->get("Win32_PnPEntity"); 348 | } 349 | else 350 | { 351 | return false; 352 | } 353 | 354 | //CPU 355 | $cpuinfo = GetWMI($wmi,"Win32_Processor", array("Name","L2CacheSize","NumberOfCores")); 356 | $res['cpu']['num'] = $cpuinfo[0]['NumberOfCores']; 357 | if (null == $res['cpu']['num']) 358 | { 359 | $res['cpu']['num'] = 1; 360 | }/* 361 | for ($i=0;$i<$res['cpu']['num'];$i++) 362 | { 363 | $res['cpu']['model'] .= $cpuinfo[0]['Name']."
"; 364 | $res['cpu']['cache'] .= $cpuinfo[0]['L2CacheSize']."
"; 365 | }*/ 366 | $cpuinfo[0]['L2CacheSize'] = ' ('.$cpuinfo[0]['L2CacheSize'].')'; 367 | if($res['cpu']['num']==1) 368 | $x1 = ''; 369 | else 370 | $x1 = ' ×'.$res['cpu']['num']; 371 | $res['cpu']['model'] = $cpuinfo[0]['Name'].$cpuinfo[0]['L2CacheSize'].$x1; 372 | // SYSINFO 373 | $sysinfo = GetWMI($wmi,"Win32_OperatingSystem", array('LastBootUpTime','TotalVisibleMemorySize','FreePhysicalMemory','Caption','CSDVersion','SerialNumber','InstallDate')); 374 | $sysinfo[0]['Caption']=iconv('GBK', 'UTF-8',$sysinfo[0]['Caption']); 375 | $sysinfo[0]['CSDVersion']=iconv('GBK', 'UTF-8',$sysinfo[0]['CSDVersion']); 376 | $res['win_n'] = $sysinfo[0]['Caption']." ".$sysinfo[0]['CSDVersion']." 序列号:{$sysinfo[0]['SerialNumber']} 于".date('Y年m月d日H:i:s',strtotime(substr($sysinfo[0]['InstallDate'],0,14)))."安装"; 377 | //UPTIME 378 | $res['uptime'] = $sysinfo[0]['LastBootUpTime']; 379 | 380 | $sys_ticks = 3600*8 + time() - strtotime(substr($res['uptime'],0,14)); 381 | $min = $sys_ticks / 60; 382 | $hours = $min / 60; 383 | $days = floor($hours / 24); 384 | $hours = floor($hours - ($days * 24)); 385 | $min = floor($min - ($days * 60 * 24) - ($hours * 60)); 386 | if ($days !== 0) $res['uptime'] = $days."天"; 387 | if ($hours !== 0) $res['uptime'] .= $hours."小时"; 388 | $res['uptime'] .= $min."分钟"; 389 | 390 | //MEMORY 391 | $res['memTotal'] = round($sysinfo[0]['TotalVisibleMemorySize']/1024,2); 392 | $res['memFree'] = round($sysinfo[0]['FreePhysicalMemory']/1024,2); 393 | $res['memUsed'] = $res['memTotal']-$res['memFree']; //上面两行已经除以1024,这行不用再除了 394 | $res['memPercent'] = round($res['memUsed'] / $res['memTotal']*100,2); 395 | 396 | $swapinfo = GetWMI($wmi,"Win32_PageFileUsage", array('AllocatedBaseSize','CurrentUsage')); 397 | 398 | // LoadPercentage 399 | $loadinfo = GetWMI($wmi,"Win32_Processor", array("LoadPercentage")); 400 | $res['loadAvg'] = $loadinfo[0]['LoadPercentage']; 401 | 402 | return $res; 403 | } 404 | 405 | function GetWMI($wmi,$strClass, $strValue = array()) 406 | { 407 | $arrData = array(); 408 | 409 | $objWEBM = $wmi->Get($strClass); 410 | $arrProp = $objWEBM->Properties_; 411 | $arrWEBMCol = $objWEBM->Instances_(); 412 | foreach($arrWEBMCol as $objItem) 413 | { 414 | @reset($arrProp); 415 | $arrInstance = array(); 416 | foreach($arrProp as $propItem) 417 | { 418 | eval("\$value = \$objItem->" . $propItem->Name . ";"); 419 | if (empty($strValue)) 420 | { 421 | $arrInstance[$propItem->Name] = trim($value); 422 | } 423 | else 424 | { 425 | if (in_array($propItem->Name, $strValue)) 426 | { 427 | $arrInstance[$propItem->Name] = trim($value); 428 | } 429 | } 430 | } 431 | $arrData[] = $arrInstance; 432 | } 433 | return $arrData; 434 | } 435 | 436 | //比例条 437 | function bar($percent) 438 | { 439 | ?> 440 |
 
441 | "$du",'freeSpace'=>"$df",'hdPercent'=>"$hdPercent",'barhdPercent'=>"$hdPercent%",'TotalMemory'=>"$mt",'UsedMemory'=>"$mu",'FreeMemory'=>"$mf",'CachedMemory'=>"$mc",'Buffers'=>"$mb",'TotalSwap'=>"$st",'swapUsed'=>"$su",'swapFree'=>"$sf",'loadAvg'=>"$load",'uptime'=>"$uptime",'freetime'=>"$freetime",'bjtime'=>"$bjtime",'stime'=>"$stime",'memRealPercent'=>"$memRealPercent",'memRealUsed'=>"$memRealUsed",'memRealFree'=>"$memRealFree",'memPercent'=>"$memPercent%",'memCachedPercent'=>"$memCachedPercent",'barmemCachedPercent'=>"$memCachedPercent%",'swapPercent'=>"$swapPercent",'barmemRealPercent'=>"$memRealPercent%",'barswapPercent'=>"$swapPercent%",'NetOut2'=>"$NetOut[2]",'NetOut3'=>"$NetOut[3]",'NetOut4'=>"$NetOut[4]",'NetOut5'=>"$NetOut[5]",'NetOut6'=>"$NetOut[6]",'NetOut7'=>"$NetOut[7]",'NetOut8'=>"$NetOut[8]",'NetOut9'=>"$NetOut[9]",'NetOut10'=>"$NetOut[10]",'NetInput2'=>"$NetInput[2]",'NetInput3'=>"$NetInput[3]",'NetInput4'=>"$NetInput[4]",'NetInput5'=>"$NetInput[5]",'NetInput6'=>"$NetInput[6]",'NetInput7'=>"$NetInput[7]",'NetInput8'=>"$NetInput[8]",'NetInput9'=>"$NetInput[9]",'NetInput10'=>"$NetInput[10]",'NetOutSpeed2'=>"$NetOutSpeed[2]",'NetOutSpeed3'=>"$NetOutSpeed[3]",'NetOutSpeed4'=>"$NetOutSpeed[4]",'NetOutSpeed5'=>"$NetOutSpeed[5]",'NetInputSpeed2'=>"$NetInputSpeed[2]",'NetInputSpeed3'=>"$NetInputSpeed[3]",'NetInputSpeed4'=>"$NetInputSpeed[4]",'NetInputSpeed5'=>"$NetInputSpeed[5]"); 510 | $jarr=json_encode($arr); 511 | $_GET['callback'] = htmlspecialchars($_GET['callback']); 512 | echo $_GET['callback'],'(',$jarr,')'; 513 | exit; 514 | } 515 | ?> 516 | 517 | 518 | 519 | <?php echo $title.$version; ?> 520 | 521 | 522 | 523 | 524 | 613 | 617 | 618 | 619 |
620 | 621 | Fork me on GitHub 622 | 623 |

624 | 625 |

626 | 627 | 628 | 629 | 630 | 631 | 632 | 633 | 634 | 635 | 636 | 637 | 638 | 639 | 640 | 642 | 643 | 644 | 645 | 652 | 653 | 654 | 655 | 720 | 721 | 722 | 723 | 724 | 725 |
服务器实时数据
服务器当前时间服务器已运行时间
CPU型号 [核]
CPU使用状况 641 |
硬盘使用状况 646 | 总空间  G, 647 | 已用  G, 648 | 空闲  G, 649 | 使用率 % 650 |
 
651 |
内存使用状况 656 | 物理内存:共 657 | 658 | , 已用 659 | 660 | , 空闲 661 | 662 | , 使用率 663 | 664 |
665 |
666 | 667 |
668 |
669 | 0) { 672 | ?> 673 | Cache化内存为 674 | , 使用率 675 | 676 | % | Buffers缓冲为 677 |
678 |
679 | 680 |
681 |
682 | 683 | 真实内存使用 684 | 685 | , 真实内存空闲 686 | 687 | , 使用率 688 | 689 | % 690 |
691 |
692 | 693 |
694 |
695 | 0) 699 | { 700 | ?> 701 | SWAP区:共 702 | 703 | , 已使用 704 | 705 | , 空闲 706 | 707 | , 使用率 708 | 709 | % 710 |
711 |
712 | 713 |
714 |
715 | 716 | 719 |
系统平均负载
726 | 727 | 728 | 729 | 730 | 731 | 732 | 733 | 734 | 735 | 736 | 737 | 738 | 739 | 740 |
网络使用状况
: 入网: 实时: 0B/s出网: 实时: 0B/s
741 | 742 | 743 |
744 | 745 | 746 | --------------------------------------------------------------------------------