How is memory calculated when Solarwinds agent is used for Linux servers

Hi ALl,

How is memory calculated when Solarwinds agent is used for Linux servers? Do we have any command or formula that is run in back end?

We are doing an automation for most of the metrics so the team needs to know the forumla in order to compare and then put in prod...

  • The Linux Agent polls memory statistics from the /proc filesystem (/proc/meminfo) as follows:

    Value
    Capacity
    Used
    Physical Memory MemTotal MemTotal-MemFree
    Virtual Memory MemTotal+SwapTotal (MemTotal+SwapTotal) - (MemFree+SwapFree)
    Swap Space SwapTotal SwapTotal-SwapFree
    Shared Memory Shmem Shmem
    Cached Memory Cached Cached
  • Thanks but the 'Free' part will vary based on the OS right.. like it may consider buffer/cache under free as well.. so do u have any inputs on that?

    Ex below for 1 Linux server. if i just do Total - free then it doesnt match at all..

  • and another question... if i check Memory in console for 1 server in gauge, it shows different % and different for physical memory... m referring this for agent based only...  when m alerting using percent memory variable which one will it refer?

  • Various Linux tools display values differently, such as ps, top, glances, htop, etc. etc. All of these tools however gather their information from the same place. That bing '(/proc/meminfo)'. If you 'cat' this file you should see all memory metrics available for that machine and their most current values. 

    MemTotal:       32753444 kB
    MemFree:          312744 kB
    MemAvailable:   27075616 kB
    Buffers:         8917932 kB
    Cached:         17618764 kB
    SwapCached:        47604 kB
    Active:         11700564 kB
    Inactive:       19421900 kB
    Active(anon):    2543016 kB
    Inactive(anon):  2063184 kB
    Active(file):    9157548 kB
    Inactive(file): 17358716 kB
    Unevictable:       27920 kB
    Mlocked:           16508 kB
    SwapTotal:        999420 kB
    SwapFree:         341108 kB
    Dirty:              3608 kB
    Writeback:             8 kB
    AnonPages:       4587080 kB
    Mapped:           720548 kB
    Shmem:            198484 kB
    KReclaimable:     716308 kB
    Slab:            1098620 kB
    SReclaimable:     716308 kB
    SUnreclaim:       382312 kB
    KernelStack:       30544 kB
    PageTables:        45496 kB
    NFS_Unstable:          0 kB
    Bounce:                0 kB
    WritebackTmp:          0 kB
    CommitLimit:    17376140 kB
    Committed_AS:   18112136 kB
    VmallocTotal:   34359738367 kB
    VmallocUsed:       49508 kB
    VmallocChunk:          0 kB
    Percpu:            12608 kB
    HardwareCorrupted:     0 kB
    AnonHugePages:         0 kB
    ShmemHugePages:        0 kB
    ShmemPmdMapped:        0 kB
    FileHugePages:         0 kB
    FilePmdMapped:         0 kB
    CmaTotal:              0 kB
    CmaFree:               0 kB
    HugePages_Total:       0
    HugePages_Free:        0
    HugePages_Rsvd:        0
    HugePages_Surp:        0
    Hugepagesize:       2048 kB
    Hugetlb:               0 kB
    DirectMap4k:     2614592 kB
    DirectMap2M:    30806016 kB
    DirectMap1G:           0 kB

  • Some tools consider items such as cache to be used memory. This is how NET-SNMP calculates memory used, and this is not typically what most people would consider to be accurate. That is because the Linux operating system will use any/all available memory for disk cache until such time as it is needed for an application. Then that memory is released and made available for use by whichever application is in need of that RAM. 

  • but for alerting how does it work? there is percent memory used option.. so what does this take into account? like i said overall memory is different and physical memory is different...

  • Alerting uses the same values displayed within the Orion web interface for that node.