O GPUMGR é um gerente de GPU para Linux, permitindo uma linha de comando fácil/gerenciamento de interface da Web dos limites de energia da GPU, relógios, velocidades do ventilador e muito mais. O GPUMGR é sucessor espiritual multi-gpultural do amdpwrman.
O GPUMGR é uma ferramenta Linux para visualizar e gerenciar GPUs (potência, ventilador, relógios) tanto do shell quanto de uma interface da Web (WIP).
Reescrito no JS (NodeJS) para facilitar o codificação e a manutenção, especialmente a adição de outros fornecedores de GPU. Também nos permite ter uma solução de daemon melhor (do que um script de shell) e uma interface da web.
Como não é mais apenas um script de shell, obviamente há mais dependências: atualmente, praticamente apenas uma versão recente do NodeJS (10.7.0+). O desempenho também é melhor! amdpwrman show 0 no meu sistema leva 0m0.548s - A execução do GPUMGR do binário compactado é ~ 25% mais rápido que o AMDPWRMAN em 0m0.0398s .
Se você estiver usando a versão binária, precisará apenas de seus drivers de GPU e o que vem com eles.
A versão de origem requer nodejs 10.7.0+, npm 6.0.0+. O edifício requer PKG .
As GPUs da AMD precisam dos drivers AMDGPU ou AMDGPU-PRO, principalmente interface com o SYSFS .
As GPUs da NVIDIA precisam dos motoristas oficiais da NVIDIA, principalmente interface com as definições Nvidia-SMI e Nvidia . A troca de relógios provavelmente exigirá X, pois não estou ciente de uma maneira de fazê-lo além das definições de Nvidia e isso requer X.
Há também um Verison compilado/embalado binário para Linux no Bin/ , isso foi compilado/"embalado" com PKG e está simplesmente lá, então você tem uma opção rápida para subir e funcionar sem precisar instalar o NodeJS ou qualquer dependência.
Não confia no binário? Sem problemas! Você pode facilmente executar o script diretamente ou construí -lo sozinho; Run build.sh ou npm run build com PKG instalado e seu binário será exibido no Bin/ - Tecnicamente, você não precisa de NodeJs instalados para fazer a compilação, mesmo que o PKG faça o download dos binários apropriados; No entanto, a instalação do PKG requer NPM, que requer nodejs ..? Você pode construir facilmente para outras versões do NodeJS do que o que você instalou.
Você deseja executar npm ci para baixar os pacotes NPM apropriados, se desejar executar da fonte ou construção. npm run build também criará um binário para você.
Para baixar:
git clone https://github.com/Shaped/gpumgr.git
cd gpumgr
npm ci
Uma vez feito isso, você pode executar o script diretamente ou criar o binário com build.sh .
Para correr diretamente:
cd src
chmod 755 ./gpumgr.js
./gpumgr.js
Para construir e correr:
npm install pkg
./build.sh
cd bin
chmod 755 ./gpumgr
./gpumgr
O uso é bastante semelhante ao do amdpwrman - quase idêntico da linha de comando.
Você pode ligar diretamente para o script e o shebang chamará o NodeJS.
Se você não possui NodeJs, pode baixar a versão binária, que é simplesmente esse script pré-embalado com PKG com os nodejs e dependências necessários para executar.
gpumgr v0.0.8-alpha
gpumgr shows statistics and manipulates power limit settings for GPUs on
Linux through various interfaces provided by manufacturer's drivers, for
example, using the sysfs interface to interact with the amdgpu driver.
The original script (amdpwrman) was designed to be simple, easy to use and have
no dependencies, however, BASH scripting is kind of a pain so I decided to
rewrite this as a NodeJS app with an included (optional to use) web interface.
There will be an easy to use binary distribution of this, or you can just clone
the repo and run or build the script yourself.
Most commands will execute the command and exit. For example, using
'./gpumgr fan 50% 0' to set fan speed to 50% for GPU 0, gpumgr will simply set
it once and exit.
If you want fan speed monitoring or curve control or to use the web interface,
you must start the daemon. Once the daemon is running, you can manage settings
for your GPUs at http://127.0.0.1:1969 - or on whatever port you specified.
Usage:
gpumgr.js [command] <gpu> <options>
If <gpu> is omitted from any command, GPU0 is assumed.
<gpu> can be a comma separated list of GPU numbers.
<gpu> can be set to 'all' to affect ALL GPUs
<gpu> can be set to 'amd' to affect all AMD GPUs
<gpu> can be set to 'nvidia' to affect all Nvidia GPUs
<gpu> can be set to 'intel' to affect all Intel GPUs
Commands with no options or only GPU specified:
help | --help | -h Display this help message.
list <gpu> List available GPUs and their GPU#.
show <gpu> Show detailed statistics for <gpu>.
status <gpu> Same as above.
power <percent> <gpu> Set <gpu>'s power target to <percent>.
power reset <gpu> Reset default power limit for <gpu>.
recover <gpu> Attempt driver recovery mechanism for <gpu>.
fan enable <gpu> Enable manual fan control for <gpu>.
fan disable <gpu> Disable manual fan control for <gpu>.
fan [percent] <gpu> Set <gpu>'s fan speed to <percent>.
start <options> Starts the gpumgr.js service.
restart Soft Restarts the gpumgr.js service.
stop Stops the gpumgr.js service.
force restart Fully Restarts the gpumgr.js service.
force stop Kills the gpumgr.js service.
Options for Commands with Options:
[any] Any command with color output
-g | --no-colors Disable ANSI Color formatting
start Starts the gpumgr.js background service.
--port <number> Set which ipv4 port to listen on.
(eg. 1969, default is 4242)
--host <ip> Set which ipv4 host to listen on.
(eg. 0.0.0.0 or 127.0.0.1)
Examples:
gpumgr.js show nvidia Show status of all Nvidia GPUs
gpumgr.js list Intel List all Intel GPU#s
sudo gpumgr.js fan enable 0 Enable manual fan control for GPU0
sudo gpumgr.js fan disable all Enable auto fan control for all GPUs
sudo gpumgr.js fan 100% 0 Set GPU0 fan speed to 100%
sudo gpumgr.js start --port 4200 Start the background service on port 4200
0.01a - 12/07/21 - the beginning, able to show stats for AMD GPUs
0.02a - 12/08/21 - able to show some stats for nvidia GPUs as well
0.03a - 12/08/21 - service structure started
0.04a - 12/09/21 - fan control for amdgpu enabled
0.05a - 12/09/21 - some tidying up, build.sh updated for making release easier for me
0.0.6-alpha - 12/10/21 - more tidying up for build stuff, version numbering now npm friendly
0.0.7-alpha - 12/10/21 - basic power and fan management for both AMD and NVIDIA now working
0.0.8-alpha - 12/10/21 - added a splash of color, ability to disable colors and the missing 'list' command