Coder Social home page Coder Social logo

gpu_status_moniter_overlay's Introduction

gpu_status_moniter_overlay

This project sets up a Conky-based overlay to display GPU status information directly on the desktop. It leverages conky, a lightweight, scriptable system monitor, to fetch and display GPU metrics such as temperature, power usage, memory usage, and utilization.

Conky Configuration (gpu_status_conky.conf)

The Conky configuration file specifies the GPU metrics to monitor, along with Conky's appearance and behavior. Key settings include:

update_interval: How often Conky updates the data.

own_window_type: Defines how Conky's window is treated by the window manager. We explored using override to make it an overlay but settled on alternatives like dock for compatibility.

own_window_hints: Additional window properties like undecorated, above, and sticky to control the decoration and placement.

own_window_argb_visual and own_window_argb_value: Enable transparent backgrounds for the overlay.

This file also uses nvidia-smi commands within template blocks to fetch real-time GPU statistics.

Systemd Service (gpu_status_conky.service)

The systemd service file allows us to manage the Conky overlay as a service, offering commands to start, stop, and restart the overlay, and ensuring it runs automatically on system startup.

Key Components:

[Unit]: Describes the service, dependencies, and when it should start.

[Service]: Specifies how the service is run, including the user context, environment variables (like DISPLAY for GUI applications), and the command to start Conky with our configuration file.

[Install]: Determines when the service should be automatically started. WantedBy=graphical.target ensures it starts with the graphical desktop.

The service file explicitly sets DISPLAY=:0 to address issues where Conky cannot find the display when started by systemd, a common scenario for services trying to run graphical applications.

Modify this by accordingly to your display id, (echo $DISPLAY)

Make sure you also replace USERNAME with your actual username

Setup Instructions

Install Conky: Ensure Conky is installed on your system.

Configure Conky: Create the gpu_status_conky.conf file with the desired GPU metrics and appearance settings.

Set Up the Service: Create the gpu_status_conky.service file in /etc/systemd/system/, specifying the user and pointing to your Conky configuration.

Enable and Start the Service: Use systemctl commands to enable the service to start at boot and to start it immediately.

Managing the Service

Reload: sudo systemctl daemon-reload Start: sudo systemctl start gpu_status_conky.service Stop: sudo systemctl stop gpu_status_conky.service Status: sudo systemctl status gpu_status_conky.service Enable on Boot: sudo systemctl enable gpu_status_conky.service

Security Considerations

The xhost +SI:localuser:YOUR_USERNAME command grants the specified user permission to access your X session. Use this command judiciously, especially on multi-user systems.

gpu_status_moniter_overlay's People

Contributors

asypher avatar crazysuryaa avatar

Watchers

 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.