Determine whether the host is virtual in the groovy script

Hello

I am writing a groovy script to extract data from our monitored SQL Server instances.  I would like to be able to differentiate between the n & b physical and virtual hosts.  I know that this should be possible since the database dashboard displays a different icon for both.  However, I can find what data item or property I'd look for his determination.

I use the following code:

dataSrv = server. DataService

querySvc = server. QueryService

topologyQuery = «!» DBSS_Instance ".

objects = querySvc.queryTopologyObjects (topologyQuery)

Need a way to determine whether each object is located on a physical or virtual host

//...........

Thank you.

Thank you.  That pointed me in the right direction.  For those looking for the code, I use:

...

topologyQuery = «!» DBSS_Instance ".

objects = querySvc.queryTopologyObjects (topologyQuery)

Objects.each {object->

instance_name = object.name

instance_host_name = object.real_mon_instance_name

VM = 'physical '.

vmQuery = «!» «VMWVirtualMachine where $host.name = ' "+ instance_host_name +»»»

VM = querySvc.queryTopologyObjects (, vmQuery)

If (vms.size () > 0) {}

VM = "VM".

}

...

Tags: Dell Tech

Similar Questions

  • EventID: 1206 Event Source: Active Directory Web Services ADWS failed to determine whether the computer is a global catalog server. What will be the solution for this.

    EventID: 1206 Event Source: Active Directory Web Services ADWS failed to determine whether the computer is a global catalog server. What will be the solution for this.

    Hi K jtm,.

    Your question of Windows 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/category/WindowsServer/

  • Determine whether the application is running

    Hello

    I'm developing an application that will provide a background thread that calls a UIApplication.

    Is there anyway that I can determine this background thread if the UIApplication is already running?

    I tried to use Application.isAlive or isForeground, but I don't have this UIApplication instance in the background thread.

    In short, can anyone suggest how to determine whether the application is running from outside the application? (excuse the sentence wrong-box )

    Thanks in advance

    Bell

    Why do you not use DURATION for this store. Take a look at this article from BB that does something similar.

    http://www.BlackBerry.com/knowledgecenterpublic/livelink.exe/fetch/2000/348583/800451/800783/How_To _...

    Kind regards

    yosoh

  • How to determine whether the current operating system is windows, or MAC?

    How to determine whether the current operating system is windows, or MAC?

    CSparrow wrote:

    operatingSystem var = $.getenv ("OS");

    operatingSystem = operatingSystem.toString ();

    alert (operatingSystem);

    It gives me Windows NT Windows 10

    With the help of:

    alert($.os);
    

    works for me.

    (result: Windows/64 10.0)

    and the Silly-V code

    Folder.FS

    gives you the name of the operating system

  • How to enable and disable, copy or rename the rules via the groovy script?

    A client, we received this question:

    How to enable and disable, copy or rename the rules via the groovy script?

    Foglight 5.7.5

    Hello

    There is this example of support KB

    support.Software.Dell.com/.../99059

    and there is also documentation of Service layer of the administration on the RuleService console.

    Best regards

    Golan

  • Determine whether the instance of the object is of a specific object class.

    I was not able to find the answer in the documentation or in the forum. My terminology is perhaps a bit off (Java and c# background back to PL/SQL programming).

    The general question is: given an object instance how to determine if the type of the instance is of the same kind as a specific object class.

    In particular, I do a unit test and examine the returned object instance. The effective yield is described as follows

    -This data structure contains a pointer to an LDAP session
    SESSION OF SUBTYPE IS RAW (32);

    I expect an instance of DBMS_LDAP. SESSION. To confirm this, I propose that the returned pointer DEREF and see if it's a type of DBMS_LDAP. SESSION. When this is confirmed, then I can further the return of reference.

    Draft code is

    BEGIN
    IF DEREF ({RETURN$}) some_operator_which_compares_object_types DBMS_LDAP. SESSION
    THEN
    RETURN TRUE;
    ON THE OTHER
    RETURN FALSE;
    END IF;
    END;

    where some_operator_which_compares_object_types is what I need to know.

    Thank you for your help. And of course, the other way to do business and/or links to the correct location in the documentation are appreciated.

    Kind regards
    Bill

    I think you are looking for [IS OF | http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/conditions014.htm] condition.

    SQL> create or replace type mytype as object(a number);
      2  /
    
    Tipo creato.
    
    SQL> declare
      2  x mytype := mytype(1);
      3  begin
      4  if x is of (mytype)  then
      5  dbms_output.put_line('OK');
      6  end if;
      7  end;
      8  /
    OK
    
    Procedura PL/SQL completata correttamente.
    

    Max
    [My Italian blog Oracle | http://oracleitalia.wordpress.com/2009/12/29/estrarre-i-dati-in-formato-xml-da-sql/]

  • Unable to upgrade Windows Vista to 7, error: implementation could not determine whether the BitLocker Drive encryption is in use.

    Original title: Upgrade Vista - 7 and issue of Bitlocker.

    I'm upgrading stops priocess Vista-32 to Windows 7 family 32-bit and upgrade when checking report of compatibility as a result of the error message following: "implementation could not determine if BitLocker Drive Encryption is in use.

    I have established that my Vista is not only encryption, so I can't turn it OFF... it's weird I had myself far enough in before upgrading... always new problems affecting it right back

    Hello

    I suggest you try the steps suggested by Andre Da Costa replied on March 27, 2010. From the following link:
    http://answers.Microsoft.com/en-us/Windows/Forum/Windows_7-windows_install/Setup-was-unable-to-determine-if-BitLocker-Drive/7be7ac98-5e73-49e5-9636-179cf7b11b23

    See also: What is the difference between disabling BitLocker Drive encryption and decrypt the volume?

    http://Windows.Microsoft.com/en-us/Windows-Vista/what-is-the-difference-between-disabling-BitLocker-Drive-encryption-and-decrypting-the-volume

  • Determine whether the application has permission to camera?

    I want to inform the user that the camera is not available until they turn on the camera permission.  However, the only permissions I don't see in the API is BBM and is not related.

    How do I know this?

    Have you tried to check the indicator of allCamerasAccessible: https://developer.blackberry.com/cascades/reference/bb__cascades__multimedia__camera.html#allcameras...

  • Create the Groovy Script Version

    One of our clients wants to use ODI Version as part of their publication process. This is not the version of case numbers generation but rather the ability to capture a snapshot of the mapping in the scenario

    This is not a problem of GUI - just as you must click on the browser and select versions-> create new version.

    I can't find a method of the Java API for this. Any ideas?

    My goal is to automate the generation of versions at release

    Sorry, but ODI does not provide APIs for version management.

  • Question about the location of a host of virtual machines

    I work on temporarily to change the behavior of the DRS for a particular VM (in VI Perl), but my question is more general research of the root 'to host' for a particular virtual machine.

    The installation of the infrastructure program:

    + Folder1

    - + Cluster1

    -


    + Esx1

    -


    + VMs

    -


    + Esx2

    -


    + VMs

    .. .etc

    There are several clusters on different servers in this configuration.

    In order to manage the DRS by VM, I find the cluster that hosts the virtual machine.  The $vm_view - & gt; parent returns one 'value' (other than the name of folder) folder.  It seems that the only way to match the virtual machine to the cluster of accommodation is to do a brute force search, open multiple views and retrieve the values of each until I have a match, and then looking through each cluster in the corresponding folder to find the one that contains the virtual machine.

    Am I wrong?  It is an ugly and ineffective way to find the host for a virtual machine.  If I am not mistaken, are there plans for the addition of the hierarchy of the path to the view of the VM?

    A $view - & gt; config - & gt; value of path containing something like: file - & gt; Cluster - & gt; ESX Server - & gt; VM would be useful.  In addition, a function which maps values of resources to names of resources would be very helpful (with a code depend on a 'value' of the 'field-c125"and any other code that depends on a 'name' of"Cluster1"creates a lot of extra work).

    Thank you

    -David

    You can determine the Cluster that host a virtual machine by browsing through the ResourcePool of the virtual machine. Owner of the ResourcePool is the ClusterComputeResource who manages the virtual machine.

    $vm_view-> resourcePool->owner

    Also, to get the HostSystem that contains the Virtual Machine, you can follow the path

    $vm_view-> run-> home

    Regarding your suggestion to have a predefined path to access a managed entities, we have after explanation.  There are different paths through which you can access to the different managed

    entities of your inventory according to its hierarchy. Virtual Infrastructure gives you the flexibility to design your inventory. You can add a folder or host or a Cluster directly to your data center.

    Then it still allows a folder to have three objects as its child entity. If the path for any entity depends on the structure of your inventory. If a path can be set.

    All managed objects are uniquely identified managed objects ID. Name can be dupilcate for few entities in a data center, you can have two Resourcepools with the same name in different groups. Similarly, you can even named so that each entity is mapped using an object ID, and not a property 'name '.

  • How to get the cpu host machine virtual mhz by PowerCLI

    How to get the cpu host machine virtual mhz by PowerCLI

    Thank you

    TEST.JPG

    The following command of PowerCLI will list the maximum cpu MHz for all of your virtual machines from the host:

    Get - VM | Select-Object - property Name,@{Name='MaxHostCpuMhz'; Expression = {$_.} NumCpu * $_. VMHost.CpuTotalMhz / $_. VMHost.NumCpu}}

  • Difference between the hosts and virtual machines

    Happy new year!

    I guess that's a stupid question, but I don't know the answer to it.

    I created pools from VM. Some jobs in the pool are hosts and some virtual machines. What is the difference between the hosts and virtual machines. I thought I could only create virtual machines, but I guess I could create hosts as well. -What happened?

    Thanks for your help.

    where does say desktops are hosts?  A host is usually referring to an ESXi server.  A virtual machine is just the guest OS running on the host computer.  A pool is a group of VMs that can extend over several hosts.

    Gunnar

  • Do not click on in the VM and can not move files between hosts and virtual

    Do not click on in the VM and can not move files between hosts and virtual

    Home - Windows XP x 64 Edition

    Virtual - Windows 2003 Web Edition

    -vmware.log

    ...

    sept 23 14:10:17.875: mks | Setting size 40 pile of thread to 1048576.
    sept 23 14:10:17.875: mks | Adjusting size of 41 of the stack of the thread to 1048576.
    sept 23 14:10:17.890: mks | USBGW: Writing referee op: 13 len:36
    sept 23 14:10:21.718: vcpu-0 | Unified TOOLS loop capacity requested by 'box to tools-MDN; now sending via the TECO
    sept 23 14:10:21.718: vcpu-0 | GuestRpc: Channel 7, toolbox-MDN app reviews.
    sept 23 14:10:21.718: vmx | DnDRegisterRpc: Rpc of DND already set to 1
    sept 23 14:10:21.718: vmx | CopyPasteRegisterRpc: already the value 1
    sept 23 14:10:21.890: vcpu-0 | VMXVmdb_LoadRawConfig: Loading of raw configuration
    sept 23 14:10:22.000: vmx | DnDRegisterRpc: Rpc of DND already set to 1
    sept 23 14:10:22.000: vmx | CopyPasteRegisterRpc: already the value 1
    sept 23 14:10:23.750: mks | USBGW: Writing referee op: 13 len:36
    sept 23 14:10:30.703: mks | Setting size 40 pile of thread to 1048576.
    sept 23 14:10:30.718: mks | Adjusting size of 41 of the stack of the thread to 1048576.

    ...

    Any ideas?

    Thank you

    If your license key allows, update your VMware Workstation version 7.1.4

    Otherwise, at least upgrade your VMware Workstation to version 7.0.1

    In the menu bar, help-> Check for Updates on the Web.

  • determine if the table is use rowid and urowid

    Database: Oracle Database 11 g Enterprise Edition Release 11.2.0.3.0 - 64 bit Production

    How can we determine whether a table is with rowid and urowid?

    Thank you.

    >
    How can we determine whether a table is with rowid and urowid?
    >
    Oracle uses a type of ROWID data for all tables; Physical ROWID logical ROWID for the tables organized by index and ordinary tables.

    You, the user can also use a ROWID data type and you can use a data UROWID type.

    Even if you do not use a real Oracle data type provides a virtual ROWID that you can query. The virtual only takes place in the table but is built on the fly if you use it in a query.
    ROWID values are actually stored in the index, but not stored in the tables unless the user sets a ROWID column.

    There is no virtual UROWID. If you try to add a query, you will get an exception

    select rowid, urowid, e.* from emp e
    
    ORA-00904: "UROWID": invalid identifier
    

    Refer to the 'presentation of ROWID and UROWID Datatypes' and "The virtual ROWID" in database Concepts
    http://docs.Oracle.com/CD/B28359_01/server.111/b28318/datatype.htm#i6732

    This article has a detailed explanation of the ROWID, UROWID. data types, the virtual and how Oracle uses.

  • the activation server determined that the specified product key cannot be used to 0xC004C008

    Hello

    I'm running a server KMS on Windows server 2012 R2 and I have enabled more than 300 PC and servers.

    But for some reason, can no longer trigger the new PCs and servers. They get 0xc004c008 the activation server determined that the specified product key cannot be used.

    Nothing has changed on the KMS server and I do not see where the KMS host key could be used outside of the host itself.

    All ideas

    Hello

    Post your question in the TechNet Server Forums, as your question kindly is beyond the scope of these Forums.

    http://social.technet.Microsoft.com/forums/WindowsServer/en-us/home?category=WindowsServer

    See you soon.

Maybe you are looking for

  • my iphone 6 drop in the toilet, what I'll do?

    Hello My phone down the toilet then I take it fast and its wet but still works and I have turn it off and put in uncooked rice to dry all night what should I do after? Please help me... Thank you and best regards, Wilma Agacita

  • LV2012 on a Mini PC - Possible?

    I'm trying to load and run an EXE developed on LV2012 on a kangaroo PC mini. I need an ultra-portable PC set on a cart mobile and powered by batteries. ( http://www.newegg.com/Product/Product.aspx?Item=N82E16883722001&nm_mc=AFC-C8Junction&cm_mmc=AFC-

  • Application appworld: change of screen capture...

    Demand will have to be retired after I add or change a screenshot? Thank you Stephen

  • I keep apps if I switch to Windows 8 to 8.1?

    Hi, I bought a new DVD of Windows 8.1, thinking I could get Windows 8 (since I already had a licence VL). But now I am unable to see the "Keep Apps" option during the installation (screenshot attached). Is there a way I can upgrade without having to

  • Re: Prelude. Show the pixels in the record window?

    Re: Prelude. It is possible to show ration a clip pixels in the registration window, alongside media Type, ingesting Date, etc. ?