rotate log [{--hosts=|-h }host_list] [site_name]host_list:host[,host[,...]]Rotatemcmd logs for the connected MySQL Cluster Manager agent, for agents running on certain hosts, or for agents on all hosts in a management site.
For example, to rotate logs for the agent to which the client session is connected:
mcm> rotate log;+--------------------------+| Command result |+--------------------------+| Log rotated successfully |+--------------------------+1 row in set (0.03 sec)A new log file, with an underscore and then a timestamp inserted into its file name before the file extension, is created as a result:
-rw-r----- 1 mcmd cluster 74265 Jul 15 22:45 mcmd.log-rw-r----- 1 mcmd cluster 1197573 Jul 15 22:45 mcmd_2017-07-15T22-45-28.log For MySQL Cluster Manager 1.4.4 and earlier, the new file name is in the format of, which will beold_filename.timestampmcmd.log.2017-07-15T22-45-28 for the example above.
To rotate logs for agents on specific hosts likenanna12 andnanna13, use the--hosts option (or its short form-h):
mcm> rotate log --hosts=nanna12,nanna13 mysite; To rotate logs on all agents in the management sitemysite:
mcm> rotate log mysite;