In code just tested:
ndb_mgm> ndbinfo MEMUSAGE
RESOURCE_NAMEÂ Â Â NODE_IDÂ Â Â PAGE_SIZE_KBÂ Â Â PAGES_USEDÂ Â Â PAGES_TOTALÂ Â Â BLOCK
IndexMemory,1,8192,16,160,DBACC
DataMemory,1,32768,20,640,DBTUP
IndexMemory,2,8192,16,160,DBACC
DataMemory,2,32768,20,640,DBTUP
Win!
This is the first time that we’ve been able to get this kind of info out of the cluster without using the magic “all dump 1000” (or “all report MemUsage”) which end up using events, which go to the log file, aren’t exactly reliable etc.
This performs a scan on the NDBINFO tables (in ndbd) from ndb_mgmd and returns the result to the management client. You can then use this in scripts from the command line. e.g. to find out how many pages of datamemory are used on each node:
$ ./storage/ndb/src/mgmclient/ndb_mgm -c localhost:9311 -e ‘ndbinfo MEMUSAGE’|tail -n +3|grep ‘DataMemory’|cut -d ‘,’ -f4
20
20
now, just to clean it up a bit, fix the one bug (yes, you guessed it: in metadata caching) and get a review….
but, a milestone!