GPUMGR هو مدير GPU لـ Linux ، مما يسمح بإدارة سطر الأوامر/واجهة الويب السهلة لحدود طاقة GPU والساعات وسرعات المروحة والمزيد. GPUMGR هو خليفة روحي متعددة الجثث لـ AMDPWRAN.
GPUMGR هي أداة Linux لعرض وإدارة وحدات معالجة الرسومات (الطاقة ، المروحة ، الساعات) سواء من القشرة ومن واجهة الويب (WIP).
إعادة كتابة في JS (Nodejs) لتسهيل الترميز والصيانة ، خاصة حول إضافة بائعي GPU الآخرين. يسمح لنا أيضًا أن يكون لدينا حل خفي أفضل (من البرنامج النصي shell) وواجهة ويب.
نظرًا لأنه لم يعد مجرد نص Shell ، فمن الواضح أن هناك المزيد من التبعيات: حاليًا ، إلى حد كبير مجرد نسخة حديثة من Nodejs (10.7.0+). الأداء هو أيضا أفضل الآن! amdpwrman show 0 على نظامي يستغرق 0m0.548s - تشغيل GPUMGR من الثنائي المعبأ أسرع بنسبة 25 ٪ من AMDPRAN في 0m0.0398s .
إذا كنت تستخدم الإصدار الثنائي ، فيجب أن تحتاج فقط إلى برامج تشغيل GPU وما يأتي معهم.
يتطلب الإصدار المصدر NodeJS 10.7.0+ ، NPM 6.0.0+. المبنى يتطلب PKG .
تحتاج وحدات معالجة الرسومات AMD إلى برامج تشغيل AMDGPU أو AMDGPU-PRO ، ومعظمها واجهات مع SYSFs .
تحتاج NVIDIA GPUS إلى سائقي NVIDIA الرسميين ، ومعظمهم واجهات مع NVIDIA-SMI و NVIDIA . سيتطلب تغيير الساعات على الأرجح x لأنني لست على دراية بالطريقة للقيام بذلك بصرف النظر عن مواد NVIDIA وهذا يتطلب X.
هناك أيضًا Verison المترجمة/المعبأة في Linux في Bin/ ، وقد تم تجميعها/"تعبئتها" مع PKG وهو ببساطة هناك خيار سريع للاستعداد والتشغيل دون الحاجة إلى تثبيت NodeJs أو أي تبعيات.
لا تثق بالثنائي؟ لا مشكلة! يمكنك بسهولة تشغيل البرنامج النصي مباشرة أو بناءه بنفسك ؛ Run build.sh أو npm run build مع تثبيت PKG وسوف يظهر ثنائي في Bin/ - من الناحية الفنية ، لا تحتاج إلى تثبيت Nodejs للقيام بالبناء حتى لأن PKG ستقوم بتنزيل الثنائيات المناسبة ؛ ومع ذلك ، فإن تثبيت PKG يتطلب npm الذي يتطلب nodejs ..؟ يمكنك بسهولة بناء إصدارات أخرى من NodeJs أكثر من ما قمت بتثبيته.
ستحتاج إلى تشغيل npm ci لتنزيل حزم NPM المناسبة إذا كنت ترغب في التشغيل من Source أو Build. سيؤدي 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 ، فيمكنك تنزيل الإصدار الثنائي الذي هو ببساطة هذا البرنامج النصي المليء مسبقًا باستخدام PKG مع NodeJs المطلوبة والتبعيات لتشغيلها.
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