Menu

WMICAT_NEW How to select single Object

Help
coffy
2007-05-07
2013-04-25
  • coffy

    coffy - 2007-05-07

    Hello out there,

    on a System with multiple Disks I try to get some performance informations for a special Disk:
    WMICAT_NEW "Diskinfo,Win32_PerfFormattedData_PerfDisk_LogicalDisk,IdleTime,PercentIdleTime"
    But I don't know how to get the data just from the object named "E" or "_Total"

     
    • tony

      tony - 2007-05-07

      for a single value, use the WMICAT, WMICOUNTER or WMIQUERY

      these commands support the 'where' clause for examlese see the readme.htm
      cimv2^SELECT Size,Name From win32_logicaldisk where name = 'c:'

      while WMICAT_NEW does all instances of the matching object.

      tony

       
    • coffy

      coffy - 2007-05-08

      Mhmm, I get an Error on trying your example:

      WMICHECK    test3    -l    cimv2^size,name^win32_logicaldisk^name= 'c:'

      :ERROR: Cannot Process use * for root namespace list.:

       
      • tony

        tony - 2007-05-08

        I think the problem may be in the Tabs,
        the command you specified is in the Sample Passive.cfg and I have tested it in the past and it has worked.
        If the syntex is recieved wrong by the check it then responds with that error.

        so go to your passive.cfg and verify that between each part is a single TAB and no spaces.
        WMICHECK[TAB]test3[TAB]-l[TAB]cimv2^size,name^win32_logicaldisk^name='c'
        this can also be rewriten:
        WMICHECK[TAB]test3[TAB]-l[TAB]cimv2^Select size,name from win32_logicaldisk where name='c'

        If you try this from the Test Console use the following syntex:
        12&cimv2&select size,name from win32_logicaldisk where name= 'c:'
        or
        12&cimv2&size,name&win32_logicaldisk&name= 'c:'

        If the problem persists, contact me via Email nc_net@montitech.com with your cfg file as an attachment.  but the problem is most likely a space instead of a tab.

        I had an issue at one point where my text editor inserted spaces instead of tabs, this corrupted some of the samples in the cfg files and some of these may have persisted into the current version. but I do not think this is the case with this issue. 

        Tony

         

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.