💻 Top


Task

I wanted to write a program that would simulate the kinds of information that the terminal displays after the top command is entered into it in a cross-compatible fashion.

Solution

In order to implement the task I came up with, I utilized the psutil library. I was able to grab most of the information at the system level as well as most of the process information from the ones that a process has access to see. I was able to do this process for the main 3 operating systems: MacOS, Windows, and Linux/Ubuntu.

https://github.com/burgess01/top