Ad Widget

Collapse

Monitoring process memory size with trigger

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • pmurtey
    Member
    • Mar 2020
    • 91

    #1

    Monitoring process memory size with trigger

    Hi All , We have a process that is leaking memory. Currently it is running around 2gb and utilizing this item key we can see the memory utilization: proc.mem[,,,SERVERhub] After researching the web for the correct trigger to let us know when the process exceeds 3gb we tried the following but it does not appear to work, and we are not sure why its not working. This is the trigger: {v00uicaspec01rroc.mem[,,,SERVERhub].count(#3,{$PROC_MEM_MAX},gt)}>=3 When displaying in the triggers there is a Information widget next to 'unknown' and when hovering over the information widget we get "Cannot evaluate expression: "Cannot evaluate function "v00uicaspec01rroc.mem[,,,SERVERhub].count(#3,{$PROC_MEM_MAX},gt)": "{$PROC_MEM_MAX}" is not a valid numeric unsigned value.". We tried substituting the $PROC_MEM_MAX with a number 2000000000 and we get the same "Cannot evaluate expression: "Cannot evaluate function "v00uicaspec01rroc.mem[,,,SERVERhub].count(#3,{2000000000},gt)": "{2000000000}" is not a valid numeric unsigned value.". Not sure what we are missing, could someone please share.
  • ISiroshtan
    Senior Member
    • Nov 2019
    • 324

    #2
    Hi mate

    the {$...} is a syntax used for Macro. If you did not create a macro on Host level or a Global Macro it would fail.

    And if you want to substitute Macro with a raw number - drop the {} around the number.

    Please try it, I'm pretty sure it's a source of your issue.

    Comment

    • pmurtey
      Member
      • Mar 2020
      • 91

      #3
      That seemed to do the trick. However when we run the proc.mem we get more than just the resident memory displayed, we are assuming the rest is shared virtual memory. What command would we use to display only the resident portion of the process memory usage?

      Comment

      • ISiroshtan
        Senior Member
        • Nov 2019
        • 324

        #4
        Hey mate.

        First of all, refer the item description in documentation. You could see that proc.mem() can accept one more option - <memtype> - which define a memory type returned. And here you could check which types are supported.

        Hope it helps.

        Comment

        • pmurtey
          Member
          • Mar 2020
          • 91

          #5
          Had to play around with the positioning a little bit but got it to work, can of unusual on two different Linux systems the positions if the memtype were different. on one it was mem[SERVER,,,,rss] and the other it was mem[,,,SERVER,rss] Kind of weird. But thanks for your guidance.

          Comment

          Working...