Ad Widget

Collapse

proc.mem: is it really useful to monitor ?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • djinn_fr22
    Member
    • Jan 2007
    • 54

    #1

    proc.mem: is it really useful to monitor ?

    Hi,

    I just would like to discuss on the forum the usage of proc.mem.

    For example, if I use something like proc.mem[zabbix_agentd], it returns 27 MB.

    But when you do a ps
    Code:
    $ ps aux|head -1;ps aux|grep zabbix
    PID %CPU %MEM   VSZ  RSS TTY      STAT START   TIME COMMAND
     4247  0.0  0.0  1392  588 ?        SN   09:37   0:00 /bin/zabbix_agentd 
    4248  0.0  0.0  9008 1108 ?        SN   09:37   0:00 /bin/zabbix_agentd 
    4249  0.0  0.0  9008 1108 ?        SN   09:37   0:00 /bin/zabbix_agentd
    4250  0.0  0.0  9012  928 ?        SN   09:37   0:00 /bin/zabbix_agentd
    So basically proc.mem returns the value of virtual memory (VSZ) and not the memory use in RAM (RSS).

    From a monitoring point of view, I think it will be more interresting to have the consumption of the real memory than the virtual memory over time.

    By looking at that, you can see the trends of the process, and for example see if it's leaking. The virtual memory can be monitored anyway by looking at the size of the swap of the system overall.

    What do you think ?

    Thanks
  • James Wells
    Senior Member
    • Jun 2005
    • 664

    #2
    Greetings,
    Originally posted by djinn_fr22
    From a monitoring point of view, I think it will be more interresting to have the consumption of the real memory than the virtual memory over time.
    Nice catch. I hadn't noticed that before, but you are correct. At the same time though, I think an even better way to do it would be to give us the ability to choose between VSZ and RSS, and the total of the two.
    Unofficial Zabbix Developer

    Comment

    • djinn_fr22
      Member
      • Jan 2007
      • 54

      #3
      It would be great if we can have that.

      Another thing I saw on the forum was that people were asking about CPU consumption of a process.
      I think it will as well a really good feature.

      For people that needs this kind of info, it's posssible on linux to UserParameter with a call in a perl script to the library Sys::Statistics::Linux.

      But I think seeing Zabbix agent as a framework, it will be much better to have this kind of info out of the box.

      James, do you know what the roadmap for the agentd ?
      My feeling is that it has been freezed for a while.
      Are there any plans to had more system metrics ?

      My wish list:
      - CPU io wait
      - number of CPU
      - ps (cpu, memory)
      - size of directory

      I hope I could do it myself, but I am not good enough in C++. So I stick with Userparameter and perl

      Thanks

      Comment

      • tronite
        Senior Member
        • Jun 2007
        • 147

        #4
        Originally posted by James Wells
        Greetings,

        Nice catch. I hadn't noticed that before, but you are correct. At the same time though, I think an even better way to do it would be to give us the ability to choose between VSZ and RSS, and the total of the two.
        What is VSZ and RSS (remember we are not all as well experience so have mercy!)?

        Comment

        • djinn_fr22
          Member
          • Jan 2007
          • 54

          #5
          Hi,

          RSS is the part which is in physical memory.

          VSZ is the virtual memory size of the process, part of which may be in physical memory and part of which may be swapped to disk.

          Comment

          • sterno
            Junior Member
            • Jan 2006
            • 24

            #6
            The virtual size isn't just what's resident in memory plus what's paged out to disk. It may also include memory-mapped files and devices, shared memory segments, shared library code, etc.

            Comment

            • BusteR81
              Senior Member
              • Apr 2007
              • 150

              #7
              so what now?

              i agree that RSS is more useful then VSS. however having both to monitor is definetly a plus. if i wanna monitor RSS using v1.4, what can i do ??

              cheers

              Comment

              • BusteR81
                Senior Member
                • Apr 2007
                • 150

                #8
                confirm virtual mem only ?

                hi

                can anyone double confirm that "proc_mem[ ]" can ONLY monitor the virutal mem for Linux system ? If so, what other alternative do I hav if i wanna monitor the Real mem of process in Linux

                Comment

                • pedrich
                  Junior Member
                  • Sep 2007
                  • 2

                  #9
                  At the moment, it looks like the easiest way to check RSS centrally will be with a system.run command, and just parse the information you're returning yourself to grab what you want:
                  ps aux |grep <process> |grep -v "grep" |awk '{print $6}'
                  This assumes you're running a system with BSD compatible 'ps' syntax.
                  Let's hope a measure for RSS value gets added soon.
                  Last edited by pedrich; 29-11-2007, 13:00. Reason: Added clarification of what the ps command works for.

                  Comment

                  • pedrich
                    Junior Member
                    • Sep 2007
                    • 2

                    #10
                    The other option would be to modify the source to check
                    /proc/<pid>/status: VmRSS
                    instead of whatever it's returning now.

                    I'm not desperate enough yet to do that, however. I can wait for it to get added to the standard build.

                    Comment

                    • raddy
                      Junior Member
                      • Jan 2008
                      • 9

                      #11
                      Hello Everybody

                      Sorry for refreshing a very old thread.
                      But is there any new methods to retrieve Process's Physical Memory Usage and Process's cpu utilization in Zabbix 1.6x?

                      If we still need to relie on User Parameter, then suggest a good one.

                      Comment

                      • chriso
                        Junior Member
                        • May 2010
                        • 20

                        #12
                        Again..reviving an old thread. Has this been addressed?

                        Comment

                        • eugene.istomin
                          Junior Member
                          • Jan 2010
                          • 22

                          #13
                          +1 for ps(mem, cpu)

                          Very useful feature.

                          Comment

                          • jvandenbroek
                            Junior Member
                            • Oct 2011
                            • 15

                            #14
                            Too bad this still has not been addressed in the current version, it's a really wanted feature!

                            Comment

                            • CeeEss
                              Senior Member
                              Zabbix Certified Specialist
                              • Nov 2007
                              • 103

                              #15
                              another +1 for proc.mem[VIRT/RES/SHR]

                              Comment

                              Working...