GPUMGR은 Linux의 GPU 관리자로서 GPU 전력 제한, 시계, 팬 속도 등의 쉬운 명령 라인/웹 인터페이스 관리를 허용합니다. Gpumgr은 AMDPWRMAN의 다중 환경 영적 후계자입니다.
GPUMGR은 쉘과 웹 인터페이스 (WIP)에서 GPU (파워, 팬, 클럭)를보고 관리하기위한 Linux 도구입니다.
JS (Nodejs)로 다시 작성하여 특히 다른 GPU 공급 업체 추가와 관련하여 클리어와 유지 관리를보다 쉽게 코딩하고 유지 관리 할 수 있습니다. 또한 더 나은 데몬 솔루션 (쉘 스크립트보다)과 웹 인터페이스를 가질 수 있습니다.
더 이상 쉘 스크립트가 아니기 때문에 분명히 더 많은 종속성이 있습니다. 현재, 최근에는 Nodejs (10.7.0+)의 최근 버전 만 있습니다. 성능도 이제 더 좋습니다! 내 시스템에서 amdpwrman show 0 0m0.548s 차지합니다. 포장 된 바이너리에서 GPUMGR을 실행하는 것은 0m0.0398s 에서 AMDPWRMAN보다 ~ 25% 빠릅니다.
이진 버전을 사용하는 경우 GPU 드라이버와 함께 제공되는 것만 필요합니다.
소스 버전에는 nodejs 10.7.0+, npm 6.0.0+가 필요합니다. 건물에는 PKG 가 필요합니다.
AMD GPU는 AMDGPU 또는 AMDGPU-PRO 드라이버가 필요하며 대부분 SYSF 와의 인터페이스가 필요합니다.
NVIDIA GPU는 공식 NVIDIA 드라이버, 대부분 NVIDIA-SMI 및 NVIDIA-SETTINGS 와 인터페이스가 필요합니다. Nvidia-settings를 제외하고는 X를 요구하는 방법을 알지 못하고 X가 필요하기 때문에 변경 시계는 X가 필요할 것입니다.
빈/ 에 Linux 용 바이너리 컴파일/포장 Verison도 있습니다. 이것은 PKG 와 함께 컴파일/"포장"되었으며 간단히 거기에 있으므로 NodeJS 또는 종속성을 설치하지 않고도 업 및 실행할 수있는 빠른 옵션이 있습니다.
이진을 신뢰하지 않습니까? 괜찮아요! 직접 스크립트를 쉽게 실행하거나 직접 빌드 할 수 있습니다. run build.sh 또는 npm run build 설치된 상태에서 Bin/ - 기술적으로 Bin이 팝업되므로 PKG가 적절한 바이너리를 다운로드하더라도 빌드를 수행하기 위해 NodeJS가 설치 될 필요가 없습니다. 그러나 PKG를 설치하려면 NODEJS가 필요한 NPM이 필요합니다.? 설치 한 것보다 다른 버전의 nodejs를 쉽게 빌드 할 수 있습니다.
npm ci 실행하여 소스 또는 빌드에서 실행하려는 경우 적절한 NPM 패키지를 다운로드하려고합니다. npm run build 또한 이진을 구축합니다.
다운로드하려면 :
git clone https://github.com/Shaped/gpumgr.git
cd gpumgr
npm ci
일단 완료되면 스크립트를 직접 실행하거나 build.sh 로 바이너리를 빌드 할 수 있습니다.
직접 실행하려면 :
cd src
chmod 755 ./gpumgr.js
./gpumgr.js
구축 및 실행 :
npm install pkg
./build.sh
cd bin
chmod 755 ./gpumgr
./gpumgr
사용법은 AMDPWRMAN의 사용과 매우 유사합니다. 명령 줄과 거의 동일합니다.
스크립트를 직접 호출하면 Shebang이 Nodejs를 호출합니다.
Nodejs가없는 경우 필요한 Nodejs와 실행할 종속성으로 PKG 로 사전 포장 된이 스크립트 인 바이너리 버전을 다운로드 할 수 있습니다.
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