NashTech

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

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

Introduction

NashTech conceptualised 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.

System administrators often have to deal with situations with sluggish and unresponsive applications, either due to high CPU, memory, or network utilisation. 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.

Impact

  • Deeper visibility into the system performance
  • Monitor KPIs such as CPU & memory usage
  • Automated memory management or running processes

Challenges

Why were we inspired to build a System Monitoring tool?

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

We wanted to build a real-time tool that will periodically monitor the system’s state and resolve any conflicts related to memory utilisation 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 conceptualised 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.
A system monitoring tool’s main purpose is to manage a company’s IT infrastructure by:

Solution

How does Procespy solve the problem?

Predefined configurations for each process

Procespy was able to manage memory utilisation 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-technical-architecture
  • 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.

Results

  • Deeper visibility into the health and performance of the system processes by keeping track of memory utilisation.
  • 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.

Read more case studies

From rising above adversity to riding the wave of digital transformation in the education sector

Explore how NashTech help Trinity College London ride the wave of digital transformation in the education sector

Migrating and modernising the virtual learning environment to AWS for an enhanced experience

The migrated and modernised Moodle infrastructure means that The Open University can now take advantage of cloud benefits.

A glimpse into a year-long RPA journey with a leading digital advertising service

A glimpse into a year-long RPA journey with a leading digital advertising services and solutions provider and how NashTech helped them.

Our partnerships

Scroll to Top
SAMPLE TITLE
sample short
sample heading lorem isump
FREE WHITEPAPER
Unlock the power of knowledge with our new whitepaper
“Elevating User Experience for Product Owners”
FREE WHITEPAPER
Unlock the power of knowledge with our new whitepaper
“Elevating User Experience for Product Owners”