the host performance, no update values not returned to the orchestrator script...

Hope someone can tell what I'm doing wrong.

I'm still on 5.5 and trying to get the load data for ESXi hosts (via connected to the orchestrator Server vcenter) to decide on which host is the best target for vmotion-action.

As I could not find any workflow builtin or efforts to get data to load, I tried to dig myself via a script.

  • find all hosts
  • for each reading of the host.summary.quickStats.overallCpuUsage host

I have values, but they are static and do not get updated.

If I use perl-sdk and perform the same actions to vcenter I get updated for each esxi host values.

Browse objects via the web on the server vcenter watch also updated these values.

If only my orchestrator workflow seems to be wrong.

I do not suspect that the workflow in orchestrator performs a query only the inventory and not the living objects. It is much faster than doing the same thing with perl-sdk.

My little script (which could be run in a single Scriptable task with no impression one journal entry/exit). Problem can be seen by newspaper printing. Total used MHz does not change in my environment.

--------------------------------CUT

var host = System.getModule("com.vmware.library.vc.host").getAllHostSystems ();

var tothz = 0;

for {(i in hosts)

var cpu_used =. summary.quickStats.overallCpuUsage of hosts [i];

tothz = tothz + cpu_used;

}


System.log ("tothz:"+ tothz ");

--------------------------------CUT

Q1: I am doing something stupid in my script?

Q2: I have to do some extra steps to get the updated values?

Q3: Is there a better way to find/load-performance data for ESXi hosts?

Stupid enough to write the sollution myself

It is possible to force an update of the inventory values for objects that are important to your script/workflow.

It can be done by the following function in a script.

VcPlugin.refreshObjects (object-to-update - in - stock)

So for my specific problem, I could solve it with a single additional line.

--------------------------------CUT

var host = System.getModule("com.vmware.library.vc.host").getAllHostSystems ();

var tothz = 0;

for {(i in hosts)

VcPlugin.refreshObjects (the hosts [i]) / *.< my="" new="" line="">

var cpu_used =. summary.quickStats.overallCpuUsage of hosts [i];

tothz = tothz + cpu_used;

}

System.log ("tothz:"+ tothz ");

--------------------------------CUT

This seems to force an update of the inventory values before I use them.

It will certainly slow down my script a little, but it's part of the game.

Tags: VMware

Similar Questions

  • CAN SOMEONE EXPLAIN PLEASE (IN EASY TERMS) WHY MY DESKTOP ICONS BECAME INVISIBLE AFTER WINDOWS AUTOMATIC UPDATES & WILL NOT RETURN OR RESTORE?

    I tried several times now to be able to find the shortcut icons on the desktop, I had before my last batch of automatic updates. I also tried since to add new... but it's like there's an invisible on shield! Looks like they are copying as they would normally, and yet they are still not appear on my desktop... I searched many boards of friends now also with no luck... surely, someone here must know why it happened? I'm goin' out of my mind... try it please help!

    Hello

    Right click on the desktop to get a menu, click on view/show desktop icons. Good luck, Rick Rogers, aka "Crazy" - Microsoft MVP http://mvp.support.microsoft.com Windows help - www.rickrogers.org

  • When I reboot after installation of service pack 2, the message comes out and says that updates are not configured correctly, returning from changes

    When I reboot after installation of service pack 2 on a computer laptop with Windows Vista Home Premium 32-bit Dell XPS M1530, the message comes out and says that updates are not configured correctly, returning from changes. Do not turn off your computer. I installed update readiness tool, but it does still every time. I tried to disable the antivirus software prior to installation.

    Hello
     
     
     
    1. how you try to install Service Pack 2?
    2. are you able to boot to the desktop?
     
     
    Method:
    Step 1: If you are able to start the computer in normal mode, then try a clean boot.

    To help resolve the error and other messages, you can start Windows Vista or Windows 7 by using a minimal set of drivers and startup programs. This type of boot is known as a "clean boot". A clean boot helps eliminate software conflicts.

    How to troubleshoot a problem by performing a clean boot in Windows Vista or in Windows 7

    http://support.Microsoft.com/kb/929135
    Please note: after troubleshooting, start the computer in normal mode.

     
    Step 2: Try to install Service Pack 2 manually.
     
    How to obtain the latest Windows Vista service pack

     
     
    If you are unable to start the computer, then you can follow this link to start the computer in safe mode.
    Start your computer in safe mode
    http://Windows.Microsoft.com/en-us/Windows-Vista/start-your-computer-in-safe-mode
     
     
     
     
    If you are unable to install Service pack 2, you can consult this article.
    Error: Failed to setup of the Windows updates. Restoration of the changes. Do not turn off your computer when you try to install Windows updates
    http://support.Microsoft.com/kb/949358
    Please note: method 2 refers about upgrade on site.  Perform a repair installation/place will not damage files and applications that are currently installed on your computer.   However, I suggest you to back up all important data on the computer before you perform the upgrade on the spot.
     
     
     
     
     
     
     
  • Not able to install updates to get the message: 'updates were not able to configure correctly, returning from changes'...

    Original title: I have Vista with Service Pack 2, but were unable to come down and configure updates since 07/12/11. Need help, thank you.

    Do not get the error codes. Just when I reboot, I get the message "updates were not able to configure correctly, returning from the changes".

    Hello

     
    You are able to start in safe mode, then you can perform the clean boot in safe mode and then try to boot into normal mode.
    Put your boot system helps determine if third-party applications or startup items are causing the problem.
     
    See the following article in the Microsoft KB for more information on how to solve a problem by performing a clean boot in Windows Vista or Windows 7:
    How to troubleshoot a problem by performing a clean boot in Windows Vista or in Windows 7
    http://support.Microsoft.com/kb/929135
    Note: After troubleshooting, be sure to set the computer to start as usual as mentioned in step 7 in the above article.
    If you are able to boot to the desktop after you perform a clean boot Windows check updates history of inforamtion on the updates failed.
    Reference:
     
     
     
     
  • Subvi value not updated when it is connected to the connector pane

    I have a legacy program that computes a frequency when a value changes of sensor (falling edge essentially), and I'm trying to convert the logic to a Subvi, so I can use it for 44 other sensors. The program first used a large number of property value node, I discovered is not good for subVis. I converted them to local variables, but I still have questions.

    As soon as I connect something to the output pane that closes the update value question. If I remove the connection in the connector pane, it works fine.

    a picture of the block diagram is attached. I tried to connect Freq and frequency of output to the connector pane, as soon as I connect it to the component connector to work properly to date do not at all.

    The VI is configured as non-reentrant.

    Thank you


  • I am running Windows 7 and noticed that Windows updates did not work. The parameters are defined for the update every day. When I went to update manually returned an error WindowsUpdate_80070017. MSFT site was no help. Any recommendations?

    I am running Windows 7 and noticed that Windows updates did not work. The parameters are defined for the update every day. When I went to update manually returned an error WindowsUpdate_80070017.  MSFT site was no help. Any recommendations?

    Since neither updates Jan - 10 have installed, I'm going to hand you Support MS in the hope that they can resolve the problem. See below.

    That being said, is an interpretation of the 80070017 - cyclic redundancy check error "a device attached to the system does not work," which suggests that a hardware problem might be the cause of the error (although I must say that it is a very low possibility in this case).

    Good luck!

    =======================

    Visit the Microsoft Solution Center and antivirus security for resources and tools to keep your PC safe and healthy. If you have problems with the installation of the update itself, visit the Microsoft Update Support for resources and tools to keep your PC updated with the latest updates.

    ~ Robear Dyer (PA Bear) ~ MS MVP (that is to say, mail, security, Windows & Update Services) since 2002 ~ WARNING: MS MVPs represent or work for Microsoft

  • Cannot install windows update, error: updates have not been configured correctly. The system then returns

    Original title: Windows updates fail to configure.

    I wonder to install Windows updates. I do and I am told they have installed.  When I have to restart my computer, I get a message that the updates have not been configured correctly. The system then returns. Next time I turn on the computer I get a message saying that updates have not been successful.  This has happened for months. I think that my computer is very slow because of it. I also think that my computer is a little short on memory. It is an Inspiron 530 with 1 GB memory

    Hello

    I suggest you try the steps from the link below and check if it helps.

    Error: Failed to setup of the Windows updates. Restoration of the changes. Do not turn off your computer when you try to install Windows updates: http://support.microsoft.com/kb/949358

    I hope this information is useful.

  • Windows Update Standalone Installer returns "the update does not apply to your system" Installer MSI 4.5 [KB942288]

    MSI 4.5 is required to install some software on the sub system, Setup MSI 4.5 returns "the update does not apply to your system.

    Windows Server 2008 SP2 64-bit Standard

    sfc/scannow does return no problem

    CBS. JOURNAL

    2011-11-10 09:19:30, v6.0.6002.18005 Info CBS responsible Servicing Stack with Core: C:\Windows\winsxs\amd64_microsoft-windows-servicingstack_31bf3856ad364e35_6.0.6002.18005_none_676975d87cc9b6e6\cbscore.dll
    2011-11-10 09:19:30, called CSI Info 00000001@2011/11/9:22:49:30.113 WcpInitialize (wcp.dll version 0.0.0.5) (battery @0x7feef748c85 @0x7fef2ef53ae @0x7fef2ec3ed1 @0xffb649a8 @0xffb630c9 @0xffb63578)
    2011-11-10 09:19:30, CBS News could not load SrClient DLL path: C:\windows\system32\srclient.dll.  Continue without the system restore points.
    2011-11-10 09:19:30, called CSI Info 00000002@2011/11/9:22:49:30.116 WcpInitialize (wcp.dll version 0.0.0.5) (battery @0x7feef748c85 @0x7fef2f386cf @0x7fef2f125d9 @0x7fef2ec3feb @0xffb649a8 @0xffb630c9)
    2011-11-10 09:19:30, called CSI Info 00000003@2011/11/9:22:49:30.117 WcpInitialize (wcp.dll version 0.0.0.5) (battery @0x7feef748c85 @0x7fef74f838d @0x7fef74f84ba @0xffb64207 @0xffb63125 @0xffb63578)
    2011-11-10 09:19:30, CBS NonStart info: check to ensure the treatment of start-up was not necessary.
    2011-11-10 09:19:30, info CSI 00000004 IAdvancedInstallerAwareStore_ResolvePendingTransactions (call 1) (flags = 00000004, progress = NULL, phase = 0, pdwDisposition = @0x12df8d0)
    2011-11-10 09:19:30, CBS NonStart info: success, start, treatment not required, as expected.
    2011-11-10 09:19:30, info CSI CSI 809616 (0x00000000000c5a90) store initialized 00000005
    2011-11-10 09:19:30, CBS briefing: initialized 30187313:3612201472.
    2011-11-10 09:19:30, CBS information session: 30187313:3612201472 finalized.  Reboot required: no
    2011-11-10 09:21:33, CBS Session info: initialized 30187314:546129020.
    2011-11-10 09:21:33, CBS Session info: 30187314:546129020 finalized.  Reboot required: no
    2011-11-10 09:23:35, CBS Session info: initialized 30187314:1775756314.
    2011-11-10 09:23:35, CBS Session info: 30187314:1775756314 finalized.  Reboot required: no
    2011-11-10 09:25:38, CBS Session info: initialized 30187314:3005403140.
    2011-11-10 09:25:38, CBS Session info: 30187314:3005403140 finalized.  Reboot required: no
    2011-11-10 09:27:37, CBS Session info: initialized 30187314:4186893820.
    2011-11-10 09:27:37, CBS Session info: 30187314:4186893820 finalized.  Reboot required: no
    2011-11-10 09:27:43, CBS Session info: initialized 30187314:4247657872.
    2011-11-10 09:27:43, CBS Session info: 30187314:4247657872 finalized.  Reboot required: no
    2011-11-10 09:29:30, CBS info trap: package store indicates there is no element to clean, to jump.

    Advice please.

    Hello

    Your question is more complex than what is generally answered in the Microsoft Answers forums. It is better suited for the IT Pro TechNet public. Please post your question in the Technet Forum. You can follow the link to your question:

    http://social.technet.Microsoft.com/forums/en-us/category/w7itpro

    Hope that helps.

  • Microsoft Management Console error: this function is not supported on this system. Also noticed that the automatic updates did not install it and returned error 80070005.

    Original title: Microsoft Management Console this feature only is not supported on this system

    I am running Vista 32 bit Business since an administrator account.

    Recently, I noticed that the automatic updates did not install it and returned error 80070005.   After investigation, I found that I could not open mmc at all and always get the message "this function no is not supported on this system.  No major changes have been made to the configuration to trigger it and I can't watch the event log because it is in the MMC.
    I have studied this question in line and tool the following actions, which none worked:
    carried out a complete antivirus scan (I use Commodo internet security)
    created another account administrator
    has run SFC (no problem)
    has run the registry cleaner (no problem)
    has run msconfig.exe and disabled all the startup process
    updated windows right click and run as administrator
    Started in safe mode and tried all above
    After that, I don't know where to go... it doesn't seem to be a download for Windows vista to reinstall mmc.
    I have about 50 updates critical, sitting in my windows update that can not install because of this problem.  Can anyone help?
    Jeff

    Hello Helpmehelpme,

    First, I would check since it is professional Vista was that computer on a field of work or it was already on an area of work? There may be group policies that are in place that prevent to run MMC.

    When did start to happening? Is there anything new on the system which has been introduced into the environment (software, hardware)?

    This thread gives a few steps trying to the original poster that you can't have.

  • Updates will not download on the FTP host

    Hello

    I already have a Web site online and I just want to add some updates, but whenever I go to upload to the ftp host, he goes through the process of downloading everything (the box with the blue bar), but when charges website after the download is complete, my updates are not - the site is exactly as it has already been , without the new information.

    What I'm doing wrong and what should I do to get new information to download?

    The domain is hosted by godaddy.com, if that helps.

    Thank you in advance for your help!

    This indicates generally the upload is in the wrong location on the server or files have been modified using an external tool and now built-in FTP download is used and is unaware of these changes.

    You use the built-in file > upload to the FTP host... within the Muse? If so, and if you use one of the more common low cost plans GoDaddy, then the directory 'host' should be 'public_html', if it is not, then the files will be uploaded in the wrong place on the server.

    If you've used one tool other than the built-in download functionality to change what are the files on the server and you are now trying to use the upload integrated, you must set "Upload: all files" in order for Muse to download all your site. After that was done, Muse will come back on only the modified files downloaded.

  • Failed to install KB2898785. Error, "updates were not correctly configured. Returning from the changes.

    32-bit o/s. Vista Home Premium. All scans/checks indicate no problems

    "Updates were not correctly configured. Restoration of the changes. ....." Advice please?

    M/S Rep told me that the (free) support for Vista is no longer available. Could the problem of security identified in the software of M/S already affected my system (published 12/10/2013 refers)?

    Hello

    I wish that refer you to this article-

    https://support.Microsoft.com/kb/949358/en-us

    Note: Make sure that you get the computer back to the Normal start once you have completed the troubleshooting steps.

    Make sure that you back up the data on the computer before you continue.

    Thank you.

  • The Windows Update stand-alone Installer returns an error: "update does not apply to your system.

    Preparation of my laptop running windows Vista Business SP2 to upgrade to Windows 7; Downloaded Windows Easy Transfer for Windows Vista to Win 7 32 bit format. run the download and the "Windows Update Standalone Installer" then begins poster "the update does not apply to your system"

    Have you tried several downloads, including the 64-bit version (I checked that my system is actually 32-bit); logged on as Admin; tried to change the security settings for file - no change in this inability to install.

    Ideas?

    http://www.Microsoft.com/downloads/details.aspx?FamilyId=1B544E90-7659-4BD9-9E51-2497C146AF15&displaylang=en

    Download and run the Windows 7 Upgrade Advisor to see if your PC is ready for Windows 7. It scans your hardware, devices, programs for known compatibility issues installed, you gives advice on how to fix any problems found and recommends what to do before upgrade you.

    See you soon.

    Mick Murphy - Microsoft partner

  • Checking the status did not return ACS version after update 4.0 to 6.0

    We are in the (stable) the ACS of 4.0 to 6.0 upgrade process.  The only problem that we see, is that after the upgrade, check the State does not return a version.

    We use the check.js provided by Adobe, but get to the result of the call.

    .. / Status? check = version

    The appeal has changed, or are we missing a configuration somewhere property?

    I guess nobody don't Adobe never look at this forum...

  • Guest user does not return a value

    I have a user prompt dialog box which is a slightly modified version of questioning the standard user to enter VI express. I tried to change the VI so that it would allow the user to close the command prompt by pressing the enter/return key. The final objective is to have the popup dialog, the user will scan a bar code and barcode reader adds a carriage return, automatic closing of the dialog box character.

    I have followed this user lyrics: https://decibel.ni.com/content/docs/DOC-13973. The only difference between my code and the code it is that my user dialog box returns a string instead of a number. See below for my code.

    The problem that I am running is the string "Item number2" never really returns any value once it's called. The indicator on the front panel of the updated the express vi displays the correct value after you run, but the value is never returned to the VI, who called the dialog box. The express vi the value default value is successfully returned. The only change I made was the addition of the structure of the event, so I have to assume that my code does not go inside this node.

    Any thoughts are appreciated.

    Adjust the chain drive on 'Update value then of the hit'.

  • Windows Vista: updates are not configured correctly, returning from changes

    my computer may not be updated, whenever I turn on or restart my computer, the message "Configuring updates stage 3 of 3 0% Please wait, don't turn off your computer" comes but after awhile, it says 'updates are not configured correctly, returning from changes' it keeps past, I did everything I could , but nothing happened. What should I do?

    So far there are problems or there are many who have this problem?

    Have you tried to disable temporarily running anti-virus software?

    How to troubleshoot a problem by performing a clean boot in Windows Vista or in Windows 7
    http://support.Microsoft.com/default.aspx/KB/929135

    950093 how to use the System Configuration utility to resolve configuration errors in Windows Vista
    http://support.Microsoft.com/default.aspx?scid=KB; EN-US; 950093

    How to reset the Windows Update components?
    http://support.Microsoft.com/kb/971058/#appliesTo

    Troubleshooting in Win 7 vs KB971058 for Vista
    http://social.technet.Microsoft.com/forums/en/w7itproappcompat/thread/e1f0a807-E132-4FDC-ABF8-5bad87b64204

    The system update tool

    Description of the preparation tool system update for Windows Vista for Windows Server 2008, for Windows 7 and for Windows Server 2008 R2
    http://support.Microsoft.com/kb/947821

Maybe you are looking for