slitaz-arm view cgi-adm/plugins/status/status.cgi @ rev 96

cgi-adm: add upload plugin
author Christophe Lincoln <pankso@slitaz.org>
date Sun Apr 13 00:56:19 2014 +0200 (2014-04-13)
parents d670034c1f00
children c34a9ff05fd1
line source
1 #!/bin/sh
2 #
3 # SliTaz ARM CGI Plugin - System configs and options
4 #
6 if [ "$(GET status)" ]; then
7 html_header "Status"
8 cat << EOT
9 <h1>System Status</h1>
10 <p>
11 Uptime: $(uptime)
12 </p>
14 <h2>Disk usage</h2>
15 <pre>
16 Filesystem Size Used Available Use% Mounted on
17 --------------------------------------------------------------------------------
18 $(df -h | grep ^/dev)
19 </pre>
21 <h2>Memory usage</h2>
22 <pre>
23 Type total used free shared buffers
24 --------------------------------------------------------------------------------
25 $(free -m | sed "/total/d")
26 </pre>
28 <h2>Last users</h2>
29 <pre>
30 USER TTY HOST LOGIN TIME
31 --------------------------------------------------------------------------------
32 $(last | tail -n 12)
33 </pre>
35 <h2>Routing table</h2>
36 <pre>
37 Destination Gateway Genmask Flags Metric Ref Use Iface
38 --------------------------------------------------------------------------------
39 $(route | grep [0-9])
40 </pre>
42 <h2>ARP hosts</h2>
43 <pre>
44 Host (IP)
45 --------------------------------------------------------------------------------
46 $(arp -a)
47 </pre>
49 <h2>Kernel messages</h2>
50 <pre>
51 Last dmesg output
52 --------------------------------------------------------------------------------
53 $(dmesg | tail -n 15)
54 </pre>
56 <h2>Kernel modules</h2>
57 <pre>
58 Module Size Used by Tainted: G
59 --------------------------------------------------------------------------------
60 $(lsmod | sed "/^Module/d")
61 </pre>
63 EOT
64 html_footer && exit 0
65 fi