Show information about your AI/Deep Learning server in a nice format, including GPU utilization and VRAM usage 🚀
Clone the repository and cd into it
git clone https://github.com/fedebotu/ai-server-motd.git && cd ai-server-motd
To display on login via SSH, copy the messages you want in /etc/update-motd.d
.
For example, if you want to use 30-nvidia
:
sudo cp 30-nvidia /etc/update-motd.d/
The messages will be displayed in alphabetical order (eg. 10-, 20-...).
You may test if you MOTD (the dynamic part) works with
run-parts /etc/update-motd.d/
If some parts do not show, check if the permissions are set to 755 (chmod 755 [FILE]
)
If there is no display, you may check the following answer from Stackoverflow:
The file in
/etc/ssh/sshd_config
needed to be set this lineUsePAM yes
. That allowed the interactive login to trigger the file/etc/pam.d/sshd
that containedsession optional pam_motd.so motd=/run/motd.dynamic
to run, which in turn ran the files in/etc/update-motd.d/
to trigger my MOTD when I login.
Also, there may be no display in case of errors. Make sure to test as described above.
To use the 10-hostname-color
, you may run the following on a Ubuntu server:
sudo apt-get install update-motd
sudo apt-get install -y figlet
sudo apt-get install lolcat
Alternatively install sudo snap install lolcat-c
- note that you need snap
install with you can install with sudo apt install snap
.
https://github.com/yboetz/motd https://github.com/bcyran/fancy-motd ... and ChatGPT ofc