peci1/nvidia-htop

command not found?

thomasaarholt opened this issue · 5 comments

I'm probably using this wrong, but I get the above error when I try the following:

  1. Place nvidia-htop.py in my current directory.
  2. Call nvidia-smi | nvidia-htop.py -l

Calling nvidia-smi on its own works just fine. Any suggestions?

Ahem, as often happens, I had a thought just immediately after hitting Post.

nvidia-smi | python nvidia-htop.py -l appears to work. I do not understand why your suggestion would work, do you ?

(also, thanks for sharing awesome work!)

peci1 commented

On Linux you can't run programs from current directory just by typing their names. Correct way to do it is

    nvidia-smi | ./nvidia-htop.py -l
peci1 commented

I'll fix the example, thanks for pointing this out.

Cheers, I didn't actually realise you could run python files like that on linux.
Note that one might need to change permissions on the file (I had to), ala
chmod 744 nvidia-htop.py