For more information regarding the security incident at F5, the actions we are taking to address it, and our ongoing efforts to protect our customers, click here.

Forum Discussion

Vijay_E's avatar
Vijay_E
Icon for Cirrus rankCirrus
Jul 17, 2016

iControl Rest - Nested Entries

I am getting quite a lot of values when I use the following:

curl -k -u admin:admin -X GET https://10.10.10.10/mgmt/tm/sys/memory/ -H "Content-Type: application/json"

 

in order to identify the memory utilization on a F5 running 11.5.x code:

 

            "https://localhost/mgmt/tm/sys/memory/memory-tmm/3.0": {
                "nestedStats": {
                    "entries": {
                        "tmmId": {
                            "description": "3.0"
                        }, 
                        "memoryTotal": {
                            "value": 61694017536
                        }, 
                        "memoryUsed": {
                            "value": 1795322088
                        }
                    }
                }
            }

 

Is there an easy way just to query for memory utilization on "/tmm-memory/3.0" ?

1 Reply

  • JG's avatar
    JG
    Icon for Cumulonimbus rankCumulonimbus

    Despite the URL "https://localhost/mgmt/tm/sys/memory/memory-tmm/3.0" in the output, it does not seem to be directly accessible, even with v12.1.0. So you still need to get the whole output (7000+ lines) and use a tool to parse it. You must already have something to do the parsing. Nonetheless, here's a "simple" way I have tried to get this info:

     

    curl -s -k -u admin:admin -X GET 'https://mgmt_IP_address/mgmt/tm/sys/memory/' | jq '.entries."https://localhost/mgmt/tm/sys/memory/memory-tmm".nestedStats.entries."https://localhost/mgmt/tm/sys/memory/memory-tmm/3.0".nestedStats.entries.memoryUsed | tostring'

     

    You will need jg v1.5 for this.