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

Improve CGI admin and rename 2 plugins
author Christophe Lincoln <pankso@slitaz.org>
date Tue Apr 01 23:09:04 2014 +0200 (2014-04-01)
parents
children e357535f1b91
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>Routing table</h2>
29 <pre>
30 Destination Gateway Genmask Flags Metric Ref Use Iface
31 --------------------------------------------------------------------------------
32 $(route | grep [0-9])
33 </pre>
35 <h2>Kernel messages</h2>
36 <pre>
37 Last dmesg output
38 --------------------------------------------------------------------------------
39 $(dmesg | tail -n 15)
40 </pre>
42 <h2>Kernel modules</h2>
43 <pre>
44 Module Size Used by Tainted: G
45 --------------------------------------------------------------------------------
46 $(lsmod | sed "/^Module/d")
47 </pre>
49 EOT
50 html_footer && exit 0
51 fi