Opengist

Explore

  • All gists
  • Topics
  • Users
Give feedback on the new UI Powered by Opengist ⋅ 23ms

user:thomas gists created by user

title:mygist gists with given title

description:sync gists with given description

filename:myfile.txt gists having files with given name

extension:yml gists having files with given extension

language:go gists having files with given language

topic:homelab gists with given topic

all:systemctl search all fields

Login
g

gaming

Recently created Least recently created Recently updated Least recently updated
santiago

santiago / are_games_running.sh

Last active 1 hour ago Linux NVIDIA gaming

Check wattage of NVIDIA GPU returns 0 if above threshold of 30W

0 0 1
1 #!/usr/bin/env bash
2 set -euo pipefail
3
4 POWER_LIMIT=30
5
6 power="$(nvidia-smi --query-gpu=power.draw --format=csv,noheader,nounits 2>/dev/null | head -n1)"
7
8 if [[ -z "$power" ]]; then
9 echo "OOPS: cannot read GPU power - check nvidia GPU driver"
10 exit 1