Solaris 2.6
I need to filter sar output in a way that will let me easily determine which
disk are the most used. In my case, mirrored SVM metadevices.
If I only use sar -d, I get the md devices, as well as their "subcomponents"
(For example, if I have mirror md0 comprised of submirrors md1 and md2, I
get md0, md1 and md2 in the output, as well as the cxtxdx... devices)
In my case, all the metadevices (mirrors here) have names that end with a
"0"
So I did someting like:
sar -d | egrep -e "md.0 |md..0 |fd0"
As you can see, I'm no awk/regex expert. I presume I could use it to do what
I want with awk.
What I would like, is to get the headings of sar (4th line of output), and
then the time (I had to use the "fd0" trick in my case) and the stats for
all md devices. I don't want the data for the underlying metadevices or
slices. Of course, if the script would be intellignet enough to work with
metadevices named in a different manner (that is, not always endig with a
"0") that would be cooler !
Thanks