threadcounter.sh
16 lines · 426 bytes
1# !/bin/bash
2# this scrips shows how many threads the tui is running, as it gets bumped up significantly when visiting a new page (it's downloading the immages)
3
4while true; do
5 PID=$(pgrep youtube-tui)
6
7 if [ -n "$PID" ]; then
8 THREADS=$(ps hH p $PID | wc -l)
9
10 echo "youtube-tui is running with $THREADS threads."
11 else
12 echo "youtube-tui is not currently running."
13 fi
14
15 sleep 0.05
16done