UNSOLVED

khaled_atteya

updated

14 years ago

1

4232

July 2nd, 2012 12:00

processor usage percentage

Hello,

How can i know Processor usage percentage by navicli?

Thanks.

  • AnkitMehta

    4 Apprentice

    •

    1365 Posts

    1165

    0

    Posted July 2nd, 2012 12:00

    As far as I am aware there is no such command to get SP Utilization via command line.

    If you have Unisphere Analyzer enabled, you can check that proper SP Properties > Statistics (wait for a minute or two) you will see the SP Utilization.

    Christopher Imes, What do you say?

  • christopher_ime

    6 Operator

    •

    1962 Posts

    1165

    0

    Posted July 2nd, 2012 22:00

    Christopher Imes wrote:


    NOTE:
    Again, this would be the utilization since the last statistics reset or of course reboot (In Uni/Navisphere, right click SP -> Reset Statistics)

    Just to clarify, I am simply noting where the "Reset Statistics" option resides, but when following along in the example above, do not "Reset Statistics" (unless of course that is your intention when gathering the pit) as this would make the second delta in the calculation meaningless (in the context of an average).

    I just reread my post and wanted to clarify as it could be misunderstood that I am suggesting in the steps above to reset statistics. 

    Someday I'll figure out why I don't get an "Edit" button for my own posts.

  • christopher_ime

    6 Operator

    •

    1962 Posts

    1165

    3

    Posted July 2nd, 2012 22:00

    There is actually a Primus that is still with Status: In progress but has curiously been pending approval since November of last year.  It should be publicly available though once approved (Audience: Customer).

    emc282783: "How do I determine SP utilization with naviseccli"


    The text currently reads:

    [...]
    There is no naviseccli command to directly reflect the exact utilization that is shown in the GUI. The utilization in the GUI is essentially an average value taken over the update interval period (default 60s). The problem with the related commands available is that they are gathering data since the last reboot. A workaround is possible with the getcontrol command that should give an accurate utilization reading over a certain time period. We can figure out the delta (change) in busy/idle ticks and then work out a percentage as follows:

    {broken links}

    Run the getcontrol –cbt command and record the busy ticks (busy) and idle ticks (idle), then after 60s (as the GUI does) run the command again to capture busy1 and idle1. Input the values into the formula to determine the SP utilization. This will produce real up to date values which should be very close to those reported by the GUI.
    [...]


    With the broken links (embedded pictures?), it is a very rough KB article.


    Basically what it is suggesting is that the equivalent of the GUI display (Uni/Navisphere -> right click SP -> Properties -> Statistics tab) is a calculation and average over a period of time (2 pit's averaged over 60 seconds) of both:

    busy and idle ticks

    To gather this information you issue the following commands for the specific SP you are interested in:

    naviseccli -h getcontrol -cbt
    naviseccli -h getcontrol -cbt

    For what it is worth, this is a subset of the informative command: getall command (specifically -sp)

    naviseccli -h getall -sp
    naviseccli -h getall -sp


    It suggests that the GUI polls the SP every 60 seconds and averages 2 pit's.  So if you want to accomplish the same via naviseccli, for example (SP A):

    1) Confirm Statistics Logging is enabled

    2) naviseccli -h getcontrol -cbt

    Controller busy ticks:       120
    Controller idle ticks:       725

    3) Calculate % utilization

    % utilization = busy ticks / total ticks
    (where total ticks = busy ticks + idle ticks)


    120 / (120 + 725) = 14.20% utilization

    NOTE: This would be the utilization since the last statistics reset or reboot (In Uni/Navisphere, right click SP -> Reset Statistics)

    3) Wait 60 seconds

    4)naviseccli -h getcontrol -cbt

    Controller busy ticks:       200
    Controller idle ticks:       735


    5) Calculate % utilization

    % utilization = busy ticks / total ticks
    (where total ticks = busy ticks + idle ticks)


    (200) / (200 + 735) = 21.39%

    NOTE: Again, this would be the utilization since the last statistics reset or of course reboot (In Uni/Navisphere, right click SP -> Reset Statistics)


    6) Average the two results from each

    (14.20 + 21.39) / 2 = 17.8% Utilization

    7) Repeat for SP B

  • AnkitMehta

    4 Apprentice

    •

    1365 Posts

    1165

    0

    Posted July 3rd, 2012 08:00

    Thanks again, Christopher I am aware of the primus just dint feel appropriate as it wasn't approved on a public forum. However, not to worry I have had a word with Rory and we will be working on getting the Primus fixed and see if we can get it approved but till then here is your missing information:

    We can figure out the delta (change) in busy/idle ticks and then work out a percentage as follows:

    formula delta.JPG

    Step 1:Run the getcontrol –cbt command and record the busy ticks (busy) and idle ticks (idle),

    Step 2: After 60s (as the GUI does) run the command again to capture busy1 and idle1.

    Input the values into the formula to determine the SP utilization. This will produce real up to date values which should be very close to those reported by the GUI.

    PS: Ignore my cursor after busy-->|

  • AnkitMehta

    4 Apprentice

    •

    1365 Posts

    1165

    0

    Posted July 3rd, 2012 09:00

    Voila!

    You're welcome!

  • christopher_ime

    6 Operator

    •

    1962 Posts

    1165

    0

    Posted July 3rd, 2012 09:00

    Doh... yeah I'm back to math 101.  We want the utilization between the 60 second period (and not the average since the last statistics reset) so yeah ignore my calculations and we need the deltas between pit's 1 and 2.  Then plug them into the formula.

    Makes more sense.  Thanks!

  • cxsundar

    7 Posts

    1165

    0

    Posted July 11th, 2012 04:00

    Ankit

    Can we do any math on calculation other storage parameters like Throughput/Bandwidth/ Respoance time etc..

    or any reference article would be greatly appreciated

    Sundar

  • dynamox

    11 Legend

    •

    20419 Posts

    •

    87439 Points

    1165

    1

    Posted July 14th, 2012 05:00

    those values will need to be retrieved using navi analyzer

  • AnkitMehta

    4 Apprentice

    •

    1365 Posts

    1165

    0

    Posted July 14th, 2012 15:00

    Already working on this to check if it can be derived by any mathematical formula.

    If I have anything will update it. (I have set weekly reminder for this post). If I were you I wouldn't keep my hopes up!

    Because, if it was meant to be then they would have shared the calculation!