Knoldus aces Memory Management with a System Monitoring Tool built on Rust

  • project-icon

    Partner: Procespy

  • tech-icon

    Technologies Used: Rust, Cargo

  • domain

    Domain: System Monitoring

Results Highlights:


Deeper visibility

into the system performance


Monitor KPIs

such as CPU & memory usage


Automated memory management

for running processes

Why do we need system monitoring tools?

System administrators often have to deal with situations with sluggish and unresponsive applications either due to high CPU, memory, or network utilization. It is easy to manage resources when a server hosts a single process. However, that is not the case when multiple services are running on a shared server and one needs to track how much resource is being consumed by every running process.

A system monitoring tool’s main purpose is to manage a company’s IT infrastructure by:

  • Monitoring the performance of operating systems

  • Effectively managing the system resources

  • Helping in process & system debug

  • Monitoring devices such as servers, storage devices, desktop computers, printers, and mobile devices.

Challenges: Why were we inspired to build a System Monitoring tool?

Knoldus felt the need for an efficient & fast application monitoring tool to fully manage the performance of processes on a system in terms of memory utilization . The idea was to help developers ensure that no critical process on their system is hampered because of the overutilization of memory by any other process.

We wanted to build a real-time tool that will periodically monitor the state of the system and resolve any conflicts related to memory utilization by the running processes. By automating this process, developers will not have to worry about high priority processes getting disrupted or manually managing memory to prevent the same.

To address these challenges we conceptualized Procespy, a process monitoring tool for Linux distributions that enables a user to automate the process of tracking the running processes and monitor them for RAM usage.

The major challenge that we faced while creating this tool was the retrieval of information regarding every possible application & process running on a system and the amount of memory they use to execute successfully.

Solutions: How does Procespy solve the problem?

Predefined configurations for each process
Procespy was able to manage memory utilization of all applications & processes as we defined configurations for each one of them in terms of the process names and the maximum amount of memory that can be allocated to them at a given point in time.

Termination of processes that exceed the threshold
If any process crosses the threshold assigned to them, which simply means it is using a higher amount of memory than what is permitted for it, then that particular process will be terminated to resolve the conflict.

Alerts & notifications
The user will be notified of this termination activity via a popup alert on the screen with a message giving details of the terminated process. Procespy also auto-generates an email indicating the status of the terminated service to the user.

Scheduled examination of the system
Procespy schedules itself in such a way that it conducts a system audit after a particular time interval to monitor the status of running processes in real-time.

Technical solution

Procespy study
  • While developing Procespy, we first had to create the configuration file which lists down the names of all processes and the limit for the amount of memory that each of these processes was allowed to use. Procespy fetches the relevant process names and memory requirements from this configuration file after it has monitored the currently running applications on the system. After the tool validates these running processes, the ones which are exceeding their memory limits are terminated before generating alerts.

  • To overcome the challenge of retrieving the process names and their memory usage details, our developers used the Linux based Bash command called ‘ps’ (process status). The ps command is used when the user needs information regarding the currently running processes, including their unique process identification numbers (PIDs).

  • The bash command was accompanied by the filters for extracting the PID, process name, memory consumption, and later sorting all processes as per the memory usage requirements in descending order.

  • We chose the Rust programming language as monitoring tools need to be lightweight so that they do not interfere with the main processes running on a machine. Rust gave us the flexibility to write fast & efficient code. We used the ‘subprocess’ library in Rust with the Linux bash command to help execute the filters.


  • Deeper visibility into the health and performance of the system processes by keeping track of memory utilization.

  • Monitor key performance indicators of resource usage trends such as CPU & memory usage.

  • Procespy automated the process of memory management for running processes & applications on a system and greatly reduced the manual effort associated with it.

Download the detailed version of the case study:

Building a system monitoring tool? Get in touch with us

Whether your business is in the startup stage or at an enterprise level, monitoring is essential to make sure that your systems & networks are in good health and deliver high performance. Whether it comes to monitoring your networks, servers, applications or workstations, Knoldus can help you build the right tools for you to rely on so that you can focus on what really matters. Our Rust experts will hear out your requirements so that they can build fast & efficient, tailor-made solutions for you.

Reach out to us at or contact us here.

Relevant Resources

Knoldus builds a Protocol Surveillance tool to enhance network security


Prolance is a Protocol Surveillance tool that can monitor the protocols running on a particular server. So with the help of this tool, we can keep track of all the protocols.

Hawk: Image Recognition Application using Rust and AWS Services


Hawk, an image recognition system, with the Rust Programming Language and AWS services. It enhances the security of the concerned premises by helping the management gather information to uncover patterns in time.

Conf-Count: Conference Monitoring System Based On Image Recognition In Rust
Conf Count-A Rust based IOT application


Conf-Count: Conference Monitoring System based on Image Recognition in Rust

Schedule a meeting