[CentOS] parsing out adjacent text

Tue Jun 3 13:18:38 UTC 2014
Tim Dunphy <bluethundr at gmail.com>

hey all,

 I'm trying to figure out how to use apache's mod_status module to figure
out which of the web servers in a farm of six are processing more requests
than others.

 I'm writing a script to grep out requests per second from the status
module like this:

 [root at uszmpwslp014lc ~]# GET http://$(hostname -i)/server-status  | grep
-i  requests/sec
<dt>4.08 requests/sec - 80.9 kB/second - 19.8 kB/request</dt>

That works ok. And next I'm grepping it back down and awking it to just the
part I'm interested in:

[root at uszmpwslp014lc ~]# GET http://$(hostname -i)/server-status  | grep -i
-e request -e requests/sec | grep -i -v -e currently  -e code  -e ss | awk
'{print $1}'

But now I need to get rid of just the <dt> in front of the 4.08?

I think I may be able to use the 'cut' command to do this, but I'm unsure

Any thoughts?


GPG me!!

gpg --keyserver pool.sks-keyservers.net --recv-keys F186197B