show hostname in top
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.
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.