submitted 2 years ago* (last edited 2 years ago) by to c/linux@lemmy.ml
 

Hello,

I've been using Armbian on a bunch of ARM SCBs and they have a very nice MOTD on SSH login that shows CPU, RAM, Storage and networking infromation.

Is there anything similar for a regular x86 machine? I tried to grab the scripts from a NanoPi M4v2 board but had to change a ton of stuff to get it working on x86 and it isn't portable as AMD and Intel report temps differently. Or... does anyone know if their x86 version has it working and where to get?

Just for reference I'm talking about this: https://cdn.tcb13.com/2023/armbian-motd.jpg

Thank you.

all 21 comments

sorted by: hot top controversial new old
[–] 5 points 2 years ago* (1 child)
  • [–] 4 points 2 years ago (1 child)

    Why not write your own version? Getting the temperatures is easy and portable with the sensors command from lm-sensors. The rest of the info is easy to get using various commands (e.g. uptime, free) combined with a bit of sed/grep/awk for formatting.

  • source
  • hideshow 2 child comments
  • [–] 3 points 2 years ago (1 child)

    Looks like that config info might be defined in this script

  • source
  • hideshow 2 child comments
  • [–] [S] 1 point 2 years ago* (1 child)

    Yes, that script depends on /usr/lib/armbian/armbian-allwinner-battery that, in turn, depends on the armbianmonitor service. :(

  • source
  • parent
  • hideshow 2 child comments
  • [–] 1 point 2 years ago (1 child)

    Can’t you cut out the battery code since your screenshot indicates it wasn’t used? I should be clear that you’ll have to edit some bash scripts to make what you’re asking for happen.

  • source
  • parent
  • hideshow 2 child comments
  • [–] [S] 1 point 2 years ago

    That's an example, for instance the CPU temps depend on another os those files that is written by the armbianmonitor service... and I don't want to run that service on a generic machine. In the past I modified the script to read temps from lm-sensors but that doesn't seem to be very portable as both Intel and AMD have multiple variations on way they report the temps.

    This is why I'm mostly looking for an alternative.

  • source
  • parent
  • [–] 2 points 2 years ago (3 children)
  • [–] [S] 1 point 2 years ago (2 children)

    I'm aware... but where can I get the included MOTD without having to burn the image and whatnot?

  • source
  • parent
  • hideshow 4 child comments
  • [–] 1 point 2 years ago (1 child)

    you should be able to drop an executable in /etc/update-motd.d/

    also have a look at libpam-motd or at the systemd scripts that ubuntu uses

  • source
  • parent
  • hideshow 2 child comments
  • [–] [S] 2 points 2 years ago (1 child)

    Yes... but this armbian thing has too many dependencies I wouln't want to run the armbianmonitor service just to power this up.

  • source
  • parent
  • hideshow 2 child comments
  • [–] 1 point 2 years ago

    sorry, I should have replied as top comment. I meant that on plain debian you can put executables in /etc/update-motd.d. That should do, otherwise have a look at libpam-motd , or steal the systemd scripts from an ubuntu install

  • source
  • parent
  • [–] [S] 1 point 2 years ago (1 child)

    I managed to mount the image and extract the files, however it still fails on a regular Debian box, x86 as a few tools seem to be missing:

    ./30-armbian-sysinfo
    ./30-armbian-sysinfo: line 41: /usr/lib/armbian/armbian-allwinner-battery: No such file or directory
    ./30-armbian-sysinfo: line 92: ambienttemp: command not found
    ./30-armbian-sysinfo: line 94: batteryinfo: command not found
    ./30-armbian-sysinfo: line 96: getboardtemp: command not found
    System load:   1%               Up time:       7 days 19:15
    Memory usage:  34% of 15.59G    Zram usage:    1% of 14.90G     IP:            10.12.125.1 172.21.1.11
    Usage of /:    24% of 916G
    storage/:      1% of 952M
    
  • source
  • parent
  • hideshow 2 child comments
  • [–] 2 points 2 years ago

    Does anyone else prefer no MOTD? You can SSH into your server without clobbering your scroll back buffer. It makes everything feel more seamless.

  • source
  • [–] 2 points 2 years ago (2 children)

    Dude, I know your IP now. You're hacked!

  • source
  • hideshow 4 child comments