How do I filter sar -d output for md devices only ?

How do I filter sar -d output for md devices only ?

Post by G Dahle » Sat, 12 Mar 2005 00:49:48



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

 
 
 

How do I filter sar -d output for md devices only ?

Post by Bernd Hau » Thu, 17 Mar 2005 19:06:36



> 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.

Well, not "most used" but "suboptimally fast" can be found well using se
with virtual_adrian. If that isn't what you want I'm at something of a
loss.

Also, is "most used" that useful? I'd go for "least free reserves", for
which svc_t in iostat -x might be useful.

lg, Bernd
--
There was only one road back to L.A.

 
 
 

1. Filtering sar -d output on solaris to get only "md" devices

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

2. Sound card and modem under Red Hat 5.2

3. NFS Devices in sar Output

4. My FreeBSD 2.2.8. crashed.

5. anybody doing ipchains output filtering?

6. domain masquerading for mail

7. md.cf file doesn't match metastat output in SDS 4.2.1.

8. trace(1) for HP-UX is now available!

9. C99 initializers for drivers/md/md.c

10. Problem executing sound device on server machine and output to sound device

11. Could not compile md/raid5.c and md/multipath.c in 2.5.3-pre3

12. weird md+scsi prob (delayed or missing partition check, md autorun finds no RAID)

13. US-MD (Germantown, MD) - Oracle Systems DBA -