application startup on terminal/shell
Ralf Mardorf
kde.lists at yahoo.com
Fri Oct 22 02:51:10 UTC 2021
On Thu, 21 Oct 2021 15:46:27 -0400, Little Girl wrote:
>Zahid Rahman wrote:
>>I was over clocking my pi4 that is why I wanted to use neofetch to
>>find out the speed it is running .
>
>Okay. I had never heard of neofetch before now, but it looks like an
>interesting program.
Hi,
it's a terrible slow bash script that delays opening a terminal, so
taking a look at what neofetch does...
[rocketmouse at archlinux ~]$ grep system/cpu/ /usr/bin/neofetch
# NOTE: Any file in '/sys/devices/system/cpu/cpu0/cpufreq' can be used as a value.
speed_dir="/sys/devices/system/cpu/cpu0/cpufreq"
...and just adding the important part to .bashrc...
[rocketmouse at archlinux ~]$ head -13 ~/.bashrc
#
# /home/rocketmouse/.bashrc
#
# If not running interactively, don't do anything
[[ $- != *i* ]] && return
PS1='[\u@\h \W]\$ '
#PS1='[\u@\h \w]\$ '
#(neofetch)
cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq | awk '{print int($1/1000) "MHz"}'
...IMO is way more comfortable. More useful might be to add nothing at
all to .bashrc and instead to launch...
[rocketmouse at archlinux ~]$ watch -n 1 cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq
...to monitor the speed in Hz.
Regards,
Ralf
More information about the ubuntu-users
mailing list