Active IQ Unified Manager Discussions

Selecting volumes based on the percentage used

baileyj
4,859 Views

Guys,

I'm looking to have a query select volumes based off the percentage used, all volumes 90% full and up for example.  Any ideas?  I've been beating this around for a while now and getting no traction so I figured I would ask the experts.

Thanks in Advance.

10 REPLIES 10

sundarea
4,781 Views

HI Bailey,

We need to write a filter to list all the volumes based on used size. by the way are you looking for CDOT or 7-Mode. So that i can write a filter and share it with you.

Regards,

Sundar

baileyj
4,782 Views

7-mode, thanks Sundar!

ag
NetApp
4,782 Views

Hi,

I have attached the filter.

Import and use it.

Let me know if it works fine.

Cheers,

Anil

baileyj
4,782 Views

Thanks!  Can you post the code? I'm unable to upgrade to 2.2 until it goes GA so i can't use the one you attached.

sundarea
4,781 Views

Anil G left the office for the day... he will post the code in couple of hours(once he reaches home).

baileyj
4,781 Views

Great, thanks.

ag
NetApp
4,781 Views

Hi bailey,

This is the query i am using in the filter i created.

I was using a later version and forgot for a moment that you would not be able to import it.

SELECT

    array.ip as 'array.ip',

    volume.name as name

FROM

    storage.volume as volume,

    storage.array as array

WHERE

    (

        (

            volume.used_size_mb/volume.available_size_mb

        ) * 100

    ) > '${Percentage}'

    AND array.id = volume.array_id

    AND array.ip = '${array}'

    AND volume.name != 'vol0'

Let me know if it helps.

-Anil

baileyj
4,781 Views

That helps, but it doesn't appear to be doing what I want. 

When I plug in a percentage I'm not just getting volumes of that percentage used or higher but I'm not getting all of the volumes either, what am I missing here?

ag
NetApp
4,782 Views

My bad. Try this!

SELECT

    array.ip as 'array.ip',

    volume.name as name

FROM

    storage.volume as volume,

    storage.array as array

WHERE

    (

        (

            volume.used_size_mb/volume.size_mb

        ) * 100

    ) > '${Percentage}'

    AND array.id = volume.array_id

    AND array.ip = '${array}'

    AND volume.name != 'vol0'

ag
NetApp
4,206 Views

Hi Baileyj,

Did the query work out fine for you?

-Anil

Public