Last change
on this file was
2408,
checked in by quentin, 12 years ago
|
Bump the memory limit for scripts finger.
|
-
Property svn:executable set to
*
|
File size:
715 bytes
|
Rev | Line | |
---|
[1200] | 1 | #!/bin/bash |
---|
| 2 | |
---|
[2408] | 3 | ulimit -v 102400 |
---|
[1202] | 4 | |
---|
[1200] | 5 | # Read and ignore the request |
---|
| 6 | line=foo |
---|
| 7 | while [ -n "$line" ]; do |
---|
| 8 | read line |
---|
| 9 | line=${line%[:blank:]} |
---|
| 10 | line=${line% |
---|
| 11 | } |
---|
| 12 | done |
---|
| 13 | |
---|
| 14 | # Generate an HTTP reply |
---|
| 15 | |
---|
| 16 | echo "HTTP/1.0 200 OK |
---|
| 17 | " |
---|
| 18 | echo "Content-type: text/html |
---|
| 19 | " |
---|
| 20 | echo " |
---|
| 21 | " |
---|
| 22 | echo "<html><head><title>scripts.mit.edu server status</title></head><body><h1>scripts.mit.edu server status</h1><p>The following table shows a list of the servers that are currently handling web requests for scripts.mit.edu:</p><table>" |
---|
[2052] | 23 | /sbin/ipvsadm | sed 's/:0//; s/:Port//' | awk 'BEGIN { OFS="</td><td>"; show=1 } /^FWM 2 / { show=1 } /^FWM [^2] / { show=0 } /->/ { if (show==1) print "<tr><td>" $2, $4, $5, $6 "</td></tr>"}' |
---|
[1200] | 24 | echo "</table></body></html>" |
---|
Note: See
TracBrowser
for help on using the repository browser.