2013年11月3日 星期日

[RPi] vcgencmd commands

vcgencmd是firmware#362371才多出來的新功能, 可以配合參數看一些資訊 首先列出可以用的參數
/opt/vc/bin/vcgencmd commands
commands="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, version, commands, set_vll_dir, led_control, set_backlight, set_logging, get_lcd_info, set_bus_arbiter_mode, cache_flush, otp_dump, codec_enabled, get_camera, get_mem, measure_clock, measure_volts, measure_temp, get_config, hdmi_ntsc_freqs, hdmi_status_show, pwm_speedup, 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, file, vctest_memmap, vctest_start, vctest_stop, vctest_set, vctest_get"
舉例來說, 想看目前安裝的firmware是哪一個版本
/opt/vc/bin/vcgencmd version
Sep  1 2013 23:27:46 
Copyright (c) 2012 Broadcom
version 4f9d19896166f46a3255801bc1834561bf092732 (clean) (release)
比如說想看目前BCM2835這顆SoC上的溫度
/opt/vc/bin/vcgencmd measure_temp
temp=47.1'C
比如說查看目前可以使用的codec
for codec in H264 MPG2 WVC1 MPG4 MJPG WMV9 ; do \
     echo -e "$codec:\t$(vcgencmd codec_enabled $codec)" ; \
done
H264: H264=enabled
MPG2: MPG2=disabled
WVC1: WVC1=disabled
MPG4: MPG4=enabled
MJPG: MJPG=enabled
WMV9: WMV9=disabled
還有很多可以用的參數, 詳見github

reference:
* RPI vcgencmd usage
* VideoCore Tools

沒有留言: