Customizing Newt Manager Usage with mgmt¶
The mgmt package enables you to customize Newt Manager (in either the newtmgr or oicmgr framerwork) to only process the commands that your application uses. The newtmgr commands are divided into management groups. A manager package implements the commands for a group. It implements the handlers that process the commands for the group and registers the handlers with mgmt. When newtmgr or oicmgr receives a newtmgr command, it looks up the handler for the command (by management group id and command id) from mgmt and calls the handler to process the command.
The system level management groups are listed in following table:
Management Group | newtmgr Commands | Package |
MGMT_GROUP_ID_DEFAULT |
| mgmt/newtmgr/nmgr_os |
MGMT_GROUP_ID_IMAGE |
| mgmt/imgmgr |
MGMT_GROUP_ID_STATS |
| sys/stats |
MGMT_GROUP_ID_CONFIG |
| sys/config |
MGMT_GROUP_ID_LOGS |
| sys/log |
MGMT_GROUP_ID_CRASH |
| test/crash_test |
MGMT_GROUP_ID_RUNTEST |
| test/runtest |
Both newtmgr and ocimgr process the MGMT_GROUP_ID_DEFAULT commands by default. You can also use mgmt to add user defined management group commands.