E
E
enabl32018-02-21 15:59:05
linux
enabl3, 2018-02-21 15:59:05

Is it possible to use the terminal at the same time as running htop?

In general, the essence of the issue is clear.
I'm wondering if it's possible to launch only the top window from htop, where it shows the CPU and RAM usage and continue to work in the terminal.
Or what analogues are there to do this.
Thank you.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
E
enabl3, 2018-02-21
@enabl3

Solved with:

{ head -n1 /proc/stat;sleep 0.2;head -n1 /proc/stat; } | awk '/^cpu /{u=$2-u;s=$4-s;i=$5-i;w=$6-w}END{print int(0.5+100*(u+s+w)/(u+s+i+w))}'

V
Vitaly, 2018-02-21
@vitstr

https://ru.wikipedia.org/wiki/Tmux

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question