GPUMGRは、LinuxのGPUマネージャーであり、GPU電源制限、クロック、ファン速度などの簡単なコマンドライン/Webインターフェイス管理を可能にします。 GPUMGRは、AMDPWRMANの多文化精神的後継者です。
GPUMGRは、シェルとWebインターフェイス(WIP)の両方からGPU(電源、ファン、時計)を表示および管理するためのLinuxツールです。
JS(nodejs)に書き直されて、特に他のGPUベンダーの追加をめぐるコードとメンテナンスが簡単になります。また、より優れたデーモンソリューション(シェルスクリプトよりも)とWebインターフェイスを持つこともできます。
それはもはやシェルスクリプトではないので、明らかに依存関係が増えています。現在、Nodejs(10.7.0+)の最近のバージョンだけです。パフォーマンスも優れています!私のシステムでamdpwrman show 0 0m0.548sにかかります-PackedバイナリからGPUMGRを実行するのは、 0m0.0398sのAMDPWRMANよりも約25%高速です。
バイナリバージョンを使用している場合は、GPUドライバーとそれらに伴うもののみが必要です。
ソースバージョンには、nodejs 10.7.0+、npm 6.0.0+が必要です。建物にはpkgが必要です。
AMD GPUには、主にSYSFとのインターフェイスがあり、AMDGPUまたはAMDGPU-PROドライバーが必要です。
Nvidia GPUには、主にNvidia-SmiおよびNvidiaセッティングとのインターフェースがあり、公式のNvidiaドライバーが必要です。クロックを変更すると、nvidiaセッティング以外の方法を知らないので、xが必要であり、xが必要であるため、xが必要になる可能性が最も高くなります。
また、 Bin/のLinux用のバイナリコンパイル/パッケージ化されたベリソンもあります。これは、 PKGでコンパイル/「パッケージ化」されており、単にそこにあるため、NodeJや依存関係をインストールせずに起きて実行する簡単なオプションがあります。
バイナリを信用しませんか?問題ない!スクリプトを直接実行するか、自分で作成することができます。 PKGがインストールされた状態でbuild.shまたはnpm run buildを実行すると、バイナリが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