lima icon indicating copy to clipboard operation
lima copied to clipboard

Show some more information about the guest system

Open afbjorklund opened this issue 3 years ago • 1 comments

Description

I was looking at adding some more basic details from the guest

This was available in the "host" structure, and in /etc/os-release.

I opened another issue, about the more dynamic information:

  • Issue #835

This issue would be the more static part such as OS and total.

Similar to the output of "screenfetch" or "neofetch", but less clutter.

It is available through shell commands, but could use some JSON ?

  • https://github.com/afbjorklund/lima-gui/issues/12

Example info:

  • OS
  • Kernel

https://pkg.go.dev/github.com/shirou/gopsutil/host


$ limactl ls default
NAME       STATUS     SSH                ARCH      CPUS    MEMORY    DISK      DIR
default    Running    127.0.0.1:60022    x86_64    4       4GiB      100GiB    /home/anders/.lima/default
$ lima uname -a
Linux lima-default 5.15.0-25-generic #25-Ubuntu SMP Wed Mar 30 15:54:22 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
$ lima cat /etc/os-release 
PRETTY_NAME="Ubuntu 22.04 LTS"
NAME="Ubuntu"
VERSION_ID="22.04"
VERSION="22.04 (Jammy Jellyfish)"
VERSION_CODENAME=jammy
ID=ubuntu
ID_LIKE=debian
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
UBUNTU_CODENAME=jammy

Some of these shell scripts are quite long...

https://github.com/KittyKatt/screenFetch

anders@ubuntu:~$ wc -l screenfetch/screenfetch-dev 
6679 screenfetch/screenfetch-dev
anders@ubuntu:~$ lima screenfetch/screenfetch-dev
realpath: /proc/1945/exe: Permission denied
                          ./+o+-       anders@lima-default
                  yyyyy- -yyyyyy+      OS: Ubuntu 22.04 jammy
               ://+//////-yyyyyyo      Kernel: x86_64 Linux 5.15.0-25-generic
           .++ .:/++++++/-.+sss/`      Uptime: 46m
         .:++o:  /++++++++/:--:/-      Packages: 598
        o:+o+:++.`..```.-/oo+++++/     Shell: 
       .:+o:+o/.          `+sssoo+/    Disk: 427G / 556G (81%)
  .++/+:+oo+o:`             /sssooo.   CPU: Intel Core i5-10210U @ 4x 2.112GHz
 /+++//+:`oo+o               /::--:.   GPU: Red Hat, Inc. Virtio GPU (rev 01)
 \+/+o+++`o++o               ++////.   RAM: 463MiB / 3921MiB
  .++.o+++oo+:`             /dddhhh.  
       .+.o+oo:.          `oddhhhh+   
        \+.++o+o``-````.:ohdhhhhh+    
         `:o+++ `ohhhhhhhhyo++os:     
           .o:`.syhhhhhhh/.oo++o`     
               /osyyyyyyo++ooo+++/    
                   ````` +oo+++o\:    
                          `oo++.      

https://github.com/dylanaraps/neofetch

anders@ubuntu:~$ wc -l neofetch/neofetch
11592 neofetch/neofetch
anders@ubuntu:~$ lima neofetch/neofetch
            .-/+oossssoo+\-.               anders@lima-default 
        ´:+ssssssssssssssssss+:`           ------------------- 
      -+ssssssssssssssssssyyssss+-         OS: Ubuntu 22.04 LTS x86_64 
    .ossssssssssssssssssdMMMNysssso.       Host: KVM/QEMU (Standard PC (Q35 + ICH9, 2009) pc-q35-4.2) 
   /ssssssssssshdmmNNmmyNMMMMhssssss\      Kernel: 5.15.0-25-generic 
  +ssssssssshmydMMMMMMMNddddyssssssss+     Uptime: 46 mins 
 /sssssssshNMMMyhhyyyyhmNMMMNhssssssss\    Packages: 595 (dpkg), 3 (snap) 
.ssssssssdMMMNhsssssssssshNMMMdssssssss.   Shell: bash 5.1.16 
+sssshhhyNMMNyssssssssssssyNMMMysssssss+   Resolution: 1024x768 
ossyNMMMNyMMhsssssssssssssshmmmhssssssso   Terminal: /dev/pts/0 
ossyNMMMNyMMhsssssssssssssshmmmhssssssso   CPU: Intel i5-10210U (4) @ 2.111GHz 
+sssshhhyNMMNyssssssssssssyNMMMysssssss+   GPU: Red Hat, Inc. Virtio GPU 
.ssssssssdMMMNhsssssssssshNMMMdssssssss.   Memory: 464MiB / 3921MiB 
 \sssssssshNMMMyhhyyyyhdNMMMNhssssssss/
  +sssssssssdmydMMMMMMMMddddyssssssss+                             
   \ssssssssssshdmNNNNmyNMMMMhssssss/                              
    .ossssssssssssssssssdMMMNysssso.
      -+sssssssssssssssssyyyssss+-
        `:+ssssssssssssssssss+:`
            .-\+oossssoo+/-.

And there seems to be some bugs, as well.

afbjorklund avatar May 01 '22 19:05 afbjorklund

Started with these:

  • /etc/os-release
    • ID
    • VERSION_ID
    • VARIANT_ID
    • PRETTY_NAME
    • VERSION_CODENAME
  • uname
  • uptime

Example usage:

limactl-inspect

afbjorklund avatar Jun 05 '22 12:06 afbjorklund

Something simple like pfetch would do just fine.

https://github.com/dylanaraps/pfetch

$ limactl shell default ./pfetch
         _    anders@lima-default
     ---(_)   os     Ubuntu 22.10
 _/  ---  \   host   Standard PC (Q35 + ICH9, 2009) pc-q35-4.2
(_) |   |     kernel 5.19.0-26-generic
  \  --- _/   uptime 9m
     ---(_)   pkgs   607
              memory 463M / 3919M
$ limactl shell alpine ./pfetch
   /\ /\        anders@lima-alpine
  // \  \       os     Alpine Linux v3.17
 //   \  \      host   Standard PC (Q35 + ICH9, 2009) pc-q35-4.2
///    \  \     kernel 5.15.80-0-virt
//      \  \    uptime 3m
         \      pkgs   84
                memory 305M / 3934M

https://beucismis.github.io/awesome-fetch/

  1958 pfetch
  6679 screenfetch
 11592 neofetch

afbjorklund avatar Dec 27 '22 16:12 afbjorklund