- Update to version 3.1.0+89:

* Add missing i915_drm.h structs/definitions.
  * Fix AMDGPU free memory calculation.
  * Include xe_drm.h until it mades it into libdrm.
  * Apply suggestions from code review.
  * Display total memory if available.
  * Add gtt to memory usage.
  * Add i915 compute and fix xe compute + edit readme.
  * Add xe encode/decode support.
  * Split fdinfo and implement GPU utilisation.
  * Split i915 & xe, implement xe ioctls and memory usage.
  * Add support for using i915 ioctls & implement memory usage
    using this.
  * Use bool, not NCURSES bool.
  * Display fan RPM when max is not available.
  * Avoid deref udev null device on unref.
  * v3d: migrate to standardised fdinfo info and add per-process
    gpu memory support.
  * Calculate power consumption for Xe driver.
  * Calculate power consumption based on energy usage.
  * Include libdrm for builds with panfrost and panthor support.
  * Remove Intel GPU warning.
  * i915 has drm-total-local0 (now?) for memory Also fix a logic
    error.
  * Fix process list randomly hiding in builds.
  * Add Intel temp support Currently being worked on in Intel's
    kernel branch: https://patchwork.freedesktop.org/series/137874.
  * Add Intel fan support Now present in kernel 6.12
    https://patchwork.freedesktop.org/patch/610458.
  * Update CMakeLists.txt
  * Add the necessary source file device_discovery_linux.c for
    V3D_SUPPORT in CMakeLists.txt.
  * Update README.
  * Convert tid to pgid to match the process's pid.
  * Fix some typos.
  * Add the videocore support documentation.
  * Fix strncat warning.
  * Print some debug messages.
  * Add decode info for h264 decode.
  * Move info read functions to utils and add some info from vcio
    device.
  * Add process gpu usage support for raspberrypi.
  * Add basic support for raspberrypi gpu.
- Add nvtop-fix-non-void-function.patch: Fix control reaches end of
  non-void function error, (gh#Syllo/nvtop#350).

OBS-URL: https://build.opensuse.org/package/show/utilities/nvtop?expand=0&rev=14
This commit is contained in:
Malcolm Lewis 2024-12-29 05:28:55 +00:00 committed by Git OBS Bridge
commit a75b53d043
12 changed files with 518 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@ -0,0 +1,23 @@
## Default LFS
*.7z filter=lfs diff=lfs merge=lfs -text
*.bsp filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.gem filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.jar filter=lfs diff=lfs merge=lfs -text
*.lz filter=lfs diff=lfs merge=lfs -text
*.lzma filter=lfs diff=lfs merge=lfs -text
*.obscpio filter=lfs diff=lfs merge=lfs -text
*.oxt filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.rpm filter=lfs diff=lfs merge=lfs -text
*.tbz filter=lfs diff=lfs merge=lfs -text
*.tbz2 filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.txz filter=lfs diff=lfs merge=lfs -text
*.whl filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
.osc

19
_service Normal file
View File

@ -0,0 +1,19 @@
<services>
<service mode="disabled" name="obs_scm">
<param name="url">https://github.com/Syllo/nvtop.git</param>
<param name="scm">git</param>
<param name="submodules">enable</param>
<param name="changesgenerate">enable</param>
<param name="changesauthor">malcolmlewis@opensuse.org</param>
<param name="filename">nvtop</param>
<param name="versionformat">@PARENT_TAG@+@TAG_OFFSET@</param>
<param name="versionrewrite-pattern">(.*)\+0</param>
<param name="versionrewrite-replacement">\1</param>
</service>
<service mode="buildtime" name="tar"/>
<service mode="buildtime" name="recompress">
<param name="file">*.tar</param>
<param name="compression">xz</param>
</service>
<service mode="disabled" name="set_version"/>
</services>

4
_servicedata Normal file
View File

@ -0,0 +1,4 @@
<servicedata>
<service name="tar_scm">
<param name="url">https://github.com/Syllo/nvtop.git</param>
<param name="changesrevision">19382d93086acf36f32a8d72173fb9968232e3c1</param></service></servicedata>

3
nvtop-3.1.0+38.obscpio Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:759a43550c5b2c3f931dbb2355ec6052c34955255acbff76dd3fa349f5b341ad
size 896524

3
nvtop-3.1.0+89.obscpio Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:895b0a90f9bccf660c665023d4e14b063ec4255d0da9b005151e6dc8c6c28062
size 995340

3
nvtop-3.1.0.obscpio Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:0c23f2f3860a209ce8f6f1c39c5f2c6a17177c2e872d1e4564b6194e90c04665
size 881164

3
nvtop-3.1.0.tar.xz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:0bc618de9dd4178eec2cbf8fb2a43fe1c0da4f66b9446dfe63ef644392d2b971
size 232684

View File

@ -0,0 +1,11 @@
diff -Naur a/src/extract_gpuinfo_intel.c b/src/extract_gpuinfo_intel.c
--- a/src/extract_gpuinfo_intel.c 2024-12-13 16:39:32.000000000 -0600
+++ b/src/extract_gpuinfo_intel.c 2024-12-24 19:23:07.361394139 -0600
@@ -87,6 +87,7 @@
case DRIVER_XE:
return parse_drm_fdinfo_intel_xe(info, fdinfo_file, process_info);
}
+ return false;
}
static void add_intel_cards(struct nvtop_device *dev, struct list_head *devices, unsigned *count) {

378
nvtop.changes Normal file
View File

@ -0,0 +1,378 @@
-------------------------------------------------------------------
Wed Dec 25 01:10:39 UTC 2024 - malcolmlewis@opensuse.org
- Update to version 3.1.0+89:
* Add missing i915_drm.h structs/definitions.
* Fix AMDGPU free memory calculation.
* Include xe_drm.h until it mades it into libdrm.
* Apply suggestions from code review.
* Display total memory if available.
* Add gtt to memory usage.
* Add i915 compute and fix xe compute + edit readme.
* Add xe encode/decode support.
* Split fdinfo and implement GPU utilisation.
* Split i915 & xe, implement xe ioctls and memory usage.
* Add support for using i915 ioctls & implement memory usage
using this.
* Use bool, not NCURSES bool.
* Display fan RPM when max is not available.
* Avoid deref udev null device on unref.
* v3d: migrate to standardised fdinfo info and add per-process
gpu memory support.
* Calculate power consumption for Xe driver.
* Calculate power consumption based on energy usage.
* Include libdrm for builds with panfrost and panthor support.
* Remove Intel GPU warning.
* i915 has drm-total-local0 (now?) for memory Also fix a logic
error.
* Fix process list randomly hiding in builds.
* Add Intel temp support Currently being worked on in Intel's
kernel branch: https://patchwork.freedesktop.org/series/137874.
* Add Intel fan support Now present in kernel 6.12
https://patchwork.freedesktop.org/patch/610458.
* Update CMakeLists.txt
* Add the necessary source file device_discovery_linux.c for
V3D_SUPPORT in CMakeLists.txt.
* Update README.
* Convert tid to pgid to match the process's pid.
* Fix some typos.
* Add the videocore support documentation.
* Fix strncat warning.
* Print some debug messages.
* Add decode info for h264 decode.
* Move info read functions to utils and add some info from vcio
device.
* Add process gpu usage support for raspberrypi.
* Add basic support for raspberrypi gpu.
- Add nvtop-fix-non-void-function.patch: Fix control reaches end of
non-void function error, (gh#Syllo/nvtop#350).
-------------------------------------------------------------------
Thu Oct 24 00:18:09 UTC 2024 - malcolmlewis@opensuse.org
- Update to version 3.1.0+38:
* Add missed '&&".
* Revert back to the Xe driver device for the PCIe link.
* Get per-process memory from fdinfo for Xe.
* Don't require hwmon for AMDGPU.
* Fix potential null device access.
* Re-introduce non-cached devices.
* Hide process list option in setup window & config file.
* Add Intel Xe driver support.
* Add i915 hwmon power values.
* Hide process list window.
* Fix screenshot URLs in appstream.
* Fix icon in appstream.
* amgdpu: video code engine version extraction.
* Update readme's supported targets paragraph.
* Support for recent NVML API.
* Video encode/decode shared by static instance.
* Remove import of kcmp.
- Remove tar.xz file from source as we use obscpio.
-------------------------------------------------------------------
Fri Apr 12 13:07:30 UTC 2024 - Andrea Manzini <andrea.manzini@suse.com>
- Update to version 3.1.0:
* MSM: Ignore speedbin in id if exact id isn't found
* Add support for Adreno 750
* Fix save w/o config location path
* interface_options: handle both XDG_CONFIG_HOME and HOME being unset
* Prevent potential Ascend device name buffer overflow
* remove temp file
* fix issues for PR
* Toggle Panfrost's sysfs profiling hook after DRM handle is retrieved
* add ascend build script and README
* add ascend extract gpu info code
* GPU info bar option in F2 menu
* Save GPU info bar option to config file
* Fix related to pull request #248
* Refactor Panthor and Panfrost into library of shared code
* Add support for Mali CSF GPUs with the Panthor driver.
* Add Panfrost support for manual calculation of engine utilisation
* Add support for post-fdinfo processing calculation of utilisation
* Add support for Panfrost display of additional GPU properties
* Add display of additional GPU features
* Add support for Mali GPUs with the Panfrost driver
-------------------------------------------------------------------
Wed Oct 25 02:13:50 UTC 2023 - malcolmlewis@opensuse.org
- Update to version 3.0.2+31:
* Fix cache_entry for Intel and AMD GPU.
* Fix compilation warnings.
* Disable fdinfo callbacks for hidden gpus.
* Split off linux-specific files from build.
* cmake: use check_linker_flag for checking linker flags.
* Clarify warning messages for Intel and MSM GPUs.
* Added Apple support.
-------------------------------------------------------------------
Thu Jun 22 13:00:22 UTC 2023 - andrea.manzini@suse.com
- Update to version 3.0.2+2:
* Fix a potential issue when using multiple AMDGPUs.
* Fix amdgpu wrong tx/rx computation
* Remove workaround for driver bug
* Uniqueness is pdev+id on amdgpu
* Uniqueness is pdev+id on intel
* README MSM information.
* MSM and Adreno support
-------------------------------------------------------------------
Sat Apr 01 17:37:28 UTC 2023 - malcolmlewis@opensuse.org
- Update to version 3.0.1+29:
+ Fix typo in pci id.
+ Add pre-parsed hardware info.
+ Update copyrights.
+ Fix monitored gpu selection logic.
+ Fix multiple gpus selection.
+ Fix a unused case.
+ Add license.
+ Add copyright info.
+ New gpus support using a local gpu type database.
+ hjkl motion keys.
- Add %%doc README.markdown.
-------------------------------------------------------------------
Sun Nov 06 23:28:59 UTC 2022 - malcolmlewis@opensuse.org
- Update to version 3.0.1:
* Don't overwrite usage for graphics+compute processes.
* Expose processes that are both graphical and compute.
* Fix nvtop process hiding.
* Move misplaced assertion.
- Changes from version 3.0.0:
* Update documentation.
* Option to hide nvtop from the process list.
* Clang-format all.
- Changes from 2.0.3+4:
* Option to toggle startup messages.
* Don't print the infos to stdout.
* Fix spacing.
* Save message option and fix multidevice save.
* Support info window.
* Support info messages.
* Save monitored gpus to config.
* Setup window to select gpus.
* Dynamic gpu monitored list.
* Rework interface for gpu select option.
* Remove GPU mask option.
* Extract pdev for all devices.
* Fix for libudev wrapper.
* Readme update for Intel support.
* Don't need device discovery for NVIDIA only.
* Fix FindUDev and FindSystemd for older cmake.
* Show intel ENC/DEC together.
* Fix integrated AMDGPU drm and fdinfo usage mismatch.
* Fix macro extra arguments.
* Mark AMDGPU integrated gpu as such.
* Fix amdgpu null pointer deref.
* Fix intel and integrated GPU support.
* Use device discovery for Intel.
* Use device discovery for AMDGPU.
* Udev/sd-device wrapper.
* Fix intel support.
* Preliminary Intel support.
* nvtop metainfo file.
* Auto date for manpage.
* Nvtop logo.
* add process-control plug to allow killing processes.
* Guard against huge jump in usage.
* Uint64 literals.
* Guard against suspect values reported by fdinfo.
* Better validity macros.
* Mark valid AMDGPU cache entries.
* AMDGPU compute process support.
* Add desktop file.
* Code reorganization to sweep /proc once per update.
-------------------------------------------------------------------
Sun Aug 28 17:03:15 UTC 2022 - malcolmlewis@opensuse.org
- Update to version 2.0.3+3:
* Enable format warnings.
* Fix format-security warnings.
* Fix drm node file descriptor opening logic.
* Fix fdinfo name typo.
* Remove unnecessary list and free amdgpu resources.
* Support new amdgpu fdinfo interface kernel >=5.19.
* Display time on x axis.
* Resolve some warning messages.
-------------------------------------------------------------------
Sun Jul 03 23:26:54 UTC 2022 - malcolmlewis@opensuse.org
- Update to version 2.0.2:
* Fix encode/decode window cleaning on AMDGPU.
* Fix fast resize event not registering.
* Put expensive tests behind an option.
* Fix plot for a maximum of 64 GPUs.
* Expensive test at the end.
* Add test for infinite loop fix.
* Fix wrong size UCHAR_MAX -> UINT_MAX.
* Test for expected empty process window.
* Don't redistribute when no rows are left.
* Header stack of minimum 1 to avoid divide by zero.
* More interface tests.
* Resolve compilation warnings.
* C++ friendly header for testing.
* Don't build testing by default unless in Debug.
* Simplified and fixed plot merge algorithm.
* Expose max lines in a plot as a macro.
* Enable CMake testing using GTest.
* Add assert in info_in_plot.
-------------------------------------------------------------------
Fri May 20 23:15:36 UTC 2022 - malcolmlewis@opensuse.org
- Update to version 2.0.1+12:
* Project wide allocarray availability check.
* Metrics reset cleanup.
* Fix AMDGPU encoder value stored in decoder usage.
* Update encode and decode rates for AMDGPU.
* Alternative path to get GPU usage from process info.
* Linear realloc strategy.
* realloc to reallocarray to catch potential overflows.
* Check for reallocarray availability.
-------------------------------------------------------------------
Tue May 03 00:58:30 UTC 2022 - malcolmlewis@opensuse.org
- Update to version 2.0.1+2:
* docs(README): fix typo (querry -> query).
* Use pp_dpm_pcie to get the current PCIe link configuration.
* Guard GPU family to support older libdrm.
* Bump initial major release with AMDGPU support.
* Disable over-verbose warnings and enable useful ones.
* Fix goto label not preceding a statement.
* Dev tooling improvement.
* Update README and manpage with AMDGPU support info.
* Use libdrm for AMDGPU support.
* AMDGPU power cap info.
* AMDGPU max temps and PCIe gen/width and usage.
* Fan speed extraction from sysfs.
* Don't close negative file descriptors and fix error check.
* Convert AMDGPU watts to the datastructure milliwatts.
* Reset return status when handle or function are not loaded.
* Get the right gpu name in the setup window.
* extract_gpuinfo_amdgpu: Support per-process GPU usage.
* Add basic global (not per-process) GPU usage for AMDGPU.
* Prepare mask for inclusion of multiple vendors.
* Make GPU vendors use a hooking mechanism.
* Make devices into a linked list and make use container_of.
* typedef struct foo -> struct foo.
* extract_gpuinfo_nvidia: Get rid of dlsym cast.
* optimization_flags.cmake: Disable quite a few warnings.
-------------------------------------------------------------------
Mon Dec 13 01:43:09 UTC 2021 - malcolmlewis@opensuse.org
- Update to version 1.2.2+5:
* Remove printf statement.
* Use the maximum of graphical and sm as GPU speed.
* Fix: filter out nvidia utilization samples.
-------------------------------------------------------------------
Sun Jun 06 14:21:09 UTC 2021 - malcolmlewis@opensuse.org
- Update to version 1.2.1:
* Remove TODO file.
* Line plot algorithm rewrite.
* Call most specific ncurses function.
* Rename weirdly named function.
* Clear only the updated part of the process window.
* Merge process related options to process logic.
* Separate the shortcut window logic from process and setup.
* end/dec: clear the windows only when needed.
* Make changes to please clang-tidy in some cases.
* Fix: improve backward compatibility for old drivers.
* Fix: potential buffer overflow on process memory buffer.
* Fix: search in the two pid info caches for a match.
* Fix: not assuming at least one process for pid selection.
* Up-to-date screenshots and README.
-------------------------------------------------------------------
Thu May 20 21:26:43 UTC 2021 - malcolmlewis@opensuse.org
- Update to version 1.1.0+34:
* All the charts have the same scale.
* Fix: chart layout now correctly handles multiple GPUs.
* Bump nvtop version to 1.2.
* Integration of per process utilization to the interface.
* NVIDIA per process utilization info retrieval.
* Add the process list metric options to the setup window.
* Add a notice about the maximum number of metrics per GPU.
* Add the GPU/MEM clock rates to the list of metrics that can be
plotted.
* Add the fan speed to the list of metrics that can be plotted.
* Add the power draw rate to the list of metrics that can be
plotted.
* Add the a no-modification notice to the generated config file.
* Reduce legend size.
* Update README and manpage.
* Fix: the memory usage was initialized with a wrong metric.
* Update interface codebase.
* Use a ring buffer to store the chart data.
* Fix: encode/decode now correctly cleared and displayed.
* Consistency size reduction of menu shortcuts.
* Add the update interval as an option.
* Setup window implementation.
* Configuration file support.
* Redisign of program option handling.
* Update README and doc following the gpuinfo redesign.
* Build system update following the gpuinfo redesign.
* Update interface and main compilation units to use the new
gpuinfo functions.
* Processus info field rename and add missing header.
* Per vendor GPU extraction.
* Bump uthash version to 2.3.0.
* Fix: /proc/<pid>/cmdline may be empty so initialize the string
as empty.
* More paths for NVML library.
* Fix: initialize_device_info failed cause double free.
-------------------------------------------------------------------
Sun Apr 18 15:43:35 UTC 2021 - malcolmlewis@opensuse.org
- Update to version 1.1.0+3:
* Interface: plot refresh rate respects the -d option.
* Fix: sorting function relied on integer conversion.
* Add additional path hints for nvml.
-------------------------------------------------------------------
Fri Dec 11 15:53:00 UTC 2020 - malcolmlewis@opensuse.org
- Update to version 1.1.0:
* Bump version 1.1.0
* README.markdown: add gentoo install commands
- Update _service: Change to @PARENT_TAG@+@TAG_OFFSET@ version
scheme, with +0 being stripped when detected.
-------------------------------------------------------------------
Sun Nov 15 00:47:57 UTC 2020 - malcolmlewis@opensuse.org
- Update to version 1.0.0+git20201111.aa48ce2:
* ITF: print power draw or max draw even when both are not
provided by the driver
-------------------------------------------------------------------
Sat Oct 24 23:39:20 UTC 2020 - malcolmlewis@opensuse.org
- Update to version 1.0.0+git20201012.087a025:
* Plot: reverse to march other monitoring programs behavior
* Build: clear cached variable for build check
* Fix: imprecise information from nvml library
* Fix: wrong variable was used for column computation
* Fix: initialize the correct ammount of plot location
* Build: do not use nvml header automatic api upgrade
* CMake: add nvml path hints
* Doc: fix typo and add encoder/decoder info to manpage
* Fix: increase PID field size supporting linux range
* Update Arch Linux installation instructions
-------------------------------------------------------------------
Sat Oct 24 23:39:04 UTC 2020 - malcolmlewis@opensuse.org
- Initial build.

4
nvtop.obsinfo Normal file
View File

@ -0,0 +1,4 @@
name: nvtop
version: 3.1.0+89
mtime: 1734129572
commit: 19382d93086acf36f32a8d72173fb9968232e3c1

66
nvtop.spec Normal file
View File

@ -0,0 +1,66 @@
#
# spec file for package nvtop
#
# Copyright (c) 2024 SUSE LLC
# Copyright (c) 2020-2024 Malcolm J Lewis <malcolmlewis@opensuse.org>
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
Name: nvtop
Version: 3.1.0+89
Release: 0
Summary: A (h)top like task monitor for NVIDIA and AMD GPUs
License: GPL-3.0-or-later
URL: https://github.com/Syllo/nvtop
Source0: %{name}-%{version}.tar.xz
#PATCH-FIX-UPSTREAM nvtop-fix-non-void-function.patch (gh#Syllo/nvtop#350) malcolmlewis@opensuse.org -- Fix control reaches end of non-void function error
Patch0: nvtop-fix-non-void-function.patch
BuildRequires: cmake
BuildRequires: gcc-c++
BuildRequires: hicolor-icon-theme
BuildRequires: pkgconfig
BuildRequires: update-desktop-files
BuildRequires: pkgconfig(libdrm)
BuildRequires: pkgconfig(libudev)
BuildRequires: pkgconfig(ncurses)
BuildRequires: pkgconfig(systemd)
%description
Nvtop stands for NVidia TOP, a (h)top like task monitor for AMD, NVIDIA and
now Intel GPUs.
It can handle multiple GPUs and print information about them in a htop familiar
way.
%prep
%autosetup -p1
%build
%cmake -DCMAKE_BUILD_TYPE=Release \
-DNVML_RETRIEVE_HEADER_ONLINE=True
%make_build
%install
%cmake_install
%files
%license LICENSE
%doc README.markdown
%{_bindir}/nvtop
%{_datadir}/applications/nvtop.desktop
%{_datadir}/icons/nvtop.svg
%{_mandir}/man1/nvtop.1%{?ext_man}
%{_datadir}/metainfo/nvtop.metainfo.xml
%changelog