how to get Raspberry Pi System Information All In One
1.How to fix the bug that there is no signal when the Raspberry Pi is connected to a monitor with an HDMI cable All In One2.Raspberry Pi command line tools vcgencmd All In One3.Python rpi_ws281x library All In One4.Adafruit CircuitPython NeoPixel All In One5.How to fix the problem that Raspberry Pi cannot use the root user for SSH login All In One6.How to modify the hostname and username and password of Raspberry Pi All In One7.树莓派 4B 核心电子元器件图解 All In One8.Linux install vim errors All In One9.How to boot the Raspberry Pi system from a USB Mass Storage Device All In One10.How to Control an External USB Web Camera Using a Raspberry Pi All In One11.ARM Cortex-A72 CPU All In One12.Linux shutdown & reboot & poweroff All In One13.软路由 & 旁路由 All In One14.How to change the default Python2 to Python3 on Linux All In One15.Raspberry Pi 4 Model B Product Information Portal All In One16.use SSH to connect to Raspberry Pi methods All In One17.国产单片机开发板 All In One18.How to use Raspberry Pi scan bluetooth devices All In One19.How to use the Raspberry Pi and Python to control a DHT11 wet and temperate module All In One20.How to use the Raspberry Pi and Python to control a buzzer All In One21.gpiozero API All In One22.RPi.GPIO API All In One23.Node.js & Raspberry Pi & WS2812B RGB LEDs strip All In One24.Raspberry Pi 3 Model B and Raspberry Pi 3 Model B+ and and Raspberry Pi 4 Model B All In One25.How to use Linux command or Python code get Raspberry PI's Temperature All In One26.How to connect to multiple SSD1306 OLED Displays using Raspberry Pi GPIO I2C PIN All In One27.Raspberry Pi & 0.96 inch SSD1306 OLED display All In One28.WS2812B RGB LED 灯带外接电源所需要的电压计算公式 All In One29.Raspberry Pi GPIO pins All In One30.如何使用蓝牙控制树莓派 All In One31. Raspberry Pi & Experience AI All In One32.如何修复树莓派在更换了一个 SD 系统卡后,无法使用 SSH 登录问题 All In One33.How to use the Raspberry Pi to study the Linux kernel source code All In One34.Raspberry Pi 设置开机登录后自启动脚本 All In One35.How to use SSH to access the Raspberry Pi without know the Wi-Fi IP address All In One36.Raspberry Pi Code Editor All In One37.Linux copy from pipe command All In One38.how to use crontab to send an email on Linux All In One39.macOS Terminal & Raspberry Pi client_loop: send disconnect: Broken pipe All In One40.Raspberry Pi crontab not work bug All In One41.Raspberry Pi GPIO 针脚图解教程 All In One
42.how to get Raspberry Pi System Information All In One
43.2023 最新的如何树莓派上安装中文输入法和设置中文语言环境教程 All In One44.Linux change archive mirror All In One45.How to publish a Linux package to mirror All In One46.Raspberry Pi 3B won't turn on after being powered on All In One47.Raspberry Pi Debug Probe All In One48.How to find the "usbmodem" of Raspberry Pi Pico on macOS All In One49.How to check the USB devices connected to Linux by using Terminal All In One50.Raspberry Pi Imager All In One51.use macOS terminal can not install MicroPython on Raspberry Pi Pico bug All In One52.Raspberry Pi Pico All In One53.macOS 如何通过 SSH 访问树莓派 All In One54.面包板使用教程 All In One55.Raspberry Pi Pico & MicroPython All In One56.Raspberry Pi & Python & GPIO All In One57.Raspberry Pi Remote Access All In One58.Raspberry Pi 4 B 8G All In One59.How to use macOS to connect to Raspberry Pi without the monitor All In One60.Linux 关机命令 All In One61.Raspberry Pi 5 All In One62.TensorFlow Lite & Raspberry Pi All In One63.how to install GitLab on Raspberry Pi OS 64.Raspberry Pi & GPIO All In One65.Raspberry Pi 电路图模拟器 All In One66.树莓派 4B 入门教程 All In One67.如何在树莓派上搭建 gitlab 服务 All In One68.Raspberry Pi & Node.js & WebSockets & IM69.Raspberry Pi & Raspberry Pi 4 All In One70.IoT & Raspberry Pi71.NMAP 使用教程 All In One72.如何使用 config.txt 配置 Raspberry Pi 3 的各种信息!73.如何在没有显示器的情况下查看 Raspberry Pi 3 的 IP 地址信息 All In One74.How To Install Linux & Nginx & MySQL & PHP (LEMP) stack on Raspberry Pi 3 All In One75.如何启用树莓派的硬件看门狗功能,让它在系统宕机时可以自动重新开机 All In One76.如何在 Raspberry Pi 树莓派上安装浏览器的详细教程 All In One77.树莓派(raspberry pi 3) 中文界面支持的设置,安装中文环境,中文输入法 All In One78.2016 最新的树莓派3 上手评测图解教程新手必看 All In Onehow to get Raspberry Pi System Information All In One
如何获取
树莓派
的系统信息
$ cd /proc && ls
$ cd /proc && ls -al
# time & human
$ cd /proc && ls -alth
version
$ cat /proc/version
Linux version 5.15.84-v8+ (dom@buildbot) (aarch64-linux-gnu-gcc-8 (Ubuntu/Linaro 8.4.0-3ubuntu1) 8.4.0, GNU ld (GNU Binutils for Ubuntu) 2.34) #1613 SMP PREEMPT Thu Jan 5 12:03:08 GMT 2023
cpuinfo CPU
$ cat /proc/cpuinfo
processor : 0
BogoMIPS : 38.40
Features : fp asimd evtstrm crc32 cpuid
CPU implementer : 0x41
CPU architecture: 8
CPU variant : 0x0
CPU part : 0xd03
CPU revision : 4
processor : 1
BogoMIPS : 38.40
Features : fp asimd evtstrm crc32 cpuid
CPU implementer : 0x41
CPU architecture: 8
CPU variant : 0x0
CPU part : 0xd03
CPU revision : 4
processor : 2
BogoMIPS : 38.40
Features : fp asimd evtstrm crc32 cpuid
CPU implementer : 0x41
CPU architecture: 8
CPU variant : 0x0
CPU part : 0xd03
CPU revision : 4
processor : 3
BogoMIPS : 38.40
Features : fp asimd evtstrm crc32 cpuid
CPU implementer : 0x41
CPU architecture: 8
CPU variant : 0x0
CPU part : 0xd03
CPU revision : 4
Hardware : BCM2835
Revision : a22082
Serial : 0000000095bf9be6
Model : Raspberry Pi 3 Model B Rev 1.2
meminfo
内存
$ cat /proc/meminfo
MemTotal: 931460 kB
MemFree: 135776 kB
MemAvailable: 602524 kB
Buffers: 26604 kB
Cached: 476416 kB
SwapCached: 0 kB
Active: 109196 kB
Inactive: 591260 kB
Active(anon): 984 kB
Inactive(anon): 201676 kB
Active(file): 108212 kB
Inactive(file): 389584 kB
Unevictable: 16 kB
Mlocked: 16 kB
SwapTotal: 102396 kB
SwapFree: 102140 kB
Dirty: 0 kB
Writeback: 0 kB
AnonPages: 197484 kB
Mapped: 155512 kB
Shmem: 5224 kB
KReclaimable: 28016 kB
Slab: 53512 kB
SReclaimable: 28016 kB
SUnreclaim: 25496 kB
KernelStack: 3872 kB
PageTables: 6184 kB
NFS_Unstable: 0 kB
Bounce: 0 kB
WritebackTmp: 0 kB
CommitLimit: 568124 kB
Committed_AS: 1163016 kB
VmallocTotal: 259653632 kB
VmallocUsed: 11004 kB
VmallocChunk: 0 kB
Percpu: 688 kB
CmaTotal: 262144 kB
CmaFree: 92120 kB
partitions
分区
$ cat /proc/partitions
major minor #blocks name
1 0 4096 ram0
1 1 4096 ram1
1 2 4096 ram2
1 3 4096 ram3
1 4 4096 ram4
1 5 4096 ram5
1 6 4096 ram6
1 7 4096 ram7
1 8 4096 ram8
1 9 4096 ram9
1 10 4096 ram10
1 11 4096 ram11
1 12 4096 ram12
1 13 4096 ram13
1 14 4096 ram14
1 15 4096 ram15
179 0 31166976 mmcblk0
179 1 262144 mmcblk0p1
179 2 30900736 mmcblk0p2
vcgencmd
$ vcgencmd version
Jan 5 2023 10:48:31
Copyright (c) 2012 Broadcom
version 8ba17717fbcedd4c3b6d4bce7e50c7af4155cba9 (clean) (release) (start)
pi@rpi3b:~/Desktop $
$ vcgencmd commands
commands="commands, set_logging, bootloader_config, bootloader_version, cache_flush, codec_enabled, get_mem, get_rsts, measure_clock, measure_temp, measure_volts, get_hvs_asserts, get_config, get_throttled, pmicrd, pmicwr, read_ring_osc, version, otp_dump, set_vll_dir, set_backlight, get_lcd_info, arbiter, test_result, get_camera, enable_clock, scaling_kernel, scaling_sharpness, hdmi_ntsc_freqs, hdmi_adjust_clock, hdmi_status_show, hvs_update_fields, pwm_speedup, force_audio, hdmi_stream_channels, hdmi_channel_map, display_power, memtest, dispmanx_list, schmoo, render_bar, disk_notify, inuse_notify, sus_suspend, sus_status, sus_is_enabled, sus_stop_test_thread, egl_platform_switch, mem_validate, mem_oom, mem_reloc_stats, hdmi_cvt, hdmi_timings, readmr, file, vcos, ap_output_control, ap_output_post_processing, vchi_test_init, vchi_test_exit, pm_set_policy, pm_get_status, pm_show_stats, pm_start_logging, pm_stop_logging, vctest_memmap, vctest_start, vctest_stop, vctest_set, vctest_get"
pi@raspberrypi:~ $
https://elinux.org/RPI_vcgencmd_usage
Temperature / 温度
$ vcgencmd measure_temp
# temp=46.7'C
$ vcgencmd measure_volts core
volt=1.3062V
$ vcgencmd measure_clock arm
frequency(48)=600062000
$ vcgencmd codec_enabled H264
$ vcgencmd get_mem arm
arm=948M
$ vcgencmd get_mem gpu
gpu=76M
free
$ free --help
$ free -h
total used free shared buff/cache available
内存: 909Mi 257Mi 133Mi 5.0Mi 518Mi 588Mi
交换: 99Mi 0.0Ki 99Mi
disk free
$ df -h
Filesystem Size Used Avail Use% Mounted on
/dev/root 6.8G 3.3G 3.2G 52% /
devtmpfs 3.6G 0 3.6G 0% /dev
tmpfs 3.9G 0 3.9G 0% /dev/shm
tmpfs 1.6G 1.2M 1.6G 1% /run
tmpfs 5.0M 4.0K 5.0M 1% /run/lock
/dev/sda1 255M 32M 224M 13% /boot
tmpfs 782M 24K 782M 1% /run/user/1000
/dev/mmcblk0p2 29G 4.2G 24G 16% /media/pi/rootfs
/dev/mmcblk0p1 255M 31M 225M 12% /media/pi/bootfs
devicetree
# ❌
$ cat /sys/firmware/devicetree/model
$ cd /sys/firmware/devicetree/ && ls
# base
$ cd /sys/firmware/devicetree/base && ls
# model
# ...
# leds
# ✅
$ cat /sys/firmware/devicetree/base/model
# Raspberry Pi 3 Model B Rev 1.2
# leds
$ cd /sys/firmware/devicetree/base/leds
# led-act
# led-pwr
$ cd /sys/firmware/devicetree/base/leds && ls -al
总用量 0
drwxr-xr-x 4 root root 0 4月 10 15:55 .
drwxr-xr-x 25 root root 0 8月 7 2022 ..
-r--r--r-- 1 root root 10 4月 10 15:58 compatible
drwxr-xr-x 2 root root 0 4月 10 15:58 led-act
drwxr-xr-x 2 root root 0 4月 10 15:58 led-pwr
-r--r--r-- 1 root root 5 4月 10 15:58 name
-r--r--r-- 1 root root 4 4月 10 15:58 phandle
pi@raspberrypi:/sys/firmware/devicetree/base/leds $ cat name
ledspi@raspberrypi:/sys/firmware/devicetree/base/leds $ cd led-act/
pi@raspberrypi:/sys/firmware/devicetree/base/leds/led-act $ ls
default-state gpios label linux,default-trigger name phandle
pi@raspberrypi:/sys/firmware/devicetree/base/leds/led-act $ cat gpios
7pi@raspberrypi:/sys/firmware/devicetree/base/leds/led-act $ cat label
led0pi@raspberrypi:/sys/firmware/devicetree/base/leds/led-act $
https://www.raspberrypi.com/documentation/computers/raspberry-pi.html#raspberry-pi-revision-codes
vcgencmd
http://elinux.org/RPI_vcgencmd_usage
$ man vcgencmd > ./man-docs/vcgencmd.md
pi@rpi3b:~/Desktop $ cat ./man-docs/vcgencmd.md
VCGENCMD(1) General Commands Manual VCGENCMD(1)
NAME
vcgencmd - query the VideoCore for information
SYNOPSIS
vcgencmd [-t] command [params]
vcgencmd -h
vcgencmd --help
DESCRIPTION
vcgencmd is a command line utility that can get various pieces of information from the VideoCore GPU on
the Raspberry Pi.
OPTIONS
-t Time how long the command takes to complete
-h, --help
Show this information
COMMANDS
To get a list of all the commands that vcgencmd supports, type vcgencmd commands. Some of the more use‐
ful commands are described below.
vcos sub-command
The vcos command has a number of sub-commands:
version
Displays the build date and version of the firmware on the VideoCore.
log status
Displays the error log status of the various VideoCore software areas.
version
Displays the build date and version of the firmware on the VideoCore.
get_camera
Displays the enabled and detected state of the official camera. 1 means yes, 0 means no. Whilst
all firmware (except cutdown versions) will support the camera, this support needs to be enabled
by using the start_x boot option [BOOT].
get_throttled
Returns the throttled state of the system. This is a bit pattern - a bit being set indicates the
following meanings:
Bit Meaning
──── ────────────────────────────────────
0 Under-voltage detected
1 Arm frequency capped
2 Currently throttled
3 Soft temperature limit active
16 Under-voltage has occurred
17 Arm frequency capping has occurred
18 Throttling has occurred
19 Soft temperature limit has occurred
A value of zero indicates that none of the above conditions is true.
To find if one of these bits has been set, convert the value returned to binary, then number each
bit along the top. You can then see which bits are set. For example:
0x50000 = 0101 0000 0000 0000 0000
Adding the bit numbers along the top we get:
19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1
0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
From this we can see that bits 18 and 16 are set, indicating that the Pi has previously been
throttled due to under-voltage, but is not currently throttled for any reason.
measure_temp
Returns the temperature of the SoC as measured by the on-board temperature sensor.
measure_clock clock
This returns the current frequency of the specified clock. The options are:
Clock Description
────── ────────────────────────────────
arm ARM cores
core VC4 scaler cores
h264 H.264 block
isp Image Signal Processor
v3d 3D block
uart UART
pwm PWM block (analog audio output)
emmc SD card interface
pixel Pixel valve
vec Analog video encoder
hdmi HDMI
dpi Display Peripheral Interface
For example, vcgencmd measure_clock arm.
measure_volts block
Displays the current voltages used by the specific block.
Block Description
──────── ─────────────────
core VC4 core voltage
sdram_c
sdram_i
sdram_p
otp_dump
Displays the content of the One Time Programmable (OTP) memory, which is part of the SoC. These
are 32 bit values, indexed from 8 to 64. See the raspi-otp(7) for more details.
get_mem type
Reports on the amount of memory allocated to the ARM cores with vcgencmd get_mem arm or the VC4
with vcgencmd get_mem gpu.
Note: On a Raspberry Pi 4 with greater than 1GB of RAM, the arm option is inaccurate. This is be‐
cause the GPU firmware which implements this command is only aware of the first gigabyte of RAM on
the system, so the arm setting will always return 1GB minus the gpu memory value. To get an accu‐
rate report of the amount of ARM memory, use one of the standard Linux commands, such as free or
cat /proc/meminfo.
codec_enabled type
Reports whether the specified CODEC type is enabled. Possible options for type are AGIF, FLAC,
H263, H264, MJPA, MJPB, MJPG, MPG2, MPG4, MVC0, PCM, THRA, VORB, VP6, VP8, WMV9, WVC1.
MPG2, WMV9, and WVC1 currently require a paid for licence (see the [FAQ] for more info), except on
the Pi4, where these hardware codecs are disabled in preference to software decoding, which re‐
quires no licence. Note that because the H265 hardware block on the Raspberry Pi4 is not part of
the VideoCore GPU, its status is not accessed via this command.
get_config type|name
This returns all the configuration items of the specified type that have been set in config.txt,
or a single configuration item. Possible values for type parameter are int, str, or simply use the
name of the configuration item.
get_lcd_info
Displays the resolution and colour depth of any attached display.
mem_oom
Displays statistics on any Out Of Memory events occuring in the VC4 memory space.
mem_reloc_stats
Displays statistics from the relocatable memory allocator on the VC4.
read_ring_osc
Returns the curent speed voltage and temperature of the ring oscillator.
hdmi_timings
Displays the current HDMI settings timings. See [VIDEO] for details of the values returned.
dispmanx_list
Dump a list of all dispmanx items currently being displayed.
display_power 0|1|-1
display_power 0|1|-1 display
Show current display power state, or set the display power state. vcgencmd display_power 0 will
turn off power to the current display. vcgencmd display_power 1 will turn on power to the dis‐
play. If no parameter is set, this will display the current power state. The final parameter is an
optional display ID, as returned by tvservice -l or from the table below, which allows a specific
display to be turned on or off.
vcgencmd display_power 0 7 will turn off power to display ID 7, which is HDMI 1 on a Raspberry Pi
4.
Display ID
────────────── ───
Main LCD 0
Secondary LCD 1
HDMI 0 2
Composite 3
HDMI 1 7
To determine if a specific display ID is on or off, use -1 as the first parameter.
vcgencmd display_power -1 7 will return 0 if display ID 7 is off, 1 if display ID 7 is on, or -1
if display ID 7 is in an unknown state, for example undetected.
EXIT STATUS
0 Command completed successfully
-1 Problem with VHCI
-2 VideoCore returned an error
SEE ALSO
[DOCS] https://www.raspberrypi.org/documentation/computers/os.html#vcgencmd
VCGENCMD(1)
pi@rpi3b:~/Desktop $
refs
https://linuxhint.com/find-hardware-information-raspberry-pi/
关闭
电源管理
DPMS (Display Power Management Signaling)
DPMS
(显示器电源管理信号)
https://www.cnblogs.com/xgqfrms/p/16481735.html#5166435
©xgqfrms 2012-2021
www.cnblogs.com/xgqfrms 发布文章使用:只允许注册用户才可以访问!
原创文章,版权所有©️xgqfrms, 禁止转载 🈲️,侵权必究⚠️!
本文首发于博客园,作者:xgqfrms,原文链接:https://www.cnblogs.com/xgqfrms/p/17303351.html
未经授权禁止转载,违者必究!
合集:
Raspberry Pi
标签:
Raspberry Pi
, Raspberry Pi OS
, system information
, 电源管理
, DPMS
, temperature
, 树莓派
, vcgencmd
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 物流快递公司核心技术能力-地址解析分单基础技术分享
· .NET 10首个预览版发布:重大改进与新特性概览!
· 单线程的Redis速度为什么快?
· 展开说说关于C#中ORM框架的用法!
· Pantheons:用 TypeScript 打造主流大模型对话的一站式集成库
2022-04-10 如何在 Apple Mac 上获得 IP 地址 All In One
2022-04-10 Custom HTML5 Video Download All-in-One
2021-04-10 DOM & window & document & html & body All In One
2021-04-10 how to using js get window bind events length
2021-04-10 how to using js get addEventListener bind events length
2020-04-10 MongoDB 101
2020-04-10 Regular Expressions All In One