Changeset 2051


Ignore:
Timestamp:
Nov 13, 2011, 6:28:46 AM (12 years ago)
Author:
mitchb
Message:
Work around ipvsadm not knowing how to filter on fwmark

We're already using awk to process our output; let it do all the work.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lvs/debian/config/etc/ha.d/ldirectord-http.sh

    r1203 r2051  
    2121"
    2222echo "<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>"
    23 /sbin/ipvsadm -L -f 2 | sed 's/:0//; s/:Port//' | awk 'BEGIN { OFS="</td><td>" } /->/ { print "<tr><td>" $2, $4, $5, $6 "</td></tr>"}'
     23/sbin/ipvsadm | sed 's/:0//; s/:Port//' | awk 'BEGIN { OFS="</td><td>" } /^FWM  2 /,/^FWM  [^2] / { if (/->/) print "<tr><td>" $2, $4, $5, $6 "</td></tr>"}'
    2424echo "</table></body></html>"
Note: See TracChangeset for help on using the changeset viewer.