Giter Site home page Giter Site logo

rknputop's Introduction

rknputop

Simple top-like script for Rockhip NPUs on Linux

Installing

Quick Install

Debian/Ubuntu only (requires apt):

curl https://raw.githubusercontent.com/ramonbroox/rknputop/main/install.sh | sudo bash

Manual Install

Required: sudo pip install plotext psutil

Then download (for example with wget)

wget https://raw.githubusercontent.com/ramonbroox/rknputop/main/rknputop

Running

If you followed quick install, just enter sudo rknputop on your shell

Manual

chmod +x rknputop

sudo ./rknputop

Options

$ rknputop -h
Usage: Show different NPU/CPU stats

Options:
  -h, --help      show this help message and exit
  -n, --npu-only  Only show the NPU load
  -b, --npu-bars  Show the NPU with bars instead of lines

Screenshots

Full View

rknputop's People

Contributors

ramonbroox avatar pelochus avatar bjia56 avatar kalabaddon avatar

Stargazers

Martin Chang avatar  avatar Link avatar nπ avatar  avatar  avatar nixiaobai avatar  avatar Robert Brisita avatar

Watchers

 avatar

Forkers

kalabaddon bjia56

rknputop's Issues

TypeError: must be real number, not NoneType

Thanks for this tool. I am getting this error at runtime. Ubuntu 22.04.3 LTS / OrangePi 5 plus.
Here is the full install log:

av1d@ubuntu:~/x$ curl https://raw.githubusercontent.com/ramonbroox/rknputop/main/install.sh | sudo bash

  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   294  100   294    0     0   1337      0 --:--:-- --:--:-- --:--:--  1342
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
wget is already the newest version (1.21.2-2ubuntu1).
curl is already the newest version (7.81.0-1ubuntu1.16).
python3 is already the newest version (3.10.6-1~22.04).
python3-pip is already the newest version (22.0.2+dfsg-1ubuntu0.4).
The following packages were automatically installed and are no longer required:
  libcgroup1 wmdocker
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 40 not upgraded.
Requirement already satisfied: plotext in /usr/local/lib/python3.11/dist-packages (5.2.8)
Requirement already satisfied: psutil in /usr/local/lib/python3.11/dist-packages (5.9.8)
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
--2024-04-15 18:22:48--  https://raw.githubusercontent.com/ramonbroox/rknputop/main/rknputop
Resolving raw.githubusercontent.com (raw.githubusercontent.com)... 185.199.111.133, 185.199.109.133, 185.199.108.133, ...
Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|185.199.111.133|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 7017 (6.9K) [text/plain]
Saving to: ‘rknputop’

rknputop                                   100%[=====================================================================================>]   6.85K  --.-KB/s    in 0.001s  

2024-04-15 18:22:48 (6.11 MB/s) - ‘rknputop’ saved [7017/7017]

av1d@ubuntu:~/x$ rknputop
Cannot read /sys/kernel/debug/rknpu/load. Run with `sudo`
av1d@ubuntu:~$ sudo rknputop
Traceback (most recent call last):
  File "/usr/bin/rknputop", line 221, in <module>
    labels, temps, tops = tempbars()
                          ^^^^^^^^^^
  File "/usr/bin/rknputop", line 128, in tempbars
    tops.append(math.floor(v[0].high))
                ^^^^^^^^^^^^^^^^^^^^^
TypeError: must be real number, not NoneType

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.