show hostname in top

I’m using top with tmux to monitor the most-CPU-consuming processes on different computers. How can I get the hostname to be displayed in each pane? Can I tell top to display the hostname somehow?

screenshot top+tmux

Asked By: gerrit

||

As far as I see it, there is no possibility to do it in top. I would suggest using htop. If you open the programm press F2 and move with Tab to the column available meters. You’ll find an entry hostname and can place it by pressing F5 or F6 to left or right side.

Answered By: qbi
cp /usr/bin/top /usr/bin/"$HOSTNAME"_top

Run the new command you just created, the upper left will show the name of the new command, which includes the hostname.

Answered By: DanielS
Categories: Answers Tags: ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.