MXS-1782: Add show threads
to MaxCtrl
Provides same output in MaxCtrl that is in MaxAdmin.
This commit is contained in:
parent
c90cfc0bee
commit
f8a91fb272
@ -148,6 +148,7 @@ Commands:
|
||||
filter <filter> Show filter
|
||||
module <module> Show loaded module
|
||||
maxscale Show MaxScale information
|
||||
threads Show worker thread information
|
||||
logging Show MaxScale logging information
|
||||
commands <module> Show module commands of a module
|
||||
|
||||
@ -204,6 +205,10 @@ information of a loaded module.
|
||||
|
||||
See `help alter maxscale` for more details about altering MaxScale parameters.
|
||||
|
||||
### show threads
|
||||
|
||||
`Usage: show threads`
|
||||
|
||||
### show logging
|
||||
|
||||
`Usage: show logging`
|
||||
|
@ -146,6 +146,20 @@ exports.builder = function(yargs) {
|
||||
])
|
||||
})
|
||||
})
|
||||
.command('threads', 'Show worker thread information', function(yargs) {
|
||||
return yargs.usage('Usage: show threads')
|
||||
}, function(argv) {
|
||||
maxctrl(argv, function(host) {
|
||||
return getCollection(host, 'maxscale/threads', [
|
||||
{'ID': 'id'},
|
||||
{'Current File Descriptors': 'attributes.stats.current_descriptors'},
|
||||
{'Total File Descriptors': 'attributes.stats.total_descriptors'},
|
||||
{'Load Percentage (1s)': 'attributes.stats.load.last_second'},
|
||||
{'Load Percentage (1m)': 'attributes.stats.load.last_minute'},
|
||||
{'Load Percentage (1h)': 'attributes.stats.load.last_hour'}
|
||||
])
|
||||
})
|
||||
})
|
||||
.command('logging', 'Show MaxScale logging information', function(yargs) {
|
||||
return yargs.epilog('See `help alter logging` for more details about altering ' +
|
||||
'logging parameters.')
|
||||
|
Loading…
x
Reference in New Issue
Block a user