Page 1 of 1

Complete description of vcgencmd anywhere?

Posted: Mon Jul 15, 2019 3:02 pm
by Bosse_B
I just stumbled across the very useful vcgencmd program.
I wanted to read the CPU temperature and this is available like so:

Code: Select all

 $ vcgencmd measure_temp
temp=60.0'C
And the following command lists all available functions:

Code: Select all

$ vcgencmd commands
commands="vcos, ap_output_control, ap_output_post_processing, vchi_test_init, vchi_test_exit, vctest_memmap, vctest_start, vctest_stop, vctest_set, vctest_get, pm_set_policy, pm_get_status, pm_show_stats, pm_start_logging, pm_stop_logging, version, commands, set_vll_dir, set_backlight, set_logging, get_lcd_info, arbiter, cache_flush, otp_dump, test_result, codec_enabled, get_camera, get_mem, measure_clock, measure_volts, enable_clock, scaling_kernel, scaling_sharpness, get_hvs_asserts, get_throttled, measure_temp, get_config, hdmi_ntsc_freqs, hdmi_adjust_clock, hdmi_status_show, hvs_update_fields, pwm_speedup, force_audio, hdmi_stream_channels, hdmi_channel_map, display_power, read_ring_osc, memtest, dispmanx_list, get_rsts, 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, bootloader_version, file"
However I have failed to get a description of what is expected as arguments for the commands that need arguments (there are many)...
Is there a *complete* list of function arguments for vcgencmd?
(I googled and found this elinux page but that is incomplete, only listing a few cases.)

Re: Complete description of vcgencmd anywhere?

Posted: Mon Jul 15, 2019 3:50 pm
by trejan
Bosse_B wrote: Is there a *complete* list of function arguments for vcgencmd?
No. Closest to official documentation is probably https://github.com/raspberrypi/document ... cgencmd.md but that isn't complete. A lot of the commands are for internal testing/development and have no public documentation. Everything else you'll need to dig around in the forum or do your own testing.

Re: Complete description of vcgencmd anywhere?

Posted: Mon Jul 15, 2019 3:52 pm
by Bosse_B
Is the source for vcgencmd available?

Re: Complete description of vcgencmd anywhere?

Posted: Mon Jul 15, 2019 3:56 pm
by trejan
Bosse_B wrote:
Mon Jul 15, 2019 3:52 pm
Is the source for vcgencmd available?
Yes but it doesn't show you anything useful since the commands are processed in the VideoCore firmware. vcgencmd will send anything you tell it.

Re: Complete description of vcgencmd anywhere?

Posted: Wed Jul 17, 2019 7:22 am
by deepo
trejan wrote:
Mon Jul 15, 2019 3:56 pm
Bosse_B wrote:
Mon Jul 15, 2019 3:52 pm
Is the source for vcgencmd available?
Yes but it doesn't show you anything useful since the commands are processed in the VideoCore firmware. vcgencmd will send anything you tell it.
Aaargh!

vcdgencmd send-more-money does not seem to work :)

/Mogens

Re: Complete description of vcgencmd anywhere?

Posted: Wed Jul 17, 2019 9:20 am
by jamesh
What do you want to know?

Re: Complete description of vcgencmd anywhere?

Posted: Wed Jul 17, 2019 12:01 pm
by Bosse_B
jamesh wrote:
Wed Jul 17, 2019 9:20 am
What do you want to know?
I would like to check all of the available commands but most require an unknown argument...

Re: Complete description of vcgencmd anywhere?

Posted: Fri Jul 19, 2019 10:25 am
by jamesh
Bosse_B wrote:
Wed Jul 17, 2019 12:01 pm
jamesh wrote:
Wed Jul 17, 2019 9:20 am
What do you want to know?
I would like to check all of the available commands but most require an unknown argument...
Most people have no need of using the majority of vcgencmd's. They are used internally for testing and debugging. The UI for vcgencmd is a bit pants. Could do with much better help, but since it's a debugging tool, it's unlikely to get much love.

Re: Complete description of vcgencmd anywhere?

Posted: Fri Jul 19, 2019 2:04 pm
by Bosse_B
OK, got it.
I only found it when googling for a way to check CPU temperature now that I have an RPi4 to experiment with....

Re: Complete description of vcgencmd anywhere?

Posted: Fri Jul 19, 2019 4:46 pm
by andrum99
Here's some documentation that James created that has not yet made its way into the official documentation:

https://github.com/raspberrypi/document ... cgencmd.md

It's not complete, but it does document the options that are likely to be most useful to users.

Re: Complete description of vcgencmd anywhere?

Posted: Fri Jul 19, 2019 6:19 pm
by ejolson
andrum99 wrote:
Fri Jul 19, 2019 4:46 pm
Here's some documentation that James created that has not yet made its way into the official documentation:

https://github.com/raspberrypi/document ... cgencmd.md

It's not complete, but it does document the options that are likely to be most useful to users.
That's good documentation. Why, do you think, is it not available as a man page?

A reasonably complete and consistent documentation greatly helped people learn about Unix and programming in the beginning. Continuing that tradition seems in line with the Raspberry Pi Foundation's goal of computer literacy.