Ad Widget

Collapse

proc.mem confusion

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • gullevek
    Junior Member
    • Nov 2008
    • 22

    #1

    proc.mem confusion

    I read through tons of forum entries and I slowly get it, but I am still confused how proc.mem works. It seems to work and not work ...

    For example for testing I try to monitor my firefox and various kde applications on my box.

    Firefox works as I want, I have two of them with different startup parameters.

    # zabbix_agent -t 'proc.mem[firefox-bin]'
    proc.mem[firefox-bin] [u|2031833088]
    # zabbix_agent -t 'proc.mem[firefox-bin,,,default]'
    proc.mem[firefox-bin,,,default] [u|1204211712]
    # zabbix_agent -t 'proc.mem[firefox-bin,,,Development]'
    proc.mem[firefox-bin,,,Development] [u|828407808]

    bing, but when I try to do the same thing with kde, it fails.

    I want to monitor all kde apps, so everything with "kdeinit" and then all konsole, all kate, etc.
    Most kde apps look in ps like this
    kate [kdeinit]
    kwrite [kdeinit]
    konsole [kdeinit]

    but some look like this
    konsole [kdeinit] -session .....

    So I thought I ill just write:
    # zabbix_agent -t 'proc.mem[konsole]'
    proc.mem[konsole] [u|0]

    but that doesn't return anything. so I tried
    # zabbix_agent -t 'proc.mem[konsole [kdeinit]]'
    proc.mem[konsole [kdeinit]] [u|379822080]
    and that returns all the konsole EXCEPT the ones that have -session string.

    This really confused me. Why is that? With the firefox, that has similar parameters, it correctly gets it, with kde it doesn't work. Is then "[kdeinit]" consufing it.

    But one more thing confused me too. When I do this:
    # zabbix_agent -t 'proc.mem[kate [kdeinit]]'
    proc.mem[kate [kdeinit]] [u|501219328]
    and I do this:
    # zabbix_agent -t 'proc.mem[,,,kate]'
    proc.mem[,,,kate] [u|505008128]
    I get different numbers because the second one includes a grep:
    # ps waux|grep kate
    gullevek 1986 0.0 0.8 145032 30048 ? S Nov05 0:28 kate [kdeinit]
    gullevek 14888 0.1 1.3 344440 49748 ? S Oct10 89:34 kate [kdeinit]
    root 31400 0.0 0.0 4748 744 pts/44 S+ 10:31 0:00 grep kate

    If I sum up the memory of all processes I get the second sum.

    Somehow I think I still don't get proc.mem

    Anyone can help me?
Working...