You may now use
/threadreport task which will enable/disable the capture of automatic thread dumps at a five-second interval.
This feature is helpful in case your server is stuck and you are unable to execute commands. Before your server is stuck, enable automatic thread dumps with this command.