15 lines
740 B
PHP
15 lines
740 B
PHP
<?php
|
|
header("Content-Type: application/json");
|
|
header("Access-Control-Allow-Origin: *");
|
|
$d = [];
|
|
$d["docker"] = intval(shell_exec("docker ps -q 2>/dev/null | wc -l"));
|
|
$nr = @json_decode(@file_get_contents("/var/www/html/api/l99-results.json"), true);
|
|
$d["nonreg"] = ($nr["pass"] ?? 153) . "/" . (($nr["pass"]??0)+($nr["fail"]??0));
|
|
$d["disk"] = trim(shell_exec("df -h / | awk 'NR==2{print \$5}'"));
|
|
$d["ai_models"] = 7;
|
|
$tags = @file_get_contents("http://127.0.0.1:11434/api/tags");
|
|
if ($tags) { $m = json_decode($tags, true); $d["ai_models"] = count($m["models"] ?? []); }
|
|
$d["pat_days"] = intval((strtotime("2026-04-15") - time()) / 86400);
|
|
$d["crons"] = intval(shell_exec("crontab -l 2>/dev/null | grep -c ."));
|
|
echo json_encode($d);
|