Raspberry Pi command line tools vcgencmd All In One

xgqfrms / 2023-06-04 / 原文

Raspberry Pi command line tools vcgencmd All In One

vcgencmd

$ vcgencmd -h
$ vcgencmd --help
Usage: vcgencmd [-t] command
Send a command to the VideoCore and print the result.

  -t          Time how long the command takes to complete
  -h, --help  Show this information

Use the command 'vcgencmd commands' to get a list of available commands

Exit status:
   0    command completed successfully
  -1    problem with VCHI
  -2    VideoCore returned an error

For further documentation please see
https://www.raspberrypi.org/documentation/computers/os.html#vcgencmd
$ vcgencmd version
Jan  5 2023 10:48:31 
Copyright (c) 2012 Broadcom
version 8ba17717fbcedd4c3b6d4bce7e50c7af4155cba9 (clean) (release) (start)
$ 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, set_vll_dir, set_backlight, get_lcd_info, arbiter, otp_dump, 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"

image

https://www.raspberrypi.org/documentation/computers/os.html#vcgencmd

demos

$ vcgencmd measure_temp
# temp=45.6'C

$ vcgencmd measure_clock arm
# frequency(48)=600062000

$ vcgencmd get_throttled
# throttled=0x50005 ❌ 欠压

vcgencmd alias

$ sudo vim .bashrc

$ cat .bashrc
# 🚀
alias vcmv='vcgencmd measure_volts'
alias vcmt='vcgencmd measure_temp'
alias vcarm='vcgencmd measure_clock arm'

# update ✅
# source ~/.bashrc
pi@rpi3b:~ $ source ~/.bashrc
pi@rpi3b:~ $ vcmt
temp=46.7'C
pi@rpi3b:~ $ vcarm
frequency(48)=600000000
pi@rpi3b:~ $ vcmv
volt=1.3125V
pi@rpi3b:~ $ 

refs



©xgqfrms 2012-2021

原创文章,版权所有©️xgqfrms, 禁止转载 🈲️,侵权必究⚠️!