検査ソフトを作る１− グラフィック周り

# 個人はもちろん、会社のお金がない！＠
:::note info
インフォメーション
- 一応仕事として自社用のメモ
- ただし、そのまま提出してもスルーなのでQiitaに公開
- 社外秘はない
- 初心者向け
:::

## nvidia-smiで今更
- GPUの使用率をあまり気にしてなかった
- VRAM容量や消費電力ばかりみていました・・・
- 展開した中の顔文字がうっかり見ていなかった部分です


<details><summary>負荷なし状態</summary>

```Ubuntu:ターミナル

nvidia-smi
Thu Aug  1 10:09:56 2024       
+---------------------------------------------------------------------------------------+
| NVIDIA-SMI 545.29.06              Driver Version: 545.29.06    CUDA Version: 12.3     |
|-----------------------------------------+----------------------+----------------------+
| GPU  Name                 Persistence-M | Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp   Perf          Pwr:Usage/Cap |         Memory-Usage | GPU-Util  Compute M. |
|                                         |                      |               MIG M. |
|=========================================+======================+======================|
|   0  NVIDIA GeForce RTX 3090        Off | 00000000:10:00.0  On |                  N/A |
| 44%   52C    P8              47W / 350W |    586MiB / 24576MiB |   😉 2%      Default |
|                                         |                      |                  N/A |
+-----------------------------------------+----------------------+----------------------+
                                                                                         
+---------------------------------------------------------------------------------------+
| Processes:                                                                            |
|  GPU   GI   CI        PID   Type   Process name                            GPU Memory |
|        ID   ID                                                             Usage      |
|=======================================================================================|
|    0   N/A  N/A      2600      G   /usr/lib/xorg/Xorg                          319MiB |
|    0   N/A  N/A      2919      G   /usr/bin/gnome-shell                         79MiB |
|    0   N/A  N/A      5367      G   ...irefox/4650/usr/lib/firefox/firefox      167MiB |
+---------------------------------------------------------------------------------------+




```

</details>


<details><summary>負荷なし状態</summary>

```Ubuntu:ターミナル

nvidia-smi
Thu Aug  1 08:43:51 2024       
+---------------------------------------------------------------------------------------+
| NVIDIA-SMI 545.29.06              Driver Version: 545.29.06    CUDA Version: 12.3     |
|-----------------------------------------+----------------------+----------------------+
| GPU  Name                 Persistence-M | Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp   Perf          Pwr:Usage/Cap |         Memory-Usage | GPU-Util  Compute M. |
|                                         |                      |               MIG M. |
|=========================================+======================+======================|
|   0  NVIDIA GeForce RTX 3090        Off | 00000000:10:00.0  On |                  N/A |
|  0%   60C    P0             233W / 350W |    596MiB / 24576MiB |   🫡ここ  93%      Default |
|                                         |                      |                  N/A |
+-----------------------------------------+----------------------+----------------------+
                                                                                         
+---------------------------------------------------------------------------------------+
| Processes:                                                                            |
|  GPU   GI   CI        PID   Type   Process name                            GPU Memory |
|        ID   ID                                                             Usage      |
|=======================================================================================|
|    0   N/A  N/A      2600      G   /usr/lib/xorg/Xorg                          339MiB |
|    0   N/A  N/A      2919      G   /usr/bin/gnome-shell                         79MiB |
|    0   N/A  N/A      5367      G   ...irefox/4650/usr/lib/firefox/firefox      151MiB |
|    0   N/A  N/A     31972      G   python                                        4MiB |
+---------------------------------------------------------------------------------------+





```

</details>

# 今日の産物

https://github.com/mi-kaneyon/man-yard/tree/main/gpu_testpack

- 30分まで　2D,3Dの　描画負荷をかけている
- VRAM/電力量は別に作成したスクリプトよりは抑えめ
- 将来的には他のIO系などを検査するソフトの1部に使用

:::note info
Information for English users
- English explanation is described in the github README.md
:::