{"id":1124,"date":"2008-06-18T19:52:53","date_gmt":"2008-06-18T09:52:53","guid":{"rendered":"http:\/\/www.flamingspork.com\/blog\/?p=1124"},"modified":"2009-02-21T13:40:02","modified_gmt":"2009-02-21T03:40:02","slug":"ndbinfo-scanning-from-ndb_mgm","status":"publish","type":"post","link":"https:\/\/www.flamingspork.com\/blog\/2008\/06\/18\/ndbinfo-scanning-from-ndb_mgm\/","title":{"rendered":"NDB$INFO scanning from ndb_mgm"},"content":{"rendered":"<p>In code just tested:<\/p>\n<blockquote><p>ndb_mgm&gt; ndbinfo MEMUSAGE<br \/>\nRESOURCE_NAME\u00c2\u00a0\u00c2\u00a0\u00c2\u00a0 NODE_ID\u00c2\u00a0\u00c2\u00a0\u00c2\u00a0 PAGE_SIZE_KB\u00c2\u00a0\u00c2\u00a0\u00c2\u00a0 PAGES_USED\u00c2\u00a0\u00c2\u00a0\u00c2\u00a0 PAGES_TOTAL\u00c2\u00a0\u00c2\u00a0\u00c2\u00a0 BLOCK<br \/>\nIndexMemory,1,8192,16,160,DBACC<br \/>\nDataMemory,1,32768,20,640,DBTUP<br \/>\nIndexMemory,2,8192,16,160,DBACC<br \/>\nDataMemory,2,32768,20,640,DBTUP<\/p><\/blockquote>\n<p>Win!<\/p>\n<p>This is the first time that we&#8217;ve been able to get this kind of info out of the cluster without using the magic &#8220;all dump 1000&#8221; (or &#8220;all report MemUsage&#8221;) which end up using events, which go to the log file, aren&#8217;t exactly reliable etc.<\/p>\n<p>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:<\/p>\n<blockquote><p>$ .\/storage\/ndb\/src\/mgmclient\/ndb_mgm -c localhost:9311 -e &#8216;ndbinfo MEMUSAGE&#8217;|tail -n +3|grep &#8216;DataMemory&#8217;|cut -d &#8216;,&#8217; -f4<br \/>\n20<br \/>\n20<\/p><\/blockquote>\n<p>now, just to clean it up a bit, fix the one bug (yes, you guessed it: in metadata caching) and get a review&#8230;.<\/p>\n<p>but, a milestone!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In code just tested: ndb_mgm&gt; ndbinfo MEMUSAGE RESOURCE_NAME\u00c2\u00a0\u00c2\u00a0\u00c2\u00a0 NODE_ID\u00c2\u00a0\u00c2\u00a0\u00c2\u00a0 PAGE_SIZE_KB\u00c2\u00a0\u00c2\u00a0\u00c2\u00a0 PAGES_USED\u00c2\u00a0\u00c2\u00a0\u00c2\u00a0 PAGES_TOTAL\u00c2\u00a0\u00c2\u00a0\u00c2\u00a0 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&#8217;ve been able to get this kind of info out of the cluster without using the &hellip; <a href=\"https:\/\/www.flamingspork.com\/blog\/2008\/06\/18\/ndbinfo-scanning-from-ndb_mgm\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false},"categories":[14],"tags":[628,54],"class_list":["post-1124","post","type-post","status-publish","format-standard","hentry","category-mysql","tag-mysql","tag-ndb"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p5a6n8-i8","jetpack-related-posts":[{"id":926,"url":"https:\/\/www.flamingspork.com\/blog\/2008\/05\/27\/ndbinfo\/","url_meta":{"origin":1124,"position":0},"title":"NDB$INFO","author":"Stewart Smith","date":"2008-05-27","format":false,"excerpt":"There's been talk over the years of better monitoring for NDB (MySQL Cluster). This has been dubiously named NDB$INFO, after some special magical naming convention for tables holding information on the insides of NDB. Otherwise known as Worklog 3363 (viewable on MySQL Forge). The basic idea is to get a\u2026","rel":"","context":"In &quot;mysql&quot;","block_context":{"text":"mysql","link":"https:\/\/www.flamingspork.com\/blog\/category\/work-et-al\/mysql\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":586,"url":"https:\/\/www.flamingspork.com\/blog\/2006\/02\/17\/ndb-disk-requirements\/","url_meta":{"origin":1124,"position":1},"title":"NDB Disk Requirements","author":"Stewart Smith","date":"2006-02-17","format":false,"excerpt":"up to 3 copies of data (3*DataMemory) + 64MB * NoOfFragLogFiles (default=8) + UNDO log (dependent on update speed) For example: DataMemory=1024MB idea on disk usage= 1024*3 + 64 * 8 =\u00c2\u00a0 3584MB + UNDO log It's very tempting to have a \"SHOW ESTIMATES\" command in the management client\/server that\u2026","rel":"","context":"In &quot;mysql&quot;","block_context":{"text":"mysql","link":"https:\/\/www.flamingspork.com\/blog\/category\/work-et-al\/mysql\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1316,"url":"https:\/\/www.flamingspork.com\/blog\/2008\/12\/18\/ndbinfo-sql-interface\/","url_meta":{"origin":1124,"position":2},"title":"NDB$INFO SQL Interface","author":"Stewart Smith","date":"2008-12-18","format":false,"excerpt":"Just saw a brief \"this is how it's currently working\" on Martin's implementation of the SQL frontend to the NDB$INFO work. It's awesome.","rel":"","context":"In &quot;mysql&quot;","block_context":{"text":"mysql","link":"https:\/\/www.flamingspork.com\/blog\/category\/work-et-al\/mysql\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1783,"url":"https:\/\/www.flamingspork.com\/blog\/2010\/02\/03\/ndbinfo-with-sql-hits-beta\/","url_meta":{"origin":1124,"position":3},"title":"NDB$INFO with SQL hits beta","author":"Stewart Smith","date":"2010-02-03","format":false,"excerpt":"\u00ef\u00bb\u00bfBernhard blogged over at http:\/\/ocklin.blogspot.com\/2010\/02\/mysql-cluster-711-is-there.html that MySQL Cluster 7.1.1 Beta has been released. The big feature (from my point of view) is the SQL interface on top of NDB$INFO. This means there is now full infrastructure from the NDB data nodes right out to SQL in the MySQL Server for\u2026","rel":"","context":"In &quot;General&quot;","block_context":{"text":"General","link":"https:\/\/www.flamingspork.com\/blog\/category\/general\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":805,"url":"https:\/\/www.flamingspork.com\/blog\/2007\/03\/17\/ndb-online-add-node-progress-or-rather-testing-it\/","url_meta":{"origin":1124,"position":4},"title":"NDB Online Add Node Progress (or rather, testing it)","author":"Stewart Smith","date":"2007-03-17","format":false,"excerpt":"So, the sitch as of today: Added ndb_mgm_set_configuration() call to the mgmapi - which is not-so-casually evil API call that sends a packed ndb_mgm_configuration object (like what you get from ndb_mgm_get_configuration) to the management server, who then resets its lists of nodes for event reporting and for ClusterMgr and starts\u2026","rel":"","context":"In &quot;mysql&quot;","block_context":{"text":"mysql","link":"https:\/\/www.flamingspork.com\/blog\/category\/work-et-al\/mysql\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":767,"url":"https:\/\/www.flamingspork.com\/blog\/2006\/12\/11\/online-online-online-or-restarts-are-for-wusses\/","url_meta":{"origin":1124,"position":5},"title":"online online online! (or restarts are for wusses)","author":"Stewart Smith","date":"2006-12-11","format":false,"excerpt":"I often see things go past my eyes where customers (and users - i.e. those that don't send wads of cash our way and hence are not financially supporting my beer, curry and photography habits) have amazing uptime and reliability requirements. When talking to businesses that use MySQL, it's not\u2026","rel":"","context":"In &quot;mysql&quot;","block_context":{"text":"mysql","link":"https:\/\/www.flamingspork.com\/blog\/category\/work-et-al\/mysql\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"jetpack_likes_enabled":true,"_links":{"self":[{"href":"https:\/\/www.flamingspork.com\/blog\/wp-json\/wp\/v2\/posts\/1124","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.flamingspork.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.flamingspork.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.flamingspork.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.flamingspork.com\/blog\/wp-json\/wp\/v2\/comments?post=1124"}],"version-history":[{"count":1,"href":"https:\/\/www.flamingspork.com\/blog\/wp-json\/wp\/v2\/posts\/1124\/revisions"}],"predecessor-version":[{"id":1481,"href":"https:\/\/www.flamingspork.com\/blog\/wp-json\/wp\/v2\/posts\/1124\/revisions\/1481"}],"wp:attachment":[{"href":"https:\/\/www.flamingspork.com\/blog\/wp-json\/wp\/v2\/media?parent=1124"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.flamingspork.com\/blog\/wp-json\/wp\/v2\/categories?post=1124"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.flamingspork.com\/blog\/wp-json\/wp\/v2\/tags?post=1124"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}