4 Replies Latest reply on Mar 15, 2016 11:09 AM by TimR26

    Trying to monitor Linux OS process / Error: Object is not available

    TimR26 Novice

      I'm running vROPs 6.2, and installed the epops agent on a RHEL 6.4 server. This box is running vCD. I want to use vROPS to monitor the processes for vCD. I created the following object:

       

      Name: vCD Watchdog

      Adapter Type: EP Ops Adapter

      Object Type: MultiProcess

      Process.query: State.Name.eq=VMware-vcd-watchdog

      Collection Interval: 5 mins

       

      After the first collection interval, I receive the error "Object is not available" I cannot seem to find any other info about the error. I thought it might be something to do with the process.query so I checked the vROPs documentation and only found this:

       

      Manually Create Operating System Objects

       

      They talk about how to submit the query and provide an example. Searching google I can't find a list of classes or attributes that are acceptable other than the two I know of: State.Name.eq and Pid.PidFile.eq.

       

      I'm looking for some guidance on this. Can anyone help?

        • 1. Re: Trying to monitor Linux OS process / Error: Object is not available
          Enthusiast

          Hi,

          I can't test it end-to-end, because I have no vCD with agent. But looking from the process list (ps auxwww)

           

          root 8868  0.0  0.0 11392  1168 ?        S Jan20   1:31 /bin/bash /opt/vmware/vcloud-director/bin/vmware-vcd-watchdog

           

          So the process name is actually not State.Name.eq=VMware-vcd-watchdog - this will not work. If you want to figure the exact process name with Args you will need to query the process and the args. Documentation is here: PTQL - Sigar - Hyperic Support

           

          I used a while ago, but roughly the approach looks like this:

          1) Find sigar on your machine (part of the agent) in my case it was located at:  /opt/vmware/epops-agent/bundles/agent-x86-64-linux-6.1.0/pdk/lib/

          2) Start sigar: java -jar sigar-1.6.6.13.jar

          3) Query the processes:

          sigar> ps "State.Name.eq=java"

          1607 root 13:31 6.3G 112M 11M S 0:10 java:com.graphhopper.http.GHServer

          1811 root 13:31 3.6G 216M 16M S 0:43 java

          (-> in your case I would try   ps "State.Name.eq=bash")

           

          4) Query pargs: (use your bash process number)

          sigar> pargs 1607

          pid=1607

          exe=/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.79.x86_64/jre/bin/java (deleted)

          cwd=/

          0=>java<=

          1=>-jar<=

          2=>/opt/Graphhopper/graphhopper-0.5/graphhopper-web-0.5.0-with-dep.jar<=

          3=>jetty.resourcebase=webapp<=

          4=>jetty.port=8989<=

          5=>config=/opt/Graphhopper/graphhopper-0.5/config-routexl.uk.properties<=

          6=>osmreader.osm=/opt/OpenStreetMaps/current_map.osm.pbf<=

           

          5) Create a process query from the results:

          For Example:

          State.Name.eq=java,Args.4.eq=jetty.port=8989

           

          Hope it helps!

          • 2. Re: Trying to monitor Linux OS process / Error: Object is not available
            TimR26 Novice

            Hello,

             

            thank you for your reply.

             

            so I took your advice and did the following:

             

            1. ps ax

             

            2195 ? S 1:26 /bin/bash /opt/VMware/vcloud-director/bin/VMware-vcd-watchdog

            26566 pts/0 Ss 0:00 -bash

             

            2. Query the process:

            sigar> ps "State.Name.eq=bash"

            26566 root 07:22 106M 1.9M 1.4M S 0:0 -bash

             

            3. pargs 26566

            pid=26566

            exe=/bin/bash

            cwd=/root/epops-agent-6.2.0/bundles/agent-x86-64-Linux-6.2.0/pdk/lib

             

            This doesn't seem right, its pointing to the EPO Agent. Lets run pargs on 2195

             

            4. pargs 2195

            pid=2195

            exe=/bin/bash

            cwd=/

                0=>/bin/bash<=

                1=>/opt/VMware/vcloud-director/bin/VMware-vcd-watchdog<=

             

            5. I also ran a ps "State.Ppid.eq=2195"

            2200 root Feb25 106M 2.0M 1.2M S 0:46 /bin/bash

             

            6. And a ps "State.Ppid.eq=26566"

            649 root 08:04 3.1G 37M 9.8M S 0:3 java:org.hyperic.sigar.cmd.Runner

             

            Now I'm confused. PID 26566 seems to be for the hyperic agent. 2195 seems to be the vcd-watchdog process.

            • 3. Re: Trying to monitor Linux OS process / Error: Object is not available
              Enthusiast

              Not sure if I understand your question now, but for me it looks promising now:

              4. pargs 2195

              pid=2195

              exe=/bin/bash

              cwd=/

                  0=>/bin/bash<=

                  1=>/opt/VMware/vcloud-director/bin/VMware-vcd-watchdog<=

               

              This is your process, so you may try something like:

              State.Name.eq=bash,Args.1.eq=/opt/VMware/vcloud-director/bin/VMware-vcd-watchdog 


              (please post if you figure out correct syntax..)

              • 4. Re: Trying to monitor Linux OS process / Error: Object is not available
                TimR26 Novice

                Ok well I did what you suggested and it did not work. I was able to validate this by running the following command in sigar:

                 

                ps "State.Name.eq=bash,Args.1.eq=/opt/VMware/vcloud-director/bin/VMware-vcd-watchdog"

                 

                it returned with nothing.

                 

                It got me thinking so I reviewed the commands available in sigar using the website you provided (PTQL - Sigar - Hyperic Support)

                 

                I notice there was a command "pinfo - Other Process Info"

                 

                So I ran it against the pid:

                 

                pinfo 2195

                 

                pid=2195

                state={Name=VMware-vcd-watc, Threads=1, Tty=0,.........

                 

                so I re-ran ps "State.Name.eq=VMware-vcd-watc"

                 

                2195 root Feb25 107M 2.2M 1.2M S 1:28 /bin/bash

                 

                So I fed this into the process.query, waited 5 mins and it came up!

                 

                So thank you for your help!!!