Hands-On
Hands-On
Understanding the state and configuration of a Linux system is crucial for effective system administration; here are some essential commands that provide insights into various aspects of the system:
$ ssh turingpi
root@10.38.20.33's password:
# uname -a
Linux turingpi 5.4.61 #1 SMP PREEMPT Fri Jul 28 18:47:02 UTC 2023 armv7l GNU/Linux
# curl 'http://10.38.20.33/api/bmc?opt=get&type=other&'
{
"response": [{
"version": "1.1.0",
"buildtime": "2023-07-28",
"ip": "10.38.20.33",
"mac": "4a:13:e4:f9:79:75"
}]
}# free -h
total used free shared buff/cache available
Mem: 108.7M 36.6M 54.9M 128.0K 17.2M 63.0M
Swap: 0 0 0
# df -h
Filesystem Size Used Available Use% Mounted on
ubi0_5 34.0M 32.2M 1.8M 95% /
devtmpfs 49.9M 0 49.9M 0% /dev
tmpfs 54.4M 0 54.4M 0% /dev/shm
tmpfs 54.4M 44.0K 54.3M 0% /tmp
tmpfs 54.4M 84.0K 54.3M 0% /run
/dev/mmcblk0p1 59.5G 4.7G 54.8G 8% /mnt/sdcard
# lspci
lspci: /sys/bus/pci/devices: No such file or directory
# lsusb
Bus 001 Device 001: ID 1d6b:0002
Bus 002 Device 001: ID 1d6b:0001
# cat /etc/os-release
NAME=Buildroot
VERSION=1.1.0
ID=buildroot
VERSION_ID=2023.05
PRETTY_NAME="Buildroot 2023.05"
# ifconfig
eth0 Link encap:Ethernet HWaddr 4A:13:E4:xx:xx:xx
inet addr:10.x.y.z Bcast:10.x.y.z Mask:255.255.255.0
inet6 addr: fd47:25ac:1a19:0:4813:xxxx:xxxx:xxxx/64 Scope:Global
inet6 addr: fe80::4813:e4ff:xxxx:xxxx/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:2019 errors:0 dropped:248 overruns:0 frame:0
TX packets:542 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:157981 (154.2 KiB) TX bytes:76210 (74.4 KiB)
Interrupt:41
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:19 errors:0 dropped:0 overruns:0 frame:0
TX packets:19 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:2228 (2.1 KiB) TX bytes:2228 (2.1 KiB)
# lsmod
Module Size Used by Not tainted
# cat /proc/sys/kernel/random/entropy_avail
1849
# exit
Regarding the output of uname -a
there is currently (2023-08-15) an open issue https://github.com/turing-machines/BMC-Firmware/issues/104 to include the BMC version.