MySQL Cluster verifies whether the memory in the management node configuration exceeds the standard script to verify the management node config. the shell script configured by the ini parameter to check whether memory has exceeded the memory quota. The above data node id must be included during running and the cluster must be in the working state, at least the manage node and data node must be in the "run check_memery.sh" Startup state:
#! /Bin/bashusage () {echo "---------------------------" echo "Usage: $ (basename $0) NodeId" # data node ID echo "-----------------------------" echo exit 1} print_size () {string1 =1 (echo $1 | sed-e: a-e's/^. \ {1, 40 \} $ /&. /; ta ') echo-e "$ string1 (MB): \ t $2"} if ["$1" = "]; then usagefistring1 = $ (echo $1 | egrep "^ [0-9] + $") if ["$1 "! = "$ String1"]; then usagefi # GETVAL = "ndb_config -- id = $1-q" GETVAL = "/root/mysql-cluster-gpl-7.2.7-linux2.6-x86_64/bin/ndb_config -- id = $1-q" # ndb_config -- id = 12 -q MaxNoOfAttributesksize = 1024 msize = $ (echo "scale = 2; 1024*1024 "| bc-l 2>/dev/null) gsize = $ (echo" scale = 2; 1024*1024*1024 "| bc-l 2>/dev/null) echo" KB: $ ksize MB: $ msize GB: $ gsize "MEMSIZE = 0 # AttributesTSIZE = $ ($ GETVAL MaxNoOfAttributes) TSIZE = $ (echo" scale = 0; $ TSIZE * 200 "| bc-l 2>/dev/null) MEMSIZE = $ (echo" scale = 2; $ MEMSIZE + $ TSIZE "| bc-l 2>/dev/null) TSIZE = $ (echo" scale = 0; $ TSIZE/$ msize "| bc-l 2>/dev/null) print_size" MaxNoOfAttributes "$ TSIZE # AttributesTSIZE = $ ($ GETVAL MaxNoOfTables) TSIZE = $ (echo "scale = 0; $ TSIZE * 20 * $ ksize" | bc-l 2>/dev/null) MEMSIZE = $ (echo "scale = 2; $ MEMSIZE + $ TSIZE "| bc-l 2>/dev/null) TSIZE = $ (echo" scale = 0; $ TSIZE/$ msize "| bc-l 2>/dev/null) print_size" MaxNoOfTables "$ TSIZE # AttributesTSIZE = $ ($ GETVAL MaxNoOfOrderedIndexes) TSIZE = $ (echo "scale = 0; $ TSIZE * 10 * $ ksize" | bc-l 2>/dev/null) MEMSIZE = $ (echo "scale = 2; $ MEMSIZE + $ TSIZE "| bc-l 2>/dev/null) TSIZE = $ (echo" scale = 0; $ TSIZE/$ msize "| bc-l 2>/dev/null) print_size" MaxNoOfOrderedIndexes "$ TSIZE # AttributesTSIZE = $ ($ GETVAL MaxNoOfUniqueHashIndexes) TSIZE = $ (echo "scale = 0; $ TSIZE * 10 * $ ksize" | bc-l 2>/dev/null) MEMSIZE = $ (echo "scale = 2; $ MEMSIZE + $ TSIZE "| bc-l 2>/dev/null) TSIZE = $ (echo" scale = 0; $ TSIZE/$ msize "| bc-l 2>/dev/null) print_size" MaxNoOfUniqueHashIndexes "$ TSIZE # AttributesTSIZE = $ ($ GETVAL MaxNoOfConcurrentOperations) TSIZE = $ (echo "scale = 0; $ TSIZE * 1 * $ ksize" | bc-l 2>/dev/null) MEMSIZE = $ (echo "scale = 2; $ MEMSIZE + $ TSIZE "| bc-l 2>/dev/null) TSIZE = $ (echo" scale = 0; $ TSIZE/$ msize "| bc-l 2>/dev/null) print_size" MaxNoOfConcurrentOperations "$ TSIZE # AttributesTSIZE = $ ($ GETVAL TransactionBufferMemory) MEMSIZE = $ (echo "scale = 2; $ MEMSIZE + $ TSIZE" | bc-l 2>/dev/null) TSIZE = $ (echo "scale = 0; $ TSIZE/$ msize "| bc-l 2>/dev/null) print_size" TransactionBufferMemory "$ TSIZE # AttributesTSIZE = $ ($ GETVAL IndexMemory) MEMSIZE = $ (echo "scale = 2; $ MEMSIZE + $ TSIZE" | bc-l 2>/dev/null) TSIZE = $ (echo "scale = 0; $ TSIZE/$ msize "| bc-l 2>/dev/null) print_size" IndexMemory "$ TSIZE # AttributesTSIZE = $ ($ GETVAL DataMemory) MEMSIZE = $ (echo "scale = 2; $ MEMSIZE + $ TSIZE" | bc-l 2>/dev/null) TSIZE = $ (echo "scale = 0; $ TSIZE/$ msize "| bc-l 2>/dev/null) print_size" DataMemory "$ TSIZE # AttributesTSIZE = $ ($ GETVAL UndoIndexBuffer) MEMSIZE = $ (echo "scale = 2; $ MEMSIZE + $ TSIZE" | bc-l 2>/dev/null) TSIZE = $ (echo "scale = 0; $ TSIZE/$ msize "| bc-l 2>/dev/null) print_size" UndoIndexBuffer "$ TSIZE # AttributesTSIZE = $ ($ GETVAL UndoDataBuffer) MEMSIZE = $ (echo "scale = 2; $ MEMSIZE + $ TSIZE" | bc-l 2>/dev/null) TSIZE = $ (echo "scale = 0; $ TSIZE/$ msize "| bc-l 2>/dev/null) print_size" UndoDataBuffer "$ TSIZE # AttributesTSIZE = $ ($ GETVAL RedoBuffer) MEMSIZE = $ (echo "scale = 2; $ MEMSIZE + $ TSIZE" | bc-l 2>/dev/null) TSIZE = $ (echo "scale = 0; $ TSIZE/$ msize "| bc-l 2>/dev/null) print_size" RedoBuffer "$ TSIZE # AttributesTSIZE = $ ($ GETVAL LongMessageBuffer) MEMSIZE = $ (echo "scale = 2; $ MEMSIZE + $ TSIZE" | bc-l 2>/dev/null) TSIZE = $ (echo "scale = 0; $ TSIZE/$ msize "| bc-l 2>/dev/null) print_size" LongMessageBuffer "$ TSIZE # AttributesTSIZE = $ ($ GETVAL DiskPageBufferMemory) MEMSIZE = $ (echo "scale = 2; $ MEMSIZE + $ TSIZE" | bc-l 2>/dev/null) TSIZE = $ (echo "scale = 0; $ TSIZE/$ msize "| bc-l 2>/dev/null) print_size" DiskPageBufferMemory "$ TSIZE # AttributesTSIZE = $ ($ GETVAL SharedGlobalMemory) MEMSIZE = $ (echo "scale = 2; $ MEMSIZE + $ TSIZE" | bc-l 2>/dev/null) TSIZE = $ (echo "scale = 0; $ TSIZE/$ msize "| bc-l 2>/dev/null) print_size" SharedGlobalMemory "$ TSIZE # AttributesTSIZE = $ ($ GETVAL BackupMemory) MEMSIZE = $ (echo "scale = 2; $ MEMSIZE + $ TSIZE" | bc-l 2>/dev/null) TSIZE = $ (echo "scale = 0; $ TSIZE/$ msize "| bc-l 2>/dev/null) print_size" BackupMemory "$ TSIZEMEMSIZE = $ (echo" scale = 2; $ MEMSIZE/$ gsize "| bc-l 2>/dev/null) echoecho" ****** Total Memory size: $ {MEMSIZE} GB ******"