The last time we mentioned kcli top in a blog post was back in July 2024, when we looked at the newly released KumoMTA Command Line Interface (kcli) in general. The kcli was new and shiny, with all the basics customers were asking for, but since then it has evolved into a much more powerful tool.
One area that has seen significant change is the TOP function. Following some productive feedback from our user community, we made several changes worth discussing and documenting.
What is “top”?
I read somewhere - likely an AI hallucination - that it is an acronym for “Table of Processes”, which kinda sounds right, but according to the guy who wrote Linux top, it really is a tool to show the top CPU-consuming processes. Thank you, Roger, my life would be different without top.
If you have ever used any flavour of Linux, you have likely used TOP, HTOP, or one of its variants to monitor resource usage. KumoMTA’s kcli top (ktop) is a similar tool, except that it is very specific to KumoMTA and the email resources it manages. We built ktop as a key diagnostic tool to help MailOps engineers monitor MTA server resources.
The ktop basics.
A MailOps engineer can invoke ktop with a “kcli top” command in any terminal window. What you will see is a list of all email-related processes that consume resources, along with current counts and rates that matter, such as open connections, receptions and deliveries per second, and memory usage.
Just looking at this one view, most email geeks will see the immense value of having all this real-time resource data in one place. Like the original top, the most important items are at the top, and the list will change dynamically as resources are used. We show the raw numbers (counts, rates, and averages) on the right, and it builds a histogram on the left.
But wait, there’s more…
Sometimes, in a very active system, the list of resources can get very large and complex. In the past several months, many improvements have been made to ktop, including the ability to scroll through the list with arrow keys and search for specific metrics. There are also now multiple tabs available to switch through.
On any kcli top screen, you can use your keyboard up and down arrows to scroll through the list of metrics, which is important because the list will dynamically change as resources change. This is also important because sometimes you are interested in averages, sometimes you are interested in frequencies, and sometimes you just need a raw count. These are all in different sections of the list.
But this can be a very large list, and you may only want to see specific data in a single view, which is why there is now a “FIND” function. Press “f” and start typing the name of the resource you want to monitor. For instance, if you wanted to see all of the metrics to do with the core SMTP service, you could press "f" then “smtpsrv” to show all resources with that keyword, regardless of type, as shown below.
But wait, that histogram is pretty small and hard to read, right? You can press “+” to increase the size or “-” to decrease it. Press TAB to move to the next tab of corresponding heatmaps while maintaining the filter you selected. Again, this is scrollable and searchable.
Another TAB and you will see the usage instructions I mentioned above in this article. In accordance with our general design philosophy, this tool was built for growth and flexibility, so adding another TAB can be done with relative ease if needed.
The kcli top function was built to support - and keeps improving because of - our awesome user community. This is just one of the many tools built specifically to enhance control and visibility for the MailOps engineers driving today's complex email ecosystem.
Has kcli helped you? Let us know. We would love to tell your story.
------------------------------------------------------------------
KumoMTA is the first open-source MTA designed from the ground up for the world's largest commercial senders. We are fueled by Professional Services and Sponsorship revenue.
Join the Discord | Review the Docs | Read the Blog | Grab the Code | Support the team