Create a Post
cancel
Showing results for 
Search instead for 
Did you mean: 
Peter_Baumann
Contributor
Jump to solution

VSX: Monitor Virtual Memory of VS

Hi all,

We try to monitor the virtual memory used on two different VS with SNMP.

I already could set the SNMP into the VS-Mode and it seems working well.

For the Virtual Memory we use the following OIDs:

memActiveVirtual64 = .1.3.6.1.4.1.2620.1.6.7.4.2

memTotalVirtual64 = .1.3.6.1.4.1.2620.1.6.7.4.1

We try to get the following information from vsid1 (marked red😞

[Expert@vsx01:0]# vsenv 1
Context is set to Virtual Device vs1 (ID 1).
[Expert@vsx01:1]# fw ctl pstat

Virtual System Capacity Summary:
Physical memory used: 8% (1563 MB out of 17892 MB) - below watermark
Kernel memory used: 4% (726 MB out of 17892 MB) - below watermark
Virtual memory used: 3% (763 MB out of 23379 MB) - below watermark
Used: 186 MB by FW, 544 MB by zeco
Concurrent Connections: 27% (19457 out of 69900) - below watermark
Aggressive Aging is enabled, not active

Hash kernel memory (hmem) statistics:
Total memory allocated: 36332400 bytes in 8905 (4080 bytes) blocks
Total memory bytes used: 0 unused: 36332400 (100.00%) peak: 43246480
Total memory blocks used: 0 unused: 8905 (100%) peak: 11137
Allocations: 3470485482 alloc, 0 failed alloc, 3470278912 free

System kernel memory (smem) statistics:
Total memory bytes used: 73317624 peak: 85433552
Total memory bytes wasted: 2884360
Blocking memory bytes used: 43734556 peak: 51742556
Non-Blocking memory bytes used: 29583068 peak: 33690996
Allocations: 1075078 alloc, 0 failed alloc, 1064514 free, 0 failed free
vmalloc bytes used: 0 expensive: no

Kernel memory (kmem) statistics:
Total memory bytes used: 61907600 peak: 125391804
Allocations: 3471382515 alloc, 0 failed alloc
3471174670 free, 0 failed free

.....

But what we get are the following values from these counters:

[Expert@vsx01:1]# cpstat -f memory os

Total Virtual Memory (Bytes): 52948054016
Active Virtual Memory (Bytes): 3940368384
Total Real Memory (Bytes): 25015111680
Active Real Memory (Bytes): 3940106240
Free Real Memory (Bytes): 21075005440
Memory Swaps/Sec: -
Memory To Disk Transfers/Sec: -

Does someone know how we can monitor the "real" virtual memory of a VS-instance?

So why does both commands above show me so different informations when I'm in the "vsenv 1" ?

Thank you for your answer.

Best regards,

Peter

1 Solution

Accepted Solutions
Peter_Baumann
Contributor
Hi all,
I did open a case and the following was the solution...

On VSX it seems that you need to enable the memory statstics and reboot the host after:
In VS:
# vsx mstat enable
VSX memory resource control status: disabled
VSX memory resource control will start running after you reboot the machine
# reboot

After this I could see the used memory via snmp:

# snmpwalk -v 2c -c public 127.0.0.1 .1.3.6.1.4.1.2620.1.16.22.3
SNMPv2-SMI::enterprises.2620.1.16.22.3.1.1.1.0 = INTEGER: 0
SNMPv2-SMI::enterprises.2620.1.16.22.3.1.1.2.0 = INTEGER: 1
SNMPv2-SMI::enterprises.2620.1.16.22.3.1.1.3.0 = INTEGER: 2
SNMPv2-SMI::enterprises.2620.1.16.22.3.1.1.4.0 = INTEGER: 3
SNMPv2-SMI::enterprises.2620.1.16.22.3.1.2.1.0 = STRING: "vsx01"
SNMPv2-SMI::enterprises.2620.1.16.22.3.1.2.2.0 = STRING: "fw01"
SNMPv2-SMI::enterprises.2620.1.16.22.3.1.2.3.0 = STRING: "fw02"
SNMPv2-SMI::enterprises.2620.1.16.22.3.1.2.4.0 = STRING: "sw01"
SNMPv2-SMI::enterprises.2620.1.16.22.3.1.3.1.0 = Gauge32: 1062617
SNMPv2-SMI::enterprises.2620.1.16.22.3.1.3.2.0 = Gauge32: 131390
SNMPv2-SMI::enterprises.2620.1.16.22.3.1.3.3.0 = Gauge32: 321672
SNMPv2-SMI::enterprises.2620.1.16.22.3.1.3.4.0 = Gauge32: 60435

View solution in original post

0 Kudos
4 Replies
PhoneBoy
Admin
Admin

I think that cpstat command shows you the stats for the whole system (not a VS).

I believe you need to use cpstat vsx with some arguments to get the information you're after.

See also: SNMP query for CPU usage by each Virtual System (OID 1.3.6.1.4.1.2620.1.16.22.2) returns 0 (zero) va... 

Peter_Baumann
Contributor

Hi Dameon,

Thank you for this information.

Well, we're using SNMPv3 and doing context based queries according to How to configure SNMP on Gaia OS 

So the returned value should be coming from context "ctxname_vsid1", this is our vsenv 1 VS-instance.

The returned value is wrong and maybe from the whole system.

So how can we get the VS value back?

0 Kudos
PhoneBoy
Admin
Admin

I would log a TAC case so we can investigate.

How To Open a Case with TAC and/or Account Services

0 Kudos
Peter_Baumann
Contributor
Hi all,
I did open a case and the following was the solution...

On VSX it seems that you need to enable the memory statstics and reboot the host after:
In VS:
# vsx mstat enable
VSX memory resource control status: disabled
VSX memory resource control will start running after you reboot the machine
# reboot

After this I could see the used memory via snmp:

# snmpwalk -v 2c -c public 127.0.0.1 .1.3.6.1.4.1.2620.1.16.22.3
SNMPv2-SMI::enterprises.2620.1.16.22.3.1.1.1.0 = INTEGER: 0
SNMPv2-SMI::enterprises.2620.1.16.22.3.1.1.2.0 = INTEGER: 1
SNMPv2-SMI::enterprises.2620.1.16.22.3.1.1.3.0 = INTEGER: 2
SNMPv2-SMI::enterprises.2620.1.16.22.3.1.1.4.0 = INTEGER: 3
SNMPv2-SMI::enterprises.2620.1.16.22.3.1.2.1.0 = STRING: "vsx01"
SNMPv2-SMI::enterprises.2620.1.16.22.3.1.2.2.0 = STRING: "fw01"
SNMPv2-SMI::enterprises.2620.1.16.22.3.1.2.3.0 = STRING: "fw02"
SNMPv2-SMI::enterprises.2620.1.16.22.3.1.2.4.0 = STRING: "sw01"
SNMPv2-SMI::enterprises.2620.1.16.22.3.1.3.1.0 = Gauge32: 1062617
SNMPv2-SMI::enterprises.2620.1.16.22.3.1.3.2.0 = Gauge32: 131390
SNMPv2-SMI::enterprises.2620.1.16.22.3.1.3.3.0 = Gauge32: 321672
SNMPv2-SMI::enterprises.2620.1.16.22.3.1.3.4.0 = Gauge32: 60435
0 Kudos

Leaderboard

Epsum factorial non deposit quid pro quo hic escorol.

Upcoming Events

    CheckMates Events