]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - keystone-demos/matrix-apps.git/blob - utility_info/cgi-bin/info.cgi
e046ac1b0765a53db0b77c320d1e532e4b90448b
[keystone-demos/matrix-apps.git] / utility_info / cgi-bin / info.cgi
1 #!/bin/sh
3 echo Content-type: text/html
4 echo 
5 echo 
6 cat << EOM
7 <head>
8 <meta http-equiv="content-type" content="text/html; charset=utf-8" />
9 <title>Keystone II Utility Application System Infomation</title>
10 </head>
11 <body>
12 <div id='wrapper'>
13 <div id='logo'><h1>Information</h1></div>
14 <div id='header'>
15 <div id='menu'>
16 </div>
18 <div id='page'>
19 <div id='content'>
20 <hr>
21 <table cellpadding='6'>
22 <tr>
23 <td valign='center'><image src='apps/images/utilities-c66x.png'></td>
24 <td width='100%' align='justify'>
25 <h2>Information</h2><br>
26 <p class='Description'><b>Description:</b> This page displays the static system information. </p>
27 </td>
28 </tr>
29 </table>
30 <hr>
31 </div>
32 <br>
33 EOM
34         
35 cat << UPT1
36 <div>
37 <h3>System Up Time</h3> 
38 <PRE>
39 UPT1
41 cat /proc/uptime
43 cat << UPT2
44 seconds
45 </PRE>
46 </div><br>
47 UPT2
49 cat << CPUINFO1 
50 <div>
51 <h3>CPU Info</h3>
52 <PRE>
53 CPUINFO1
55 cat /proc/cpuinfo
57 cat << CPUINFO2 
58 </PRE>
59 </div><br>
60 CPUINFO2
62 cat << SWINFO1 
63 <div>
64 <h3>Linux version</h3>
65 <PRE>
66 SWINFO1
68 uname -srm
70 cat << SWINFO2 
71 </PRE>
72 </div><br>
73 SWINFO2
75 TMPFILE=`mktemp`
76 mount | awk ' {print "device ", $1," mounted on ",$3, " as ", $5, "filesystem"}' > $TMPFILE
78 cat << MOUNTINFO1  
79 <div>
80 <h3>Mount Info</h3>
81 <PRE>
82 MOUNTINFO1
84 cat $TMPFILE
85 rm $TMPFILE
87 cat << MOUNTINFO2 
88 </PRE>
89 </div><br>
90 MOUNTINFO2
92 cat << IFCONFIG1  
93 <div>
94 <h3>Network Interfaces</h3>
95 <PRE>
96 IFCONFIG1
98 ifconfig
100 cat << IFCONFIG2 
101 </PRE>
102 </div><br>
103 IFCONFIG2
105 cat << ROUTEINFO1  
106 <div>
107 <h3>Routing table</h3>
108 <PRE>
109 ROUTEINFO1
111 route
113 cat << ROUTEINFO2 
114 </PRE>
115 </div><br>
116 ROUTEINFO2
119 cat << MODINFO1  
120 <div>
121 <h3>Module Info</h3>
122 <PRE>
123 MODINFO1
125 lsmod
127 cat << MODINFO2 
128 </PRE>
129 </div><br>
130 MODINFO2
132 cat << EOF
133 <hr>
134 <div style='clear: both;'>&nbsp;</div>
135 </div>
136 <div id="footer">
137         <p id="legal">( c ) 2013 Texas Instruments Incorporated&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</p>
138 </div>
139 </body>
140 </html>
141 EOF