Všechno Nové

user:thomas gists created by user

title:mygist gists with given title

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

Přihlásit se


Všechno Nové Přihlásit se

All gists matching topic Linux

Nedávno Vytvořeno
Nejméně nedávno Vytvořeno
Nedávno Aktualizováno
Nejméně nedávno Aktualizováno
santiago's Avatar

santiago / are_games_running.sh

0 Lajky
0 Forky
1 Soubory
Naposledy aktivní 1767277683
Check wattage of NVIDIA GPU returns 0 if above threshold of 30W
Linux NVIDIA gaming
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
Novější Starší

Vytvořeno pomocí Opengist ⋅ Load: 33ms⋅

Čeština
Čeština Deutsch English Español Français Magyar Italiano 日本語 Polski Português Русский Türkçe Українська 中文 繁體中文