{"id":20564803,"url":"https://github.com/robcowart/raspberry_pi_stats","last_synced_at":"2025-04-14T15:13:21.391Z","repository":{"id":46855850,"uuid":"190548446","full_name":"robcowart/raspberry_pi_stats","owner":"robcowart","description":"A script to collect various Raspberry Pi statistics, which are sent via Telegraf to InfluxDB.","archived":false,"fork":false,"pushed_at":"2021-10-13T13:54:22.000Z","size":11,"stargazers_count":62,"open_issues_count":4,"forks_count":8,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-04-14T15:13:13.248Z","etag":null,"topics":["chronograf","influxdb","raspberry-pi","telegraf","tick-stack"],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/robcowart.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-06-06T08:52:30.000Z","updated_at":"2024-02-06T13:17:33.000Z","dependencies_parsed_at":"2022-08-27T05:20:27.932Z","dependency_job_id":null,"html_url":"https://github.com/robcowart/raspberry_pi_stats","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robcowart%2Fraspberry_pi_stats","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robcowart%2Fraspberry_pi_stats/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robcowart%2Fraspberry_pi_stats/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robcowart%2Fraspberry_pi_stats/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/robcowart","download_url":"https://codeload.github.com/robcowart/raspberry_pi_stats/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248904637,"owners_count":21180835,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["chronograf","influxdb","raspberry-pi","telegraf","tick-stack"],"created_at":"2024-11-16T04:29:01.576Z","updated_at":"2025-04-14T15:13:21.361Z","avatar_url":"https://github.com/robcowart.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Raspberry Pi Statistics\n\nA script to collect various Raspberry Pi statistics, which are sent via Telegraf to InfluxDB.\n\n![raspberry_pi_stats_github_social](https://user-images.githubusercontent.com/10326954/59145214-fce42300-89e0-11e9-9de4-f5b3e2cd4507.png)\n\n## Collecting Raspberry Pi Statistics\n\nThe provided `rpi-stats.sh` script collects statistics using Raspbian's `vcgencmd` command. These values are parsed from the command's output and formatted in InfluxDB's [line protocol](https://docs.influxdata.com/influxdb/v1.7/write_protocols/line_protocol_tutorial/) for easy collection via Telegraf's [exec](https://github.com/influxdata/telegraf/tree/master/plugins/inputs/exec) input.\n\n\u003e To learn how to install Telegraf (and the rest of the TICK Stack) on the Raspberry Pi, refer to this [blog](https://www.influxdata.com/blog/running-the-tick-stack-on-a-raspberry-pi/).\n\nCopy the script to the directory from which you wish to run it (I usually put it in `/usr/local/bin`), and ensure that it can be executed by the user under which Telegraf will be run (the default user is `telegraf`). The user will need to have `sudo` rights.\n\nConfigure the Telegraf [exec](https://github.com/influxdata/telegraf/tree/master/plugins/inputs/exec) input to execute the script. For example...\n\n```toml\n[[inputs.exec]]\n  # Commands array\n  commands = [ \"/usr/local/bin/rpi-stats.sh\" ]\n  # Timeout for each command to complete.\n  timeout = \"5s\"\n  # Data format to consume.\n  data_format = \"influx\"\n```\n\n\u003e A complete Telegraf configuration file (`telegraf.conf`) is provided to help you get started.\n\nAfter Telegraf is started, data will be sent to InfluxDB.\n\n## Import the Dashboard\n\nA Raspberry Pi Health dashboard for Chronograf is provided in the file `Raspberry_Pi_Health.json`. This can be imported from Chronograf's Dashboards list.\n\n![Raspberry Pi: Health](https://user-images.githubusercontent.com/10326954/59144161-b50acf00-89d3-11e9-8b8e-988b6dc7c730.png)\n\n## Collected Statistics\n\nMetric | Description\n--- | ---\narm_freq | clock frequency of the ARM processor\narm_mem | memory size allocated to the ARM processor\ncore_freq | clock frequency of the SOC\nconfig_arm_freq | configured clock frequency of the ARM processor\nconfig_core_freq | configured clock frequency of the SOC\nconfig_gpu_freq | configured clock frequency of the GPU\nconfig_sdram_freq | configured clock frequency of the SDRAM\ncore_volts | voltage provided to the SOC\ndpi_freq | clock frequency of the DPI\nemmc_freq | clock frequency of the EMMC\ngpu_mem | memory size allocated to the GPU\nh264_freq | clock frequency of the H.264\nhdmi_freq | clock frequency of the HDMI\nisp_freq | clock frequency of the ISP\nmalloc_mem | free GPU memory in the malloc heap\nmalloc_total_mem | total memory assigned to the GPU malloc heap\nmem_reloc_allocation_failures | relocatable memory failures\nmem_reloc_compactions | relocatable memory compactions\nmem_reloc_legacy_block_failures | relocatable memory legacy block failures\noom_count | count of out-of-memory events\noom_ms | total milliseconds in the out-of-memory handler\npixel_freq | clock frequency of the Pixel\npwm_freq | clock frequency of the PWM\nreloc_mem | free GPU memory in the relocatable heap\nreloc_total_mem | total memory assigned to the GPU relocatable heap\nsdram_c_volts | voltage provided to SOC SDRAM\nsdram_i_volts | voltage provided to I/O SDRAM\nsdram_p_volts | voltage provided to Physical SDRAM \nsoc_temp | temperature of the SOC\nuart_freq | clock frequency of the UART\nv3d_freq | clock frequency of the V3D\nvec_freq | clock frequency of the VEC\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frobcowart%2Fraspberry_pi_stats","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frobcowart%2Fraspberry_pi_stats","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frobcowart%2Fraspberry_pi_stats/lists"}