diff --git a/modules/console.cc b/modules/console.cc index 0a7cc2679..156bc2d93 100644 --- a/modules/console.cc +++ b/modules/console.cc @@ -1377,6 +1377,38 @@ console_cmd__key__fetch(opt &out, const string_view &line) return true; } +// +// vm +// + +bool +console_cmd__vm__events(opt &out, const string_view &line) +{ + const params param{line, " ", + { + "start", "[limit]" + }}; + + const uint64_t start + { + param.at(0, uint64_t(-1)) + }; + + size_t limit + { + param.at(1, 32) + }; + + m::vm::events::rfor_each(start, [&out, &limit] + (const uint64_t &seq, const m::event &event) + { + out << seq << " " << pretty_oneline(event) << std::endl;; + return --limit; + }); + + return true; +} + // // event //