lima-vm / lima-vm/lima

Show some more information about the guest system

Open
#840 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
21.9k
Forks
957
Avg merge
2d 6h
Merged PRs (30d)
53

Description

### 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

----

```console
$ 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

```console
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

```console
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.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.