-
Notifications
You must be signed in to change notification settings - Fork 0
/
ataglance.php
41 lines (32 loc) · 914 Bytes
/
ataglance.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
<?php require "init.php";?>
<html>
<head>
<link href="admstyle.css" type="text/css" rel="stylesheet">
</head>
<body>
<center>
<br><h2>At A Glance</h2>
<table border=1 cellspacing=0 cellpadding=5>
<?php
$logdir="/var/log/";
$logs=array("messages", "maillog", "adminhttpderr.log", "webhttpderr.log", "javamail.log", "adminhttpd.log", "webhttpd.log", "ataglance.log");
$oscil=0;
// show details about each log file
foreach ($logs as $log) {
$output = shell_exec('ls -lart '.$logdir.$log.' 2>&1');
echo "<tr bgcolor='#".(($oscil==0)?'ffffff':'eeeeee')."'>";
echo "<td><pre>".$output."</pre></td>";
echo "</tr>";
$oscil=($oscil==0)?1:0;
$output = shell_exec('tail -n 5 '.$logdir.$log.' 2>&1');
echo "<tr bgcolor='#".(($oscil==0)?'ffffff':'eeeeee')."'>";
echo "<td><pre>".$output."</pre></td>";
echo "</tr>";
$oscil=($oscil==0)?1:0;
}
?>
</table>
<br><br>
</center>
</body>
</html>