slitaz-arm diff 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 diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/cgi-adm/plugins/status/status.cgi Tue Apr 01 23:09:04 2014 +0200 1.3 @@ -0,0 +1,51 @@ 1.4 +#!/bin/sh 1.5 +# 1.6 +# SliTaz ARM CGI Plugin - System configs and options 1.7 +# 1.8 + 1.9 +if [ "$(GET status)" ]; then 1.10 + html_header "Status" 1.11 + cat << EOT 1.12 +<h1>System Status</h1> 1.13 +<p> 1.14 + Uptime: $(uptime) 1.15 +</p> 1.16 + 1.17 +<h2>Disk usage</h2> 1.18 +<pre> 1.19 +Filesystem Size Used Available Use% Mounted on 1.20 +-------------------------------------------------------------------------------- 1.21 +$(df -h | grep ^/dev) 1.22 +</pre> 1.23 + 1.24 +<h2>Memory usage</h2> 1.25 +<pre> 1.26 +Type total used free shared buffers 1.27 +-------------------------------------------------------------------------------- 1.28 +$(free -m | sed "/total/d") 1.29 +</pre> 1.30 + 1.31 +<h2>Routing table</h2> 1.32 +<pre> 1.33 +Destination Gateway Genmask Flags Metric Ref Use Iface 1.34 +-------------------------------------------------------------------------------- 1.35 +$(route | grep [0-9]) 1.36 +</pre> 1.37 + 1.38 +<h2>Kernel messages</h2> 1.39 +<pre> 1.40 +Last dmesg output 1.41 +-------------------------------------------------------------------------------- 1.42 +$(dmesg | tail -n 15) 1.43 +</pre> 1.44 + 1.45 +<h2>Kernel modules</h2> 1.46 +<pre> 1.47 +Module Size Used by Tainted: G 1.48 +-------------------------------------------------------------------------------- 1.49 +$(lsmod | sed "/^Module/d") 1.50 +</pre> 1.51 + 1.52 +EOT 1.53 + html_footer && exit 0 1.54 +fi