Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 21 Apr 2008 12:23:51 +0200
From:      "pobox@verysmall.org" <pobox@verysmall.org>
To:        FreeBSD Questions <questions@freebsd.org>
Subject:   getting iostat -x %b with php
Message-ID:  <480C6B37.4@verysmall.org>

next in thread | raw e-mail | index | archive | help
I am trying to add performance monitor to a php application working on a 
dedicated server and one of the informations I would like to collect is 
the hard drives load, which, as far as I could find out, can be seen in 
the %b of iostat -x.

What would be the most reliable way to extract this information with 
php? I could imagine that I can exec() the iostat -x - but I am not sure 
about the best way to parse the iostst -x output, so that I get exactly 
this number. For instance, can I rely that %b is aways the Nth column in 
the answer? - then I could do it with regex.

Iv



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?480C6B37.4>