8 Replies Latest reply on Apr 29, 2019 8:20 AM by Dima Seliverstov

    Web Investigate command line

    Darryl Day
      Share This:

      I've tried using the webInvestigate and GeneralManagerClient for "Cpu Statistics" it returns nothing unless I specify a processor id:

       

      -p 'CPI ID' -q 'Equal To' -r 1    where 1 is the CPU ID - I would need to do it for all CPU ID's

       

      I have tried other filters e.g. -p "CPI ID" -q "Greater than -r 0

      and trued where cpu util > 0

       

      but cannot get it to return data - any suggestions ?

       

      Thanks 

        • 1. Re: Web Investigate command line
          Dima Seliverstov

          It depends if you are doing a chart or a drill down via webInvestigate

          Drill down - single time view (many different records for a single time)

                 Example: Many processes, CPU's, Disks

          Chart - many time views BUT the record MUST be unique

                  Example: A single process (defined by unique MrID fields of Start Time and PID, visible in mt files), A single CPU defined by CPU ID

                   (In your case   "CPU ID"            UDFIdUInt      0        4                  [MrID|MrRpt] )

           

          How do you do a drill down in webInvestigate?

          webInvestigate ... -b <beginTime>

          Date for a single time

          webInvestigate -b <beginTime> -e <endTime> -i <interval>

            A series of drill down, starting in begin time, and continuing in increments of interval until you reach the endTime

           

          How do you do a chart in webInvestigate?

          webInvestigate ... -b <beginTime> -e < endTime> + (-p -q -r to specify a uniq data constraints like you specified -p 'CPU ID' -q 'Equal To' -r 1 )

          This will give you a single data record across time.

          (For multiple records, you would need to do a drill down, identify unique records, and chart. This is what the GUI does).

          1 of 1 people found this helpful
          • 2. Re: Web Investigate command line
            Darryl Day

            hmm as I suspected -thanks for the prompt reply.

             

            So I'll need to get the config info then loop for each MrId.

             

            I assume it is the same for GeneralManagerClient

             

            Thanks

            • 3. Re: Web Investigate command line
              Dima Seliverstov

              Yes, GeneralManagerClient works the same way.

               

              The way it can be done for real time, is call webInvestigate without any time (no -b -e or -i)

              You will get the latest snapshot from the agent.

               

              Using the data returned, you can loop webInvestigate for each entity in the time range desired.

              • 4. Re: Web Investigate command line
                Darryl Day

                Thanks - that is my plan.

                 

                 

                When not specifying  - b  I get

                BeginTime,EndTime,Time,CPU ID,CPU User Time,CPU System Time,

                time_t,time_t,,Raw,% Time,% Time,

                sec,sec,Units,,%,%,

                1556541084,0,"Mon Apr 29 08:31:24 2019","0","0.10","0",

                1556541084,0,"Mon Apr 29 08:31:24 2019","1","0.10","0",

                1556541084,0,"Mon Apr 29 08:31:24 2019","2","0.10","0",

                 

                with a -b and -p,-r

                BeginTime,EndTime,CPU ID,CPU User Time,CPU System Time,

                time_t,time_t,Raw,% Time,% Time,

                sec,sec,,%,%,

                1556540844,1556540844,"1.000000","0.000000","0.000000",

                1556540854,1556540854,"1.000000","0.000000","0.100000",

                 

                so we get the "time" in the drilldown but not chart - not an issue as we have the BeginTime,and EndTime.

                 

                However... in the first one the Time seems to be the servertime.

                 

                In the second one we just have the epoch time -  how can I determine the server time value? Or can it be added to the output of  the second commnad (-r, -p etc.)

                 

                I tried

                getAgentHistoryMetricGroupDataString   -A localhost -M "Cpu Statistics" -n "CPU ID,Time,CPU User Time,CPU System Time" -p "CPU ID" -q "Equal To" -r 1 -b 1556540854-3600 -e 1556540854

                 

                but no luck

                 

                Thanks 

                • 5. Re: Web Investigate command line
                  Dima Seliverstov

                  Chart and Drill down outputs are different.

                  Chart is compact and does not have the actual time stamp, only epoch time.

                   

                  If you need the time at the agent time itself, you would need to do a drill down to get the string representation.

                  We work with epoch time in the code since it can be converted to any application server time for consistency.

                   

                  Re: What happens when -b is not specified.

                  You get the latest time point that the agent has, with both epoch time and time string.

                   

                  Re: getAgentHistoryMetricGroupDataString   -A localhost -M "Cpu Statistics" -n "CPU ID,Time,CPU User Time,CPU System Time" -p "CPU ID" -q "Equal To" -r 1 -b 1556540854-3600 -e 1556540854

                   

                  The command should have -i parameter if you want a series for drill downs every 3600 seconds.

                  getAgentHistoryMetricGroupDataString   -A localhost -M "Cpu Statistics" -n "CPU ID,Time,CPU User Time,CPU System Time" -p "CPU ID" -q "Equal To" -r 1 -b 1556540854 -i 3600 -e 1556540854

                  • 6. Re: Web Investigate command line
                    Dima Seliverstov

                    One more item about the last command.

                    Re: getAgentHistoryMetricGroupDataString   -A localhost -M "Cpu Statistics" -n "CPU ID,Time,CPU User Time,CPU System Time" -p "CPU ID" -q "Equal To" -r 1 -b 1556540854 -i 3600 -e 1556540854

                     

                    The begin (-b) and end (-e) time need to specify a range of time that you are interested in. In the case of the example, they are the same, and therefore the interval (-i) is not used.

                     

                    The result is the command is that you will start at the begin time, and iterate via the specified interval, until the end time is reached.

                    The series will be drill downs at the specified interval.

                     

                     

                    • 7. Re: Web Investigate command line
                      Darryl Day

                      Hi the -3600 was just to get a range for the epoch time

                       

                       

                      getAgentHistoryMetricGroupDataString   -A localhost -M "Cpu Statistics" -n "CPU ID,Time,CPU User Time,CPU System Time" -p "CPU ID" -q "Equal To" -r 1 -b 1556540854 -i 3600 -e 1556540854

                       

                      the begin and end time are the same in the above - surely that won;t work?

                       

                      "If you need the time at the agent time itself, you would need to do a drill down to get the string representation."

                       

                      Where can I find it ?  and/or better still the Timezone info ?

                      • 8. Re: Web Investigate command line
                        Dima Seliverstov

                        The agent timezone is a metric on UNIX in the System Configuration metric group (Time Zone) and NT System Configuration on Windows (Time Zone).

                        1 of 1 people found this helpful