Ad Widget

Collapse

Monitor Application Memory

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • limbooface
    Member
    • Jun 2016
    • 77

    #1

    Monitor Application Memory

    How do I monitor application memory?

    I have got Total, Used, Available,Cached memory working when item created but with Application memory I use vm.memory.size[Exec] and create graph but I get nothing. This is most probably because its used for .exe application and in linux there is no .exe applications. Is there away to get this to work out application memory for linux?
  • Prachhie
    Junior Member
    • Jul 2016
    • 4

    #2
    If it's a java application, you'll have to set up jmx monitoring.

    Comment

    • GPegel
      Senior Member
      Zabbix Certified SpecialistZabbix Certified Professional
      • Dec 2015
      • 113

      #3
      JMX is one option... I'm using a script to get data from some Java applications. I will try to post it tonight or tomorrow.

      Comment

      • valegator
        Junior Member
        • Jul 2016
        • 18

        #4
        Process memory

        You can monitor the memory usage for all processes summarized with:
        proc.mem[all,all].
        If you want to specify the type of memory used, refer to the "memtype" parameter in proc.mem item.
        Item documentation:
        https://www.zabbix.com/documentation...rted_item_keys --> search for "proc.mem".
        Memtypes:


        Note: You can monitor a single process memory or multiple processes memory by providing regex parameter to item proc.mem.

        Comment

        • limbooface
          Member
          • Jun 2016
          • 77

          #5
          So its not a java application.

          I want to monitor memory on a windows workstation for 2 applications so when those 2 applications are running memory for those applications automatically get monitored and when they are not they do not show up on the graph. If i monitor the pid this will not help as the pid for those applications will change every time the application is launched.

          Any good ideas?

          Comment

          • valegator
            Junior Member
            • Jul 2016
            • 18

            #6
            Performance counter

            In that case you can use Windows Performance Counters, let's say you want to monitor Print spooler process (spoolsv) memory usage:

            1. Go to the target host and execute
            Code:
            typeperf -qx > C:\perfoutput.txt
            in CMD as Administrator. This will give you a list of available performance counters.
            2. Open the perfoutput.txt and search for lines beginning with \Process (you maybe have to sort the lines).
            3. Select the performance counter you want, in that case "\Process(spoolsv)\Working Set - Private".
            4. Create a Zabbix performance counter item:
            Code:
            perf_counter["\Process(spoolsv)\Working Set - Private"]
            This will return the memory usage of this process.

            and when they are not they do not show up on the graph.
            As long as the processes are not running, the items will be "ZBX_NOTSUPPORTED: Cannot obtain performance information from collector.". As soon as they run, the items get supported and return values for graphs.

            Comment

            • limbooface
              Member
              • Jun 2016
              • 77

              #7
              Thanks for this I will test it out.

              When I create a item what is Type I select is it 'Zabbix Agent'?

              Also in order to get perf_counter for the given application should I have the application running before I run typeperf -qx > C:\perfoutput.txt?

              Thanks

              Comment

              • limbooface
                Member
                • Jun 2016
                • 77

                #8
                I have got this working now thanks. I created a separate template showing memory usage of these apps and create a separate graph. I want to integrate this template with the windows os template so that I can see in 1 graph these apps memory usage with memory being used by cache and total memory used/free etc but at present I cant.

                Comment

                • mohit1993
                  Junior Member
                  • Feb 2018
                  • 21

                  #9
                  Originally posted by valegator
                  In that case you can use Windows Performance Counters, let's say you want to monitor Print spooler process (spoolsv) memory usage:

                  1. Go to the target host and execute
                  Code:
                  typeperf -qx > C:\perfoutput.txt
                  in CMD as Administrator. This will give you a list of available performance counters.
                  2. Open the perfoutput.txt and search for lines beginning with \Process (you maybe have to sort the lines).
                  3. Select the performance counter you want, in that case "\Process(spoolsv)\Working Set - Private".
                  4. Create a Zabbix performance counter item:
                  Code:
                  perf_counter["\Process(spoolsv)\Working Set - Private"]
                  This will return the memory usage of this process.



                  As long as the processes are not running, the items will be "ZBX_NOTSUPPORTED: Cannot obtain performance information from collector.". As soon as they run, the items get supported and return values for graphs.

                  Hey thax for giving perf_counter for ram utilization for particular process. can you help me with process cpu utilization and total cpu utilization for windows
                  I have try with following keys

                  Code:
                  perf_counter[\Process(<processName>)\% User Time] // for particular process cpu utilization
                  Code:
                  system.cpu.util[all,system,avg5] // for total cpu utilization
                  but above keys not sending proper value can help me with above case

                  Comment

                  • pmurtey
                    Member
                    • Mar 2020
                    • 91

                    #10
                    Hi All, We have a linux server we wanted to monitor the process memory utilization on and trigger an alert if it exceeded 5gb. We set the Item to be proc.mem[tomcat] numeric unsigned, and its showing a usage of 4gb. What would the trigger look like to alert if 5gb is exceeded?

                    Comment

                    Working...