DEV Community

Md. Mahmudul Hasan Mabud
Md. Mahmudul Hasan Mabud

Posted on

Installing SysLens: A Lightweight Linux System Information Tool

If you are a Linux enthusiast or a developer, you know the importance of quickly checking your system’s health, hardware specifications, and resource usage. SysLens is a lightweight, terminal-based tool written in C that provides a real-time snapshot of your system by reading the Linux /proc filesystem.

In this guide, I’ll walk you through installing SysLens on your Linux machine, compiling it from source, and optionally installing it system-wide.


Prerequisites

Before you start, make sure you have:

A Linux-based operating system (Ubuntu, Debian, Fedora, Arch, etc.)

gcc or clang compiler installed

make utility

Basic terminal knowledge


Step 1: Clone the Repository

First, clone the SysLens GitHub repository to your local machine:

git clone https://github.com/mahmudul626/syslens.git
cd syslens


Step 2: Build from Source

SysLens uses a simple Makefile for compilation. To build the project:

make

If successful, this will create an executable named syslens in the project directory.


Step 3: Run SysLens

Run the tool directly from the terminal:

./syslens

You’ll see three sections:

  1. System Info: OS name, kernel version, CPU model, uptime, and current user.

  2. Resource Usage: RAM, swap usage, and load averages with visual progress bars.

  3. Active Processes: Total tasks, running, sleeping, and zombie processes.

You can also use flags to display specific sections:

./syslens -s # System info only
./syslens -m # Resource usage only
./syslens -p # Active processes only
./syslens --version
./syslens --help


Step 4: Optional System-wide Installation

To make SysLens accessible from anywhere on your system:

sudo make install

This will copy the executable to /usr/bin/syslens. Now you can simply run:

syslens

To uninstall:

sudo make uninstall


Step 5: Testing & Validation

SysLens has been designed to work on multiple Linux distributions. You can validate its performance using tools like:

valgrind – for memory leak detection

cppcheck – for static code analysis

These are already integrated in the CI/CD workflow if you are contributing or compiling from the source.


Conclusion

SysLens is a lightweight, fast, and reliable Linux CLI tool to monitor your system. Whether you are a developer, sysadmin, or hobbyist, it provides an instant overview of your system’s health and performance.

Try it out, contribute, or suggest improvements on GitHub.

Top comments (1)

Collapse
 
mahmudul626 profile image
Md. Mahmudul Hasan Mabud

❤️