Git Product home page Git Product logo

cpp-system-monitor's Introduction

Linux System Monitor

A system monitor for Linux developed in C++ 17 like the htop utility based on the ncurses display.

This implementation is based on the starter code for System Monitor Project in the Object Oriented Programming Course of the Udacity C++ Nanodegree Program.

System Monitor

ncurses

ncurses is a library that facilitates text-based graphical output in the terminal. This project relies on ncurses for display output.

You can install ncurses within your own Linux environment: sudo apt install libncurses5-dev libncursesw5-dev

How to build

  1. Clone the project repository: git clone https://github.com/itornaza/cpp-system-monitor.git

  2. Build the project: make build

  3. Run the resulting executable: ./build/monitor

Make

This project uses Make. The Makefile has four targets:

  • build compiles the source code and generates an executable
  • format applies ClangFormat to style the source code
  • debug compiles the source code and generates an executable, including debugging symbols
  • clean deletes the build/ directory, including all of the build artifacts

System information

System information for the process manager is derived from the following system files:

  1. Kernel information - /proc/version
  2. Operating system - /etc/os-release
  3. Memory utilization - /proc/meminfo
  4. Total processes - /proc/meminfo
  5. Running processes - /proc/meminfo
  6. Up time - /proc/uptime
  7. CPU usage - /proc/stat

Processes information also resides mainly in the /proc/ directory:

  1. PID - /proc/[pid] where pid is in any directory having an integer for its name
  2. UID - /proc/[pid]/status
  3. Username - /etc/passwd
  4. Processor utilization - /proc/[pid]/stat
  5. Memory utilization - /proc/[pid]/stat
  6. Command - /proc/[pid]/cmdline

More information about proc in the man page or enter man proc at the command line.

cpp-system-monitor's People

Contributors

itornaza avatar ryan-keenan avatar delvingdeep avatar haoyang-udacity avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.