Show system information at startup regardless of load
Solution 1:
The Message of the day (MOTD) in Ubuntu is controlled by the directory /etc/update-motd.d/
(and the file /etc/update-motd
, if any). Particularly, the Landscape info resides in the file /etc/update-motd.d/50-landscape-sysinfo
, as simpoir mentioned in their answer.
On my Ubuntu 16.04, the file /etc/update-motd.d/50-landscape-sysinfo
contains some entry settings and then an if
block. So to display the information regardless of the condition, you can simply remove all contents except shebang and the if
block contents. The result on my Ubuntu 16.04:
#!/bin/sh
echo
echo -n " System information as of "
/bin/date
echo
/usr/bin/landscape-sysinfo
To do this, use the following procedure in the terminal:
cd /etc/update-motd.d # go to the right directory
sudo cp -L 50-landscape-sysinfo{,.bak} # keep a backup copy: 50-landscape-sysinfo.bak
sudo nano 50-landscape-sysinfo # edit the file contents using 'nano'
# (or your favorite text editor)
# and paste the above contents to it
What is meant by load higher than 1.0?
The load tells how much the hardware resources of your computer are being requested currently. As a rule of thumb, if it’s higher than your computer’s processor (core) count, the tasks get delayed. It’s OK to get the high-load MOTD message just after boot but if it keeps appearing for several days (MOTD may update just once a day), check whether your machine is powerful enough for the tasks it’s performing.
How to add/remove other commands to be run at cli login?
There are multiple ways and the right way depends on the purpose. You could simply add a script to the directory /etc/update-motd.d/
but it would be only run when the MOTD is updated.
Solution 2:
The message you see on login are generated by motd. This specific one is defined in /etc/update-motd.d/50-landscape-sysinfo
. To have it run regardless of load (which can make connecting through ssh unresponsive if the load is high), you can simply remove the condition from the file, which will then looks like such:
#!/bin/sh
echo
echo -n " System information as of "
/bin/date
echo
/usr/bin/landscape-sysinfo
As for the load value, it represents load average, about which you can read more https://en.wikipedia.org/wiki/Load_(computing)