[PLUG-IN] NerdTools


Recommended Posts

Hi there,

in Unraid 6.11.x "expect" was working.

In Nerdtools we already have tcl and libtcl, but "expect" is missing.

Please add it back.

 

Example usage:

#!/usr/bin/expect
set USER ""
set HOST "x.x.x.x"
set PWD ""
#log_file /var/log/ssh_tmp.log
set timeout  30
log_user  1
set send_slow {1 .01}
send_log  "Connecting to $HOST using $USER user\n"
eval spawn ssh -F /boot/config/ssh/root/ssh_config -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -o Connecttimeout=30 "$USER\@$HOST"
expect  {
         timeout       { send_user  "timeout  while connecting to $HOST\n"; exit }
         "*No route to host*" { send_user  "$HOST not reachable\n"; exit }
        "*assword: " { send -s $PWD\r }
        }
expect {
"*hpiLO->" { send "fan pid 33 lo 5600\r" }
       }
expect {
"*hpiLO->" { send "fan pid 34 lo 5600\r" }
       }
expect {
"*hpiLO->" { send "fan pid 35 lo 5600\r" }
       }
expect {
"*hpiLO->" { send "fan pid 36 lo 5600\r" }
       }
expect {
"*hpiLO->" { send "fan pid 37 lo 5600\r" }
       }
expect {
"*hpiLO->" { send "fan pid 38 lo 5600\r" }
       }
expect {
"*hpiLO->" { send "fan pid 42 lo 5600\r" }
       }
expect {
"*hpiLO->" { send "fan pid 52 lo 5600\r" }
       }
expect {
"*hpiLO->" { send "fan pid 53 lo 5600\r" }
       }
expect {
"*hpiLO->" { send "fan pid 54 lo 5600\r" }
       }
expect {
"*hpiLO->" { send "fan pid 55 lo 5600\r" }
       }
expect {
"*hpiLO->" { send "fan pid 56 lo 5600\r" }
       }
expect {
"*hpiLO->" { send "fan pid 57 lo 5600\r" }
       }
expect {
"*hpiLO->" { send "fan pid 58 lo 5600\r" }
       }
expect {
"*hpiLO->" { send "fan pid 59 lo 5600\r" }
}
expect {
"*hpiLO->" { send "fan pid 60 lo 5600\r" }
}
expect {
"*hpiLO->" { send "fan pid 61 lo 5600\r" }
}
expect {
"*hpiLO->" { send "fan pid 62 lo 5600\r" }
}
expect {
"*hpiLO->" { send "fan pid 63 lo 5600\r" }
}
expect { 
"*hpiLO->" { send "fan pid 33 hi 9500\r" }
}
expect { 
"*hpiLO->" { send "fan pid 34 hi 9500\r" }
}
expect { 
"*hpiLO->" { send "fan pid 35 hi 9500\r" }
}
expect { 
"*hpiLO->" { send "fan pid 36 hi 9500\r" }
}
expect { 
"*hpiLO->" { send "fan pid 37 hi 9500\r" }
}
expect { 
"*hpiLO->" { send "fan pid 38 hi 9500\r" }
}
expect { 
"*hpiLO->" { send "fan pid 42 hi 9500\r" }
}
expect { 
"*hpiLO->" { send "fan pid 52 hi 9500\r" }
}
expect { 
"*hpiLO->" { send "fan pid 53 hi 9500\r" }
}
expect { 
"*hpiLO->" { send "fan pid 54 hi 9500\r" }
}
expect { 
"*hpiLO->" { send "fan pid 55 hi 9500\r" }
}
expect { 
"*hpiLO->" { send "fan pid 56 hi 9500\r" }
}
expect { 
"*hpiLO->" { send "fan pid 57 hi 9500\r" }
}
expect { 
"*hpiLO->" { send "fan pid 58 hi 9500\r" }
}
expect { 
"*hpiLO->" { send "fan pid 59 hi 9500\r" }
}
expect { 
"*hpiLO->" { send "fan pid 60 hi 9500\r" }
}
expect { 
"*hpiLO->" { send "fan pid 61 hi 9500\r" }
}
expect { 
"*hpiLO->" { send "fan pid 62 hi 9500\r" }
}
expect { 
"*hpiLO->" { send "fan pid 63 hi 9500\r" }
}
expect  {
         "*hpiLO->"   { send "exit\r" }
         }
send_user  "Disconnected\n"
close

 

Greetings

Dark

Link to comment

Is iotop working for everyone? I get the following error? 

 

~# iotop
Traceback (most recent call last):
  File "/usr/sbin/iotop", line 17, in <module>
    main()
  File "/usr/lib64/python2.7/site-packages/iotop/ui.py", line 620, in main
    main_loop()
  File "/usr/lib64/python2.7/site-packages/iotop/ui.py", line 610, in <lambda>
    main_loop = lambda: run_iotop(options)
  File "/usr/lib64/python2.7/site-packages/iotop/ui.py", line 508, in run_iotop
    return curses.wrapper(run_iotop_window, options)
  File "/usr/lib64/python2.7/curses/wrapper.py", line 22, in wrapper
    stdscr = curses.initscr()
  File "/usr/lib64/python2.7/curses/__init__.py", line 33, in initscr
    fd=_sys.__stdout__.fileno())
_curses.error: setupterm: could not find terminal

 

Uninstalled it, re installed it. On latest version of Nerd Tools. Any pointers? Is there a different way I could install this? 

Link to comment
On 5/4/2023 at 3:44 PM, bubbl3 said:

Running  6.12.0-rc5, I have these packages installed:
image.png.d1348a86c8f9b9325e735f6bfeae77bb.png

 

But when trying to use pip3 to install features i get this:
image.thumb.png.ecd05d744cb14f675a418ccf3ecaff07.png

 

Any idea what the issue could be?


I'm having the same issue with python3.  I can only find one other guy posting about similar issues on the forums (also searched reddit).  Something to do with openssl maybe  https://forums.unraid.net/bug-reports/prereleases/670-rc1-openssl-issue-r352/

 

my system (6.11.5) has openssl 1.1.1s
 

Sounds like it might work with python2? https://forums.unraid.net/topic/35866-unraid-6-nerdpack-cli-tools-iftop-iotop-screen-kbd-etc/?do=findComment&comment=714678
 


 

Link to comment
On 5/4/2023 at 8:44 PM, bubbl3 said:

Running  6.12.0-rc5, I have these packages installed:
image.png.d1348a86c8f9b9325e735f6bfeae77bb.png

 

But when trying to use pip3 to install features i get this:
image.thumb.png.ecd05d744cb14f675a418ccf3ecaff07.png

 

Any idea what the issue could be?

 

2 hours ago, ctulloch137 said:


I'm having the same issue with python3.  I can only find one other guy posting about similar issues on the forums (also searched reddit).  Something to do with openssl maybe  https://forums.unraid.net/bug-reports/prereleases/670-rc1-openssl-issue-r352/

 

my system (6.11.5) has openssl 1.1.1s
 

Sounds like it might work with python2? https://forums.unraid.net/topic/35866-unraid-6-nerdpack-cli-tools-iftop-iotop-screen-kbd-etc/?do=findComment&comment=714678
 


 

 

I figured out the last python build `python3-3.9.16-x86_64-3` was built without ssl. The previous build `python3-3.9.16-x86_64-1` works fine. I tested both here.

  • Upvote 2
Link to comment
1 hour ago, trurl said:

Did you go to the NerdTools Settings and select the packages you want? 

 

I surely did sir. I also restarted the system but no luck.

 

image.thumb.png.0061d45ef7576000aecc8bd700845e5d.png

 

Edit: I should add.. Other packages like `mediainfo` or `powertop` work well. 

Edited by ANIMATEK
Link to comment

Well it's me again with a new problem... It seems that Python3.9 does not support the OpenSSL 1.1.1? This is what is installed between Unraid and NerdTools and unfortunately I cannot change it. This message is basically what I get when running the script that I want:

 

Script location: /tmp/user.scripts/tmpScripts/install_qbt_api/script
Note that closing this window will abort the execution of this script
WARNING: pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/qbittorrent-api/
WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/qbittorrent-api/
WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/qbittorrent-api/
WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/qbittorrent-api/
WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/qbittorrent-api/
Could not fetch URL https://pypi.org/simple/qbittorrent-api/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/qbittorrent-api/ (Caused by SSLError("Can't connect to HTTPS URL because the SSL module is not available.")) - skipping
ERROR: Could not find a version that satisfies the requirement qbittorrent-api (from versions: none)
ERROR: No matching distribution found for qbittorrent-api
WARNING: pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.
Could not fetch URL https://pypi.org/simple/pip/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/pip/ (Caused by SSLError("Can't connect to HTTPS URL because the SSL module is not available.")) - skipping
WARNING: There was an error checking the latest version of pip.

 

Googling the error tells me to update OpenSSL and try again, which I cannot do? 

 

Any new idea? It seems that I am stuck. Thanks in advance.

Edited by ANIMATEK
extra info
Link to comment
On 5/9/2023 at 12:50 PM, fabricionaweb said:

 

 

I figured out the last python build `python3-3.9.16-x86_64-3` was built without ssl. The previous build `python3-3.9.16-x86_64-1` works fine. I tested both here.


Thank you for figuring this out. How would you go about building the previous version and replacing the current version?

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.