又见炊烟升起

导航

=[奔跑吧2书中的debian系统]如何熟悉单板

benshushu:~# df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/root       2.0G  1.1G  793M  57% /
devtmpfs        326M     0  326M   0% /dev
benshushu:~# i2cdetect -y l
-bash: i2cdetect: command not found
benshushu:~# cat /etc/os-release
PRETTY_NAME="Debian GNU/Linux buster/sid"
NAME="Debian GNU/Linux"
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"
benshushu:~# 
benshushu:~# lsmod
Module                  Size  Used by

benshushu:~# cd /proc

benshushu:proc# cat cpuinfo
processor	: 0
BogoMIPS	: 125.00
Features	: fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm jscvt fcma dcpop sha3 sm3 sm4 asimddp sha512 sve asimdfhm flagm sb paca pacg
CPU implementer	: 0x00
CPU architecture: 8
CPU variant	: 0x0
CPU part	: 0x051
CPU revision	: 0

processor	: 1
BogoMIPS	: 125.00
Features	: fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm jscvt fcma dcpop sha3 sm3 sm4 asimddp sha512 sve asimdfhm flagm sb paca pacg
CPU implementer	: 0x00
CPU architecture: 8
CPU variant	: 0x0
CPU part	: 0x051
CPU revision	: 0

processor	: 2
BogoMIPS	: 125.00
Features	: fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm jscvt fcma dcpop sha3 sm3 sm4 asimddp sha512 sve asimdfhm flagm sb paca pacg
CPU implementer	: 0x00
CPU architecture: 8
CPU variant	: 0x0
CPU part	: 0x051
CPU revision	: 0

processor	: 3
BogoMIPS	: 125.00
Features	: fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm jscvt fcma dcpop sha3 sm3 sm4 asimddp sha512 sve asimdfhm flagm sb paca pacg
CPU implementer	: 0x00
CPU architecture: 8
CPU variant	: 0x0
CPU part	: 0x051
CPU revision	: 0
benshushu:proc# cat meminfo
MemTotal:         736564 kB
MemFree:          555076 kB
MemAvailable:     605300 kB
Buffers:            6556 kB
Cached:           101984 kB
SwapCached:            0 kB
Active:            49164 kB
Inactive:          75264 kB
Active(anon):      16044 kB
Inactive(anon):     4700 kB
Active(file):      33120 kB
Inactive(file):    70564 kB
Unevictable:           0 kB
Mlocked:               0 kB
SwapTotal:             0 kB
SwapFree:              0 kB
Dirty:                 0 kB
Writeback:             0 kB
AnonPages:         15892 kB
Mapped:            19688 kB
Shmem:              4860 kB
KReclaimable:      16980 kB
Slab:              38312 kB
SReclaimable:      16980 kB
SUnreclaim:        21332 kB
KernelStack:        2976 kB
PageTables:          764 kB
NFS_Unstable:          0 kB
Bounce:                0 kB
WritebackTmp:          0 kB
CommitLimit:      368280 kB
Committed_AS:      91352 kB
VmallocTotal:   135290159040 kB
VmallocUsed:           0 kB
VmallocChunk:          0 kB
Percpu:              912 kB
HardwareCorrupted:     0 kB
AnonHugePages:         0 kB
ShmemHugePages:        0 kB
ShmemPmdMapped:        0 kB
CmaTotal:          65536 kB
CmaFree:           65244 kB
HugePages_Total:       0
HugePages_Free:        0
HugePages_Rsvd:        0
HugePages_Surp:        0
Hugepagesize:       2048 kB
Hugetlb:               0 kB
benshushu:proc# uname -a
Linux benshushu 5.0.0+ #1 SMP Sun Mar 5 23:53:17 CST 2023 aarch64 GNU/Linux
benshushu:proc# cat cmdline 
noinitrd nokaslr loglevel=8 sched_debug root=/dev/vda rootfstype=ext4 rw crashkernel=256M vfio.dyndbg=+pflmt irq_gic_v3_its.dyndbg=+pflmt iommu.dyndbg=+pflmt irqdomain.dyndbg=+pflmt
benshushu:proc# cat interrupts 
           CPU0       CPU1       CPU2       CPU3       
  3:      68729      64985      66190      65516     GICv3  27 Level     arch_timer
 36:       2865          0          0          0     GICv3  79 Edge      virtio0
 38:          0          0          0          0     GICv3 106 Edge      arm-smmu-v3-evtq
 41:          0          0          0          0     GICv3 109 Edge      arm-smmu-v3-gerror
 42:          0          0          0          0     GICv3  34 Level     rtc-pl031
 43:        171          0          0          0     GICv3  33 Level     uart-pl011
 44:          0          0          0          0     GICv3  23 Level     arm-pmu
 45:         21          0          0          0     GICv3  36 Level     virtio1
 46:          8          0          0          0     GICv3  37 Level     virtio2
IPI0:     17981      16990      13474      12741       Rescheduling interrupts
IPI1:       193        273        257        282       Function call interrupts
IPI2:         0          0          0          0       CPU stop interrupts
IPI3:         0          0          0          0       CPU stop (for crash dump) interrupts
IPI4:         0          0          0          0       Timer broadcast interrupts
IPI5:         0          0          0          0       IRQ work interrupts
IPI6:         0          0          0          0       CPU wake-up interrupts
Err:          0
benshushu:proc# cat device
device-tree/ devices      
benshushu:proc# cat devices
Character devices:
  1 mem
  4 /dev/vc/0
  4 tty
  4 ttyS
  5 /dev/tty
  5 /dev/console
  5 /dev/ptmx
  5 ttyprintk
  7 vcs
 10 misc
 13 input
 29 fb
128 ptm
136 pts
204 ttyAMA
248 binder
249 vfio
250 bsg
251 watchdog
252 rtc
253 dax
254 gpiochip

Block devices:
  7 loop
254 virtblk
259 blkext
benshushu:proc# df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/root       2.0G  1.1G  788M  58% /
devtmpfs        326M     0  326M   0% /dev
tmpfs           360M     0  360M   0% /dev/shm
tmpfs           360M  4.8M  355M   2% /run
tmpfs           5.0M     0  5.0M   0% /run/lock
tmpfs           360M     0  360M   0% /sys/fs/cgroup
kmod_mount      982G   19G  914G   2% /mnt
tmpfs            72M     0   72M   0% /run/user/0
benshushu:proc# fdisk -l
Disk /dev/vda: 2 GiB, 2147483648 bytes, 4194304 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
benshushu:proc# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
vda  254:0    0   2G  0 disk /
benshushu:proc# cat iomem 
09000000-09000fff : pl011@9000000
  09000000-09000fff : pl011@9000000
09010000-09010fff : pl031@9010000
  09010000-09010fff : rtc-pl031
09030000-09030fff : pl061@9030000
  09030000-09030fff : pl061@9030000
09050000-0906ffff : smmuv3@9050000
0a003e00-0a003fff : a003e00.virtio_mmio
10000000-3efeffff : pcie@10000000
  10000000-1003ffff : 0000:00:01.0
40000000-7fffffff : System RAM
  40080000-41bfffff : Kernel code
  41c00000-4208ffff : reserved
  42090000-42240fff : Kernel data
  48000000-480fffff : reserved
  6ac00000-6fbfffff : reserved
  6fd77000-6fdeefff : reserved
  6fdf1000-6fdf2fff : reserved
  6fdf3000-6fdf7fff : reserved
  6fdf8000-6fdfffff : reserved
  6fe00000-7fdfffff : Crash kernel
  7fe00000-7fe00fff : reserved
  7fe01000-7fe03fff : reserved
  7fe04000-7fffffff : reserved
4010000000-401fffffff : PCI ECAM
8000000000-ffffffffff : pcie@10000000
  8000000000-8000003fff : 0000:00:01.0
    8000000000-8000003fff : virtio-pci-modern
  8000004000-8000007fff : 0000:00:02.0
    8000004000-8000007fff : virtio-pci-modern
benshushu:proc# ps -A
  PID TTY          TIME CMD
    1 ?        00:00:29 systemd
    2 ?        00:00:00 kthreadd
    3 ?        00:00:00 rcu_gp
    4 ?        00:00:00 rcu_par_gp
    5 ?        00:00:00 kworker/0:0-events
    6 ?        00:00:00 kworker/0:0H-kblockd
    7 ?        00:00:04 kworker/u8:0-events_unbound
    8 ?        00:00:00 mm_percpu_wq
    9 ?        00:00:01 ksoftirqd/0
   10 ?        00:00:30 rcu_sched
   11 ?        00:00:00 migration/0
   12 ?        00:00:01 kworker/0:1-events
   13 ?        00:00:00 cpuhp/0
   14 ?        00:00:00 cpuhp/1
   15 ?        00:00:00 migration/1
   16 ?        00:00:00 ksoftirqd/1
   17 ?        00:00:00 kworker/1:0-cgroup_destroy
   18 ?        00:00:00 kworker/1:0H-kblockd
   19 ?        00:00:00 cpuhp/2
   20 ?        00:00:00 migration/2
   21 ?        00:00:00 ksoftirqd/2
   22 ?        00:00:00 kworker/2:0-cgroup_destroy
   23 ?        00:00:00 kworker/2:0H-kblockd
   24 ?        00:00:00 cpuhp/3
   25 ?        00:00:00 migration/3
   26 ?        00:00:00 ksoftirqd/3
   28 ?        00:00:00 kworker/3:0H-kblockd
   29 ?        00:00:00 kdevtmpfs
   30 ?        00:00:00 netns
   33 ?        00:00:00 kworker/2:1-mm_percpu_wq
   34 ?        00:00:00 khungtaskd
   35 ?        00:00:00 oom_reaper
   36 ?        00:00:00 writeback
   37 ?        00:00:00 kcompactd0
   38 ?        00:00:00 ksmd
   39 ?        00:00:00 khugepaged
   40 ?        00:00:00 crypto
   41 ?        00:00:00 kintegrityd
   42 ?        00:00:00 kblockd
   43 ?        00:00:00 devfreq_wq
   44 ?        00:00:00 watchdogd
   45 ?        00:00:00 kswapd0
  110 ?        00:00:00 kthrotld
  112 ?        00:00:00 irq/38-arm-smmu
  113 ?        00:00:00 kworker/2:1H-kblockd
  114 ?        00:00:00 vfio-irqfd-clea
  115 ?        00:00:00 ion_system_heap
  116 ?        00:00:00 ipv6_addrconf
  122 ?        00:00:00 kworker/3:2-cgroup_destroy
  123 ?        00:00:00 kworker/3:1H-kblockd
  124 ?        00:00:00 kworker/1:1H-kblockd
  125 ?        00:00:02 jbd2/vda-8
  126 ?        00:00:00 ext4-rsv-conver
  127 ?        00:00:00 kworker/0:1H-kblockd
  147 ?        00:00:08 systemd-journal
  155 ?        00:00:00 kworker/1:2-cgroup_destroy
top
- 15:10:10 up 10 min,  1 user,  load average: 1.14, 1.36, 0.97
Tasks:  82 total,   1 running,  81 sleeping,   0 stopped,   0 zombie
%Cpu(s):  9.6 us,  6.2 sy,  0.0 ni, 83.8 id,  0.0 wa,  0.0 hi,  0.4 si,  0.0 st
MiB Mem :    719.3 total,    540.7 free,     55.5 used,    123.1 buff/cache
MiB Swap:      0.0 total,      0.0 free,      0.0 used.    590.2 avail Mem 

  PID USER      PR  NI    VIRT    RES    SHR S  %CPU  %MEM     TIME+ COMMAND    
   10 root      20   0       0      0      0 I   3.6   0.0   0:31.18 rcu_sched  
 5159 root      20   0       0      0      0 I   3.0   0.0   0:01.96 kworker/u+ 
 6441 root      20   0    7584   2956   2556 R   1.6   0.4   0:00.54 top        
  125 root      20   0       0      0      0 S   1.3   0.0   0:02.43 jbd2/vda-8 
  750 root      20   0    2500   1532   1104 S   0.7   0.2   0:05.70 dhcpcd     
    1 root      20   0  165372   9524   6996 S   0.3   1.3   0:29.73 systemd    
    9 root      20   0       0      0      0 S   0.3   0.0   0:01.77 ksoftirqd+ 
  124 root       0 -20       0      0      0 I   0.3   0.0   0:00.38 kworker/1+ 
  127 root       0 -20       0      0      0 I   0.3   0.0   0:00.37 kworker/0+ 
    2 root      20   0       0      0      0 S   0.0   0.0   0:00.17 kthreadd   
    3 root       0 -20       0      0      0 I   0.0   0.0   0:00.00 rcu_gp     
    4 root       0 -20       0      0      0 I   0.0   0.0   0:00.00 rcu_par_gp 
    5 root      20   0       0      0      0 I   0.0   0.0   0:00.45 kworker/0+ 
    6 root       0 -20       0      0      0 I   0.0   0.0   0:00.00 kworker/0+ 
    7 root      20   0       0      0      0 I   0.0   0.0   0:04.07 kworker/u+ 
    8 root       0 -20       0      0      0 I   0.0   0.0   0:00.00 mm_percpu+ 
   11 root      rt   0       0      0      0 S   0.0   0.0   0:00.32 migration+ 
benshushu:proc#  i2cdetect -l
-bash: i2cdetect: command not found
benshushu:proc# ifconfig
enp0s1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 10.0.2.15  netmask 255.255.255.0  broadcast 10.0.2.255
        inet6 fe80::c86e:28c4:625b:2767  prefixlen 64  scopeid 0x20<link>
        inet6 fec0::ce16:adb:3e70:3e71  prefixlen 64  scopeid 0x40<site>
        ether 52:54:00:12:34:56  txqueuelen 1000  (Ethernet)
        RX packets 22  bytes 4043 (3.9 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 57  bytes 6823 (6.6 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1000  (Local Loopback)
        RX packets 2  bytes 78 (78.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 2  bytes 78 (78.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
benshushu:proc# cd /sys/class/thermal/
benshushu:thermal# find .
.

//注:没有找到i2c工具

posted on 2023-03-06 23:26  ni_sy  阅读(2)  评论(0编辑  收藏  举报