├── grafana-dashboards ├── rpi-throttling-example.png └── rpi-throttling-example.json ├── telegraf.d ├── 040-pi-throttled.conf ├── 041-pi-cputemp.conf ├── 042-pi-voltages.conf ├── 044-pi-mem.conf └── 043-pi-frequencies.conf ├── sudoers.d └── 040-telegraf ├── scripts └── telegraf-pi-get-throttled.sh ├── README.md └── LICENSE /grafana-dashboards/rpi-throttling-example.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fivesixzero/telegraf-pi-bash/HEAD/grafana-dashboards/rpi-throttling-example.png -------------------------------------------------------------------------------- /telegraf.d/040-pi-throttled.conf: -------------------------------------------------------------------------------- 1 | # RPi Throttle states 2 | [[inputs.exec]] 3 | commands = [ "/home/pi/bin/telegraf-pi-get-throttled.sh" ] 4 | name_override = "rpi_throttling" 5 | data_format = "grok" 6 | grok_patterns = ["uv=%{NUMBER:now_undervolted:int} uvb=%{NUMBER:since_boot_undervolted:int} afc=%{NUMBER:now_arm_frequency_capped:int} afcb=%{NUMBER:since_boot_arm_frequency_capped:int} tr=%{NUMBER:now_throttled:int} trb=%{NUMBER:since_boot_throttled:int} str=%{NUMBER:now_soft_temp_limit_reached:int} strb=%{NUMBER:since_boot_soft_temp_limit_reached:int}"] -------------------------------------------------------------------------------- /telegraf.d/041-pi-cputemp.conf: -------------------------------------------------------------------------------- 1 | # RPi CPU Temperature 2 | [[inputs.exec]] 3 | commands = [ '''sed -e 's/^\([0-9]\{2\}\)\(.*\)$/\1.\2/' /sys/class/thermal/thermal_zone0/temp''' ] 4 | name_override = "rpi_temp" 5 | data_format = "grok" 6 | grok_patterns = ["%{NUMBER:temp_cpu:float}"] 7 | ## Example config for fan current/target rpm in cases where a 8 | ## fan controller w/ kernel driver is in use, like an emc2301 9 | # [[inputs.exec]] 10 | # commands = [ "cat /sys/class/hwmon/hwmon2/fan1_input" ] 11 | # name_override = "rpi_temp" 12 | # data_format = "grok" 13 | # grok_patterns = ["%{NUMBER:fan_rpm:int}"] 14 | # [[inputs.exec]] 15 | # commands = [ "cat /sys/class/hwmon/hwmon2/fan1_target" ] 16 | # name_override = "rpi_temp" 17 | # data_format = "grok" 18 | # grok_patterns = ["%{NUMBER:fan_target:int}"] -------------------------------------------------------------------------------- /telegraf.d/042-pi-voltages.conf: -------------------------------------------------------------------------------- 1 | # RPi Voltages 2 | [[inputs.exec]] 3 | commands = [ "sudo vcgencmd measure_volts core" ] 4 | name_override = "rpi_voltage" 5 | data_format = "grok" 6 | grok_patterns = ["volt=%{NUMBER:core:float}"] 7 | [[inputs.exec]] 8 | commands = [ "sudo vcgencmd measure_volts sdram_i" ] 9 | name_override = "rpi_voltage" 10 | data_format = "grok" 11 | grok_patterns = ["volt=%{NUMBER:sdram_i:float}"] 12 | [[inputs.exec]] 13 | commands = [ "sudo vcgencmd measure_volts sdram_p" ] 14 | name_override = "rpi_voltage" 15 | data_format = "grok" 16 | grok_patterns = ["volt=%{NUMBER:sdram_p:float}"] 17 | [[inputs.exec]] 18 | commands = [ "sudo vcgencmd measure_volts sdram_c" ] 19 | name_override = "rpi_voltage" 20 | data_format = "grok" 21 | grok_patterns = ["volt=%{NUMBER:sdram_c:float}"] -------------------------------------------------------------------------------- /sudoers.d/040-telegraf: -------------------------------------------------------------------------------- 1 | # sudoers.d entry to allow telegraf to run specific vcgencmd operations as root 2 | # 3 | # WARNING: Editing /etc/sudoers or copying a file into /etc/sudoers.d is risky 4 | # and can break sudo for all users on the system. Fixing a broken sudoers 5 | # file will require using a second pre-existing root shell or editing files 6 | # on the RPi's SD card using another Linux system to revert the changes. 7 | # 8 | # More info: 9 | # https://github.com/fivesixzero/telegraf-pi-bash/issues/3#issuecomment-666862392 10 | # 11 | # That said, this file works fine on my Debian Buster-based and Ubuntu systems but 12 | # your mileage may vary depending on your distro and your existing sudoers config. 13 | # 14 | Cmnd_Alias RPIDATA = /opt/vc/bin/vcgencmd get_throttled, /opt/vc/bin/vcgencmd measure_temp, /opt/vc/bin/vcgencmd measure_volts *, /opt/vc/bin/vcgencmd measure_clock *, /opt/vc/bin/vcgencmd get_mem * 15 | telegraf ALL=(root) NOEXEC: NOPASSWD: RPIDATA 16 | Defaults!RPIDATA !logfile, !syslog, !pam_session, !requiretty 17 | -------------------------------------------------------------------------------- /telegraf.d/044-pi-mem.conf: -------------------------------------------------------------------------------- 1 | # RPi Memory Spaces 2 | # arm gpu malloc malloc_total reloc reloc_total 3 | [[inputs.exec]] 4 | commands = [ "sudo vcgencmd get_mem arm" ] 5 | name_override = "rpi_mem" 6 | data_format = "grok" 7 | grok_patterns = ["arm=%{NUMBER:arm:int}"] 8 | [[inputs.exec]] 9 | commands = [ "sudo vcgencmd get_mem gpu" ] 10 | name_override = "rpi_mem" 11 | data_format = "grok" 12 | grok_patterns = ["gpu=%{NUMBER:gpu:int}"] 13 | [[inputs.exec]] 14 | commands = [ "sudo vcgencmd get_mem malloc" ] 15 | name_override = "rpi_mem" 16 | data_format = "grok" 17 | grok_patterns = ["malloc=%{NUMBER:malloc:int}"] 18 | [[inputs.exec]] 19 | commands = [ "sudo vcgencmd get_mem malloc_total" ] 20 | name_override = "rpi_mem" 21 | data_format = "grok" 22 | grok_patterns = ["malloc_total=%{NUMBER:malloc_total:int}"] 23 | [[inputs.exec]] 24 | commands = [ "sudo vcgencmd get_mem reloc" ] 25 | name_override = "rpi_mem" 26 | data_format = "grok" 27 | grok_patterns = ["reloc=%{NUMBER:reloc:int}"] 28 | [[inputs.exec]] 29 | commands = [ "sudo vcgencmd get_mem reloc_total" ] 30 | name_override = "rpi_mem" 31 | data_format = "grok" 32 | grok_patterns = ["reloc_total=%{NUMBER:reloc_total:int}"] 33 | -------------------------------------------------------------------------------- /telegraf.d/043-pi-frequencies.conf: -------------------------------------------------------------------------------- 1 | # RPi Frequencies 2 | # Available frequencies: https://github.com/torvalds/linux/blob/master/drivers/clk/bcm/clk-bcm2835.c 3 | [[inputs.exec]] 4 | commands = [ "sudo vcgencmd measure_clock arm" ] 5 | name_override = "rpi_frequency" 6 | data_format = "grok" 7 | grok_patterns = ["frequency[()0-9]*=%{NUMBER:arm:int}"] 8 | [[inputs.exec]] 9 | commands = [ "sudo vcgencmd measure_clock core" ] 10 | name_override = "rpi_frequency" 11 | data_format = "grok" 12 | grok_patterns = ["frequency[()0-9]*=%{NUMBER:core:int}"] 13 | [[inputs.exec]] 14 | commands = [ "sudo vcgencmd measure_clock sdram" ] 15 | name_override = "rpi_frequency" 16 | data_format = "grok" 17 | grok_patterns = ["frequency[()0-9]*=%{NUMBER:sdram:int}"] 18 | [[inputs.exec]] 19 | commands = [ "sudo vcgencmd measure_clock isp" ] 20 | name_override = "rpi_frequency" 21 | data_format = "grok" 22 | grok_patterns = ["frequency[()0-9]*=%{NUMBER:isp:int}"] 23 | [[inputs.exec]] 24 | commands = [ "sudo vcgencmd measure_clock h264" ] 25 | name_override = "rpi_frequency" 26 | data_format = "grok" 27 | grok_patterns = ["frequency[()0-9]*=%{NUMBER:h264:int}"] 28 | [[inputs.exec]] 29 | commands = [ "sudo vcgencmd measure_clock hevc" ] 30 | name_override = "rpi_frequency" 31 | data_format = "grok" 32 | grok_patterns = ["frequency[()0-9]*=%{NUMBER:hevc:int}"] 33 | [[inputs.exec]] 34 | commands = [ "sudo vcgencmd measure_clock m2mc" ] 35 | name_override = "rpi_frequency" 36 | data_format = "grok" 37 | grok_patterns = ["frequency[()0-9]*=%{NUMBER:m2mc:int}"] 38 | [[inputs.exec]] 39 | commands = [ "sudo vcgencmd measure_clock v3d" ] 40 | name_override = "rpi_frequency" 41 | data_format = "grok" 42 | grok_patterns = ["frequency[()0-9]*=%{NUMBER:v3d:int}"] 43 | [[inputs.exec]] 44 | commands = [ "sudo vcgencmd measure_clock pixel-pvb" ] 45 | name_override = "rpi_frequency" 46 | data_format = "grok" 47 | grok_patterns = ["frequency[()0-9]*=%{NUMBER:pixel_pvb:int}"] 48 | [[inputs.exec]] 49 | commands = [ "sudo vcgencmd measure_clock pixel" ] 50 | name_override = "rpi_frequency" 51 | data_format = "grok" 52 | grok_patterns = ["frequency[()0-9]*=%{NUMBER:pixel:int}"] 53 | [[inputs.exec]] 54 | commands = [ "sudo vcgencmd measure_clock uart" ] 55 | name_override = "rpi_frequency" 56 | data_format = "grok" 57 | grok_patterns = ["frequency[()0-9]*=%{NUMBER:uart:int}"] 58 | [[inputs.exec]] 59 | commands = [ "sudo vcgencmd measure_clock pwm" ] 60 | name_override = "rpi_frequency" 61 | data_format = "grok" 62 | grok_patterns = ["frequency[()0-9]*=%{NUMBER:pwm:int}"] 63 | [[inputs.exec]] 64 | commands = [ "sudo vcgencmd measure_clock emmc" ] 65 | name_override = "rpi_frequency" 66 | data_format = "grok" 67 | grok_patterns = ["frequency[()0-9]*=%{NUMBER:emmc:int}"] 68 | [[inputs.exec]] 69 | commands = [ "sudo vcgencmd measure_clock emmc2" ] 70 | name_override = "rpi_frequency" 71 | data_format = "grok" 72 | grok_patterns = ["frequency[()0-9]*=%{NUMBER:emmc2:int}"] -------------------------------------------------------------------------------- /scripts/telegraf-pi-get-throttled.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # telegraf-pi-get-throttled.sh 4 | # 5 | # Get and parse RPi throttled state to produce single Grok-ready string. 6 | # 7 | # * Root access is required for this script to run properly, since it relies on vcgencmd to poll the VideoCore mailbox for the throttle state. 8 | 9 | ### Data Acquisition 10 | # Poll the VideoCore mailbox using vcgencmd to get the throttle state then use sed to grab just the hex digits 11 | throttle_state_hex=$(sudo /opt/vc/bin/vcgencmd get_throttled | sed -e 's/.*=0x\([0-9a-fA-F]*\)/\U\1/') 12 | 13 | ### Example vars for testing 14 | ## Debug: uv=1 uvb=1 afc=0 afcb=0 tr=1 trb=0 str=0 (null) strb=0 (null) 15 | # throttle_state_hex=50005 16 | ## Debug: uv=0 uvb=1 afc=0 afcb=0 tr=0 trb=0 str=0 (null) strb=0 (null) 17 | # throttle_state_hex=50000 18 | ## Debug: uv=1 uvb=1 afc=1 afcb=1 tr=1 trb=1 str=1 strb=1 19 | # throttle_state_hex=F000F 20 | ## Debug: uv=1 uvb=1 afc=0 afcb=1 tr=0 trb=1 str=0 strb=1 21 | # throttle_state_hex=F0008 22 | ## Debug: uv=0 uvb=1 afc=0 afcb=1 tr=0 trb=1 str=1 strb=1 23 | # throttle_state_hex=F0001 24 | 25 | ### Command Examples 26 | ## dc: Convert hex to dec or binary (useful for get_throttled output) 27 | # Example: dc -e 16i2o50005p 28 | # Syntax: dc -e iop 29 | # i = push base_in (previous var) to stack 30 | # o = push base_out (previous var) to stack 31 | # p = print conversion output with newline to stdout 32 | 33 | get_base_conversion () { 34 | args=${1}i${2}o${3}p 35 | binary=$(dc -e $args) 36 | if [[ $(echo $binary | wc -c) -le 20 ]]; then 37 | printf %020d $binary 38 | else 39 | printf $binary 40 | fi 41 | } 42 | 43 | throttle_state_bin=$(get_base_conversion 16 2 $throttle_state_hex) 44 | 45 | binpattern="[0-1]{20}" 46 | if [[ $throttle_state_bin =~ $binpattern ]]; then 47 | ## Reference: get_throttled bit flags 48 | # https://github.com/raspberrypi/firmware/commit/404dfef3b364b4533f70659eafdcefa3b68cd7ae#commitcomment-31620480 49 | # 50 | # NOTE: These ref numbers are reversed compared to vcencmd output. 51 | # 52 | # Since Boot Now 53 | # | | 54 | # 0101 0000 0000 0000 0101 55 | # |||| ||||_ [19] throttled 56 | # |||| |||_ [18] arm frequency capped 57 | # |||| ||_ [17] under-voltage 58 | # |||| |_ [16] soft temperature capped 59 | # ||||_ [3] throttling has occurred since last reboot 60 | # |||_ [2] arm frequency capped since last reboot 61 | # ||_ [1] under-voltage has occurred since last reboot 62 | # |_ [0] soft temperature reached since last reboot 63 | 64 | strb=${throttle_state_bin:0:1} 65 | uvb=${throttle_state_bin:1:1} 66 | afcb=${throttle_state_bin:2:1} 67 | trb=${throttle_state_bin:3:1} 68 | str=${throttle_state_bin:16:1} 69 | uv=${throttle_state_bin:17:1} 70 | afc=${throttle_state_bin:18:1} 71 | tr=${throttle_state_bin:19:1} 72 | 73 | echo "uv=${uv:-0} uvb=${uvb:-0} afc=${afc:-0} afcb=${afcb:-0} tr=${tr:-0} trb=${trb:-0} str=${str:-0} strb=${strb:-0}" 74 | fi 75 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # telegraf-pi-bash 2 | 3 | Telegraf scripts and configs for monitoring Raspberry Pi internals. 4 | 5 | * Throttle States 6 | * `vcgencmd get_throttled` 7 | * `/sys/devices/platform/soc/soc:firmware/get_throttled` 8 | * SOC Temperature 9 | * `vcgencmd measure_temp` 10 | * `/sys/class/thermal/thermal_zone0/temp` 11 | * CPU and SDRAM Voltages 12 | * `vcgencmd measure_volts *` 13 | * Onboard Clocks 14 | * `vcgencmd measure_clock *` 15 | * Pi-Specific Memory Spaces 16 | * `vcgencmd get_mem *` 17 | 18 | ## Requirements 19 | 20 | The script is written for a default Raspbian Buster environment with a few changes. 21 | 22 | * `bin` directory for scripts under the Pi user's home directory 23 | * `/home/pi/bin` 24 | * `telegraf` installed via `influxdata` repo 25 | * 26 | 27 | ## Warning: Sudoers modification(s) 28 | 29 | Running `vcgencmd` as its used in this script will require sudo. 30 | 31 | This script, like many that require `telegraf` to run a command requiring `sudo`, will require some editing of the `sudoers` file or and addition to `sudoers.d`. This can cause problems if there are any inconsistencies in the file or if your distro somehow doesn't play nice with the file I've included in this repo. If you're not familiar with editing `sudoers` manually then this might not be the solution you need, although I'd strongly recommend learning about it since its a good skill to have when working with Linux. 32 | 33 | If you run into issues or if you're not familiar with using `sudoers.d` the first reply in this issue may be helpful. 34 | 35 | 36 | 37 | ## Usage 38 | 39 | * Copy contents of `telegraf.d` into `/etc/telegraf/telegraf.d/` 40 | * `sudo cp ./telegraf.d /etc/telegraf/telegraf.d` 41 | * Copy contents of `sudoers.d` into `/etc/sudoers.d` 42 | * `sudo cp ./sudoers.d/* /etc/sudoers.d` 43 | * Copy contents of `scripts` into `/home/pi/bin` 44 | * `cp ./scripts/* /home/pi/bin` 45 | * Restart `telegraf` service 46 | * `sudo service telegraf restart` 47 | 48 | ## Reference Data and Links 49 | 50 | ### Throttling on the Raspberry Pi platform 51 | 52 | In general, the throttlign features of the Pi provide thermal and voltage stability protection. When voltages get too low or temperatures get too high, the SOC will reduce frequencies for the CPU, GPU and other components to reduce temperatures and load on the power supply. Often, these mitigations can prevent a total system failue even in adverse conditions at the cost of reducing performance. 53 | 54 | Throttling has four different component states. 55 | 56 | * **Soft Temp Limit Reached** 57 | * When the firmware soft temp limit is reached, the CPU frequency is reduced by 200 MHz to avoid additional temperature increase 58 | * Set via: `temp_soft_limit` in `/boot/config.txt`, default `60` 59 | * **ARM Frequency Capped** 60 | * "Capping just limits the arm frequency (somewhere between 600MHz and 1200MHz) to try to avoid throttling." 61 | * This happens when the temperature reaches 80 C 62 | * **Under-voltage** 63 | * If the voltage drops below 4.63V, the Pi considers itself "under-volted" and will engage throttling to reduce load 64 | * **Throttling** 65 | * "Throttling removes turbo mode, which reduces core voltage, and sets arm and gpu frequencies to non-turbo value." 66 | * "Over-temperature occurs with temp > 85'C. The Pi is throttled" 67 | 68 | There are also two temporal states. 69 | 70 | * **Since Boot** 71 | * This indicates whether or not a throttling state has been activated since last system boot 72 | * **Current** 73 | * This reflects the current state, with a rolling 3 second window. 74 | 75 | ### Getting and Using Throttle State 76 | 77 | The current throttle state can be easily viewed via command line using `vcgencmd` or via `/sys/devices/platform/soc/soc:firmware/get_throttled` on newer Raspbian distros. The state is displayed in as a hexidecimal number representing 20 bits of relevant data. Converting this hex number to binary reveals the status bitfields. 78 | 79 | Example: Throttled and Undervolted 80 | 81 | ```sh 82 | pi@raspberrypi:~ $ sudo vcgencmd get_throttled 83 | throttled=0x50005 84 | ``` 85 | 86 | Converting this output to binary using many methods will typically ignore leading zeroes though. Getting the proper 87 | 88 | ```sh 89 | pi@raspberrypi:~ $ dc -e '16i2o50005p' 90 | 1010000000000000101‬ 91 | ``` 92 | 93 | Front-padding the output with zeroes will provide a usable binary number for bitfield analysis. 94 | 95 | ```sh 96 | printf %020d `dc -e '16i2o50005p'` 97 | 01010000000000000101‬ 98 | ``` 99 | 100 | ### Throttle Flag Decoding 101 | 102 | The throttle flags are reported by `vcgencmd` as a 20-bit hex number that provides space for 20 bitflags. Of these 20 bitflags, 8 are used as of kernel `4.14.70`. Prior to that kernel version only six flags were in use. 103 | 104 | Most of the documentation I found via Googling appeared to be out of date or incorrect. Based on testing, this is the value map I've come up with. 105 | 106 | ```txt 107 | Since Boot Now 108 | | | 109 | 0101 0000 0000 0000 0101‬ 110 | |||| ||||_ [19] throttled 111 | |||| |||_ [18] arm frequency capped 112 | |||| ||_ [17] under-voltage 113 | |||| |_ [16] soft temperature capped 114 | ||||_ [3] throttling has occurred since last reboot 115 | |||_ [2] arm frequency capped since last reboot 116 | ||_ [1] under-voltage has occurred since last reboot 117 | |_ [0] soft temperature reached since last reboot 118 | ``` 119 | 120 | ### Ref Links 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | ## TODOs and Ideas 131 | 132 | * Write a proper Golang plugin for Telegraf 133 | * Identify and document hardware monitoring related mailboxes for direct access 134 | * Find or write a Go library for reading data via mailboxes 135 | * Move from `vcgencmd` to using `sysfs` across as many items as possible 136 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | GNU GENERAL PUBLIC LICENSE 2 | Version 3, 29 June 2007 3 | 4 | Copyright (C) 2007 Free Software Foundation, Inc. 5 | Everyone is permitted to copy and distribute verbatim copies 6 | of this license document, but changing it is not allowed. 7 | 8 | Preamble 9 | 10 | The GNU General Public License is a free, copyleft license for 11 | software and other kinds of works. 12 | 13 | The licenses for most software and other practical works are designed 14 | to take away your freedom to share and change the works. By contrast, 15 | the GNU General Public License is intended to guarantee your freedom to 16 | share and change all versions of a program--to make sure it remains free 17 | software for all its users. We, the Free Software Foundation, use the 18 | GNU General Public License for most of our software; it applies also to 19 | any other work released this way by its authors. You can apply it to 20 | your programs, too. 21 | 22 | When we speak of free software, we are referring to freedom, not 23 | price. Our General Public Licenses are designed to make sure that you 24 | have the freedom to distribute copies of free software (and charge for 25 | them if you wish), that you receive source code or can get it if you 26 | want it, that you can change the software or use pieces of it in new 27 | free programs, and that you know you can do these things. 28 | 29 | To protect your rights, we need to prevent others from denying you 30 | these rights or asking you to surrender the rights. Therefore, you have 31 | certain responsibilities if you distribute copies of the software, or if 32 | you modify it: responsibilities to respect the freedom of others. 33 | 34 | For example, if you distribute copies of such a program, whether 35 | gratis or for a fee, you must pass on to the recipients the same 36 | freedoms that you received. You must make sure that they, too, receive 37 | or can get the source code. And you must show them these terms so they 38 | know their rights. 39 | 40 | Developers that use the GNU GPL protect your rights with two steps: 41 | (1) assert copyright on the software, and (2) offer you this License 42 | giving you legal permission to copy, distribute and/or modify it. 43 | 44 | For the developers' and authors' protection, the GPL clearly explains 45 | that there is no warranty for this free software. For both users' and 46 | authors' sake, the GPL requires that modified versions be marked as 47 | changed, so that their problems will not be attributed erroneously to 48 | authors of previous versions. 49 | 50 | Some devices are designed to deny users access to install or run 51 | modified versions of the software inside them, although the manufacturer 52 | can do so. This is fundamentally incompatible with the aim of 53 | protecting users' freedom to change the software. The systematic 54 | pattern of such abuse occurs in the area of products for individuals to 55 | use, which is precisely where it is most unacceptable. Therefore, we 56 | have designed this version of the GPL to prohibit the practice for those 57 | products. If such problems arise substantially in other domains, we 58 | stand ready to extend this provision to those domains in future versions 59 | of the GPL, as needed to protect the freedom of users. 60 | 61 | Finally, every program is threatened constantly by software patents. 62 | States should not allow patents to restrict development and use of 63 | software on general-purpose computers, but in those that do, we wish to 64 | avoid the special danger that patents applied to a free program could 65 | make it effectively proprietary. To prevent this, the GPL assures that 66 | patents cannot be used to render the program non-free. 67 | 68 | The precise terms and conditions for copying, distribution and 69 | modification follow. 70 | 71 | TERMS AND CONDITIONS 72 | 73 | 0. Definitions. 74 | 75 | "This License" refers to version 3 of the GNU General Public License. 76 | 77 | "Copyright" also means copyright-like laws that apply to other kinds of 78 | works, such as semiconductor masks. 79 | 80 | "The Program" refers to any copyrightable work licensed under this 81 | License. Each licensee is addressed as "you". "Licensees" and 82 | "recipients" may be individuals or organizations. 83 | 84 | To "modify" a work means to copy from or adapt all or part of the work 85 | in a fashion requiring copyright permission, other than the making of an 86 | exact copy. The resulting work is called a "modified version" of the 87 | earlier work or a work "based on" the earlier work. 88 | 89 | A "covered work" means either the unmodified Program or a work based 90 | on the Program. 91 | 92 | To "propagate" a work means to do anything with it that, without 93 | permission, would make you directly or secondarily liable for 94 | infringement under applicable copyright law, except executing it on a 95 | computer or modifying a private copy. Propagation includes copying, 96 | distribution (with or without modification), making available to the 97 | public, and in some countries other activities as well. 98 | 99 | To "convey" a work means any kind of propagation that enables other 100 | parties to make or receive copies. Mere interaction with a user through 101 | a computer network, with no transfer of a copy, is not conveying. 102 | 103 | An interactive user interface displays "Appropriate Legal Notices" 104 | to the extent that it includes a convenient and prominently visible 105 | feature that (1) displays an appropriate copyright notice, and (2) 106 | tells the user that there is no warranty for the work (except to the 107 | extent that warranties are provided), that licensees may convey the 108 | work under this License, and how to view a copy of this License. If 109 | the interface presents a list of user commands or options, such as a 110 | menu, a prominent item in the list meets this criterion. 111 | 112 | 1. Source Code. 113 | 114 | The "source code" for a work means the preferred form of the work 115 | for making modifications to it. "Object code" means any non-source 116 | form of a work. 117 | 118 | A "Standard Interface" means an interface that either is an official 119 | standard defined by a recognized standards body, or, in the case of 120 | interfaces specified for a particular programming language, one that 121 | is widely used among developers working in that language. 122 | 123 | The "System Libraries" of an executable work include anything, other 124 | than the work as a whole, that (a) is included in the normal form of 125 | packaging a Major Component, but which is not part of that Major 126 | Component, and (b) serves only to enable use of the work with that 127 | Major Component, or to implement a Standard Interface for which an 128 | implementation is available to the public in source code form. A 129 | "Major Component", in this context, means a major essential component 130 | (kernel, window system, and so on) of the specific operating system 131 | (if any) on which the executable work runs, or a compiler used to 132 | produce the work, or an object code interpreter used to run it. 133 | 134 | The "Corresponding Source" for a work in object code form means all 135 | the source code needed to generate, install, and (for an executable 136 | work) run the object code and to modify the work, including scripts to 137 | control those activities. However, it does not include the work's 138 | System Libraries, or general-purpose tools or generally available free 139 | programs which are used unmodified in performing those activities but 140 | which are not part of the work. For example, Corresponding Source 141 | includes interface definition files associated with source files for 142 | the work, and the source code for shared libraries and dynamically 143 | linked subprograms that the work is specifically designed to require, 144 | such as by intimate data communication or control flow between those 145 | subprograms and other parts of the work. 146 | 147 | The Corresponding Source need not include anything that users 148 | can regenerate automatically from other parts of the Corresponding 149 | Source. 150 | 151 | The Corresponding Source for a work in source code form is that 152 | same work. 153 | 154 | 2. Basic Permissions. 155 | 156 | All rights granted under this License are granted for the term of 157 | copyright on the Program, and are irrevocable provided the stated 158 | conditions are met. This License explicitly affirms your unlimited 159 | permission to run the unmodified Program. The output from running a 160 | covered work is covered by this License only if the output, given its 161 | content, constitutes a covered work. This License acknowledges your 162 | rights of fair use or other equivalent, as provided by copyright law. 163 | 164 | You may make, run and propagate covered works that you do not 165 | convey, without conditions so long as your license otherwise remains 166 | in force. You may convey covered works to others for the sole purpose 167 | of having them make modifications exclusively for you, or provide you 168 | with facilities for running those works, provided that you comply with 169 | the terms of this License in conveying all material for which you do 170 | not control copyright. Those thus making or running the covered works 171 | for you must do so exclusively on your behalf, under your direction 172 | and control, on terms that prohibit them from making any copies of 173 | your copyrighted material outside their relationship with you. 174 | 175 | Conveying under any other circumstances is permitted solely under 176 | the conditions stated below. Sublicensing is not allowed; section 10 177 | makes it unnecessary. 178 | 179 | 3. Protecting Users' Legal Rights From Anti-Circumvention Law. 180 | 181 | No covered work shall be deemed part of an effective technological 182 | measure under any applicable law fulfilling obligations under article 183 | 11 of the WIPO copyright treaty adopted on 20 December 1996, or 184 | similar laws prohibiting or restricting circumvention of such 185 | measures. 186 | 187 | When you convey a covered work, you waive any legal power to forbid 188 | circumvention of technological measures to the extent such circumvention 189 | is effected by exercising rights under this License with respect to 190 | the covered work, and you disclaim any intention to limit operation or 191 | modification of the work as a means of enforcing, against the work's 192 | users, your or third parties' legal rights to forbid circumvention of 193 | technological measures. 194 | 195 | 4. Conveying Verbatim Copies. 196 | 197 | You may convey verbatim copies of the Program's source code as you 198 | receive it, in any medium, provided that you conspicuously and 199 | appropriately publish on each copy an appropriate copyright notice; 200 | keep intact all notices stating that this License and any 201 | non-permissive terms added in accord with section 7 apply to the code; 202 | keep intact all notices of the absence of any warranty; and give all 203 | recipients a copy of this License along with the Program. 204 | 205 | You may charge any price or no price for each copy that you convey, 206 | and you may offer support or warranty protection for a fee. 207 | 208 | 5. Conveying Modified Source Versions. 209 | 210 | You may convey a work based on the Program, or the modifications to 211 | produce it from the Program, in the form of source code under the 212 | terms of section 4, provided that you also meet all of these conditions: 213 | 214 | a) The work must carry prominent notices stating that you modified 215 | it, and giving a relevant date. 216 | 217 | b) The work must carry prominent notices stating that it is 218 | released under this License and any conditions added under section 219 | 7. This requirement modifies the requirement in section 4 to 220 | "keep intact all notices". 221 | 222 | c) You must license the entire work, as a whole, under this 223 | License to anyone who comes into possession of a copy. This 224 | License will therefore apply, along with any applicable section 7 225 | additional terms, to the whole of the work, and all its parts, 226 | regardless of how they are packaged. This License gives no 227 | permission to license the work in any other way, but it does not 228 | invalidate such permission if you have separately received it. 229 | 230 | d) If the work has interactive user interfaces, each must display 231 | Appropriate Legal Notices; however, if the Program has interactive 232 | interfaces that do not display Appropriate Legal Notices, your 233 | work need not make them do so. 234 | 235 | A compilation of a covered work with other separate and independent 236 | works, which are not by their nature extensions of the covered work, 237 | and which are not combined with it such as to form a larger program, 238 | in or on a volume of a storage or distribution medium, is called an 239 | "aggregate" if the compilation and its resulting copyright are not 240 | used to limit the access or legal rights of the compilation's users 241 | beyond what the individual works permit. Inclusion of a covered work 242 | in an aggregate does not cause this License to apply to the other 243 | parts of the aggregate. 244 | 245 | 6. Conveying Non-Source Forms. 246 | 247 | You may convey a covered work in object code form under the terms 248 | of sections 4 and 5, provided that you also convey the 249 | machine-readable Corresponding Source under the terms of this License, 250 | in one of these ways: 251 | 252 | a) Convey the object code in, or embodied in, a physical product 253 | (including a physical distribution medium), accompanied by the 254 | Corresponding Source fixed on a durable physical medium 255 | customarily used for software interchange. 256 | 257 | b) Convey the object code in, or embodied in, a physical product 258 | (including a physical distribution medium), accompanied by a 259 | written offer, valid for at least three years and valid for as 260 | long as you offer spare parts or customer support for that product 261 | model, to give anyone who possesses the object code either (1) a 262 | copy of the Corresponding Source for all the software in the 263 | product that is covered by this License, on a durable physical 264 | medium customarily used for software interchange, for a price no 265 | more than your reasonable cost of physically performing this 266 | conveying of source, or (2) access to copy the 267 | Corresponding Source from a network server at no charge. 268 | 269 | c) Convey individual copies of the object code with a copy of the 270 | written offer to provide the Corresponding Source. This 271 | alternative is allowed only occasionally and noncommercially, and 272 | only if you received the object code with such an offer, in accord 273 | with subsection 6b. 274 | 275 | d) Convey the object code by offering access from a designated 276 | place (gratis or for a charge), and offer equivalent access to the 277 | Corresponding Source in the same way through the same place at no 278 | further charge. You need not require recipients to copy the 279 | Corresponding Source along with the object code. If the place to 280 | copy the object code is a network server, the Corresponding Source 281 | may be on a different server (operated by you or a third party) 282 | that supports equivalent copying facilities, provided you maintain 283 | clear directions next to the object code saying where to find the 284 | Corresponding Source. Regardless of what server hosts the 285 | Corresponding Source, you remain obligated to ensure that it is 286 | available for as long as needed to satisfy these requirements. 287 | 288 | e) Convey the object code using peer-to-peer transmission, provided 289 | you inform other peers where the object code and Corresponding 290 | Source of the work are being offered to the general public at no 291 | charge under subsection 6d. 292 | 293 | A separable portion of the object code, whose source code is excluded 294 | from the Corresponding Source as a System Library, need not be 295 | included in conveying the object code work. 296 | 297 | A "User Product" is either (1) a "consumer product", which means any 298 | tangible personal property which is normally used for personal, family, 299 | or household purposes, or (2) anything designed or sold for incorporation 300 | into a dwelling. In determining whether a product is a consumer product, 301 | doubtful cases shall be resolved in favor of coverage. For a particular 302 | product received by a particular user, "normally used" refers to a 303 | typical or common use of that class of product, regardless of the status 304 | of the particular user or of the way in which the particular user 305 | actually uses, or expects or is expected to use, the product. A product 306 | is a consumer product regardless of whether the product has substantial 307 | commercial, industrial or non-consumer uses, unless such uses represent 308 | the only significant mode of use of the product. 309 | 310 | "Installation Information" for a User Product means any methods, 311 | procedures, authorization keys, or other information required to install 312 | and execute modified versions of a covered work in that User Product from 313 | a modified version of its Corresponding Source. The information must 314 | suffice to ensure that the continued functioning of the modified object 315 | code is in no case prevented or interfered with solely because 316 | modification has been made. 317 | 318 | If you convey an object code work under this section in, or with, or 319 | specifically for use in, a User Product, and the conveying occurs as 320 | part of a transaction in which the right of possession and use of the 321 | User Product is transferred to the recipient in perpetuity or for a 322 | fixed term (regardless of how the transaction is characterized), the 323 | Corresponding Source conveyed under this section must be accompanied 324 | by the Installation Information. But this requirement does not apply 325 | if neither you nor any third party retains the ability to install 326 | modified object code on the User Product (for example, the work has 327 | been installed in ROM). 328 | 329 | The requirement to provide Installation Information does not include a 330 | requirement to continue to provide support service, warranty, or updates 331 | for a work that has been modified or installed by the recipient, or for 332 | the User Product in which it has been modified or installed. Access to a 333 | network may be denied when the modification itself materially and 334 | adversely affects the operation of the network or violates the rules and 335 | protocols for communication across the network. 336 | 337 | Corresponding Source conveyed, and Installation Information provided, 338 | in accord with this section must be in a format that is publicly 339 | documented (and with an implementation available to the public in 340 | source code form), and must require no special password or key for 341 | unpacking, reading or copying. 342 | 343 | 7. Additional Terms. 344 | 345 | "Additional permissions" are terms that supplement the terms of this 346 | License by making exceptions from one or more of its conditions. 347 | Additional permissions that are applicable to the entire Program shall 348 | be treated as though they were included in this License, to the extent 349 | that they are valid under applicable law. If additional permissions 350 | apply only to part of the Program, that part may be used separately 351 | under those permissions, but the entire Program remains governed by 352 | this License without regard to the additional permissions. 353 | 354 | When you convey a copy of a covered work, you may at your option 355 | remove any additional permissions from that copy, or from any part of 356 | it. (Additional permissions may be written to require their own 357 | removal in certain cases when you modify the work.) You may place 358 | additional permissions on material, added by you to a covered work, 359 | for which you have or can give appropriate copyright permission. 360 | 361 | Notwithstanding any other provision of this License, for material you 362 | add to a covered work, you may (if authorized by the copyright holders of 363 | that material) supplement the terms of this License with terms: 364 | 365 | a) Disclaiming warranty or limiting liability differently from the 366 | terms of sections 15 and 16 of this License; or 367 | 368 | b) Requiring preservation of specified reasonable legal notices or 369 | author attributions in that material or in the Appropriate Legal 370 | Notices displayed by works containing it; or 371 | 372 | c) Prohibiting misrepresentation of the origin of that material, or 373 | requiring that modified versions of such material be marked in 374 | reasonable ways as different from the original version; or 375 | 376 | d) Limiting the use for publicity purposes of names of licensors or 377 | authors of the material; or 378 | 379 | e) Declining to grant rights under trademark law for use of some 380 | trade names, trademarks, or service marks; or 381 | 382 | f) Requiring indemnification of licensors and authors of that 383 | material by anyone who conveys the material (or modified versions of 384 | it) with contractual assumptions of liability to the recipient, for 385 | any liability that these contractual assumptions directly impose on 386 | those licensors and authors. 387 | 388 | All other non-permissive additional terms are considered "further 389 | restrictions" within the meaning of section 10. If the Program as you 390 | received it, or any part of it, contains a notice stating that it is 391 | governed by this License along with a term that is a further 392 | restriction, you may remove that term. If a license document contains 393 | a further restriction but permits relicensing or conveying under this 394 | License, you may add to a covered work material governed by the terms 395 | of that license document, provided that the further restriction does 396 | not survive such relicensing or conveying. 397 | 398 | If you add terms to a covered work in accord with this section, you 399 | must place, in the relevant source files, a statement of the 400 | additional terms that apply to those files, or a notice indicating 401 | where to find the applicable terms. 402 | 403 | Additional terms, permissive or non-permissive, may be stated in the 404 | form of a separately written license, or stated as exceptions; 405 | the above requirements apply either way. 406 | 407 | 8. Termination. 408 | 409 | You may not propagate or modify a covered work except as expressly 410 | provided under this License. Any attempt otherwise to propagate or 411 | modify it is void, and will automatically terminate your rights under 412 | this License (including any patent licenses granted under the third 413 | paragraph of section 11). 414 | 415 | However, if you cease all violation of this License, then your 416 | license from a particular copyright holder is reinstated (a) 417 | provisionally, unless and until the copyright holder explicitly and 418 | finally terminates your license, and (b) permanently, if the copyright 419 | holder fails to notify you of the violation by some reasonable means 420 | prior to 60 days after the cessation. 421 | 422 | Moreover, your license from a particular copyright holder is 423 | reinstated permanently if the copyright holder notifies you of the 424 | violation by some reasonable means, this is the first time you have 425 | received notice of violation of this License (for any work) from that 426 | copyright holder, and you cure the violation prior to 30 days after 427 | your receipt of the notice. 428 | 429 | Termination of your rights under this section does not terminate the 430 | licenses of parties who have received copies or rights from you under 431 | this License. If your rights have been terminated and not permanently 432 | reinstated, you do not qualify to receive new licenses for the same 433 | material under section 10. 434 | 435 | 9. Acceptance Not Required for Having Copies. 436 | 437 | You are not required to accept this License in order to receive or 438 | run a copy of the Program. Ancillary propagation of a covered work 439 | occurring solely as a consequence of using peer-to-peer transmission 440 | to receive a copy likewise does not require acceptance. However, 441 | nothing other than this License grants you permission to propagate or 442 | modify any covered work. These actions infringe copyright if you do 443 | not accept this License. Therefore, by modifying or propagating a 444 | covered work, you indicate your acceptance of this License to do so. 445 | 446 | 10. Automatic Licensing of Downstream Recipients. 447 | 448 | Each time you convey a covered work, the recipient automatically 449 | receives a license from the original licensors, to run, modify and 450 | propagate that work, subject to this License. You are not responsible 451 | for enforcing compliance by third parties with this License. 452 | 453 | An "entity transaction" is a transaction transferring control of an 454 | organization, or substantially all assets of one, or subdividing an 455 | organization, or merging organizations. If propagation of a covered 456 | work results from an entity transaction, each party to that 457 | transaction who receives a copy of the work also receives whatever 458 | licenses to the work the party's predecessor in interest had or could 459 | give under the previous paragraph, plus a right to possession of the 460 | Corresponding Source of the work from the predecessor in interest, if 461 | the predecessor has it or can get it with reasonable efforts. 462 | 463 | You may not impose any further restrictions on the exercise of the 464 | rights granted or affirmed under this License. For example, you may 465 | not impose a license fee, royalty, or other charge for exercise of 466 | rights granted under this License, and you may not initiate litigation 467 | (including a cross-claim or counterclaim in a lawsuit) alleging that 468 | any patent claim is infringed by making, using, selling, offering for 469 | sale, or importing the Program or any portion of it. 470 | 471 | 11. Patents. 472 | 473 | A "contributor" is a copyright holder who authorizes use under this 474 | License of the Program or a work on which the Program is based. The 475 | work thus licensed is called the contributor's "contributor version". 476 | 477 | A contributor's "essential patent claims" are all patent claims 478 | owned or controlled by the contributor, whether already acquired or 479 | hereafter acquired, that would be infringed by some manner, permitted 480 | by this License, of making, using, or selling its contributor version, 481 | but do not include claims that would be infringed only as a 482 | consequence of further modification of the contributor version. For 483 | purposes of this definition, "control" includes the right to grant 484 | patent sublicenses in a manner consistent with the requirements of 485 | this License. 486 | 487 | Each contributor grants you a non-exclusive, worldwide, royalty-free 488 | patent license under the contributor's essential patent claims, to 489 | make, use, sell, offer for sale, import and otherwise run, modify and 490 | propagate the contents of its contributor version. 491 | 492 | In the following three paragraphs, a "patent license" is any express 493 | agreement or commitment, however denominated, not to enforce a patent 494 | (such as an express permission to practice a patent or covenant not to 495 | sue for patent infringement). To "grant" such a patent license to a 496 | party means to make such an agreement or commitment not to enforce a 497 | patent against the party. 498 | 499 | If you convey a covered work, knowingly relying on a patent license, 500 | and the Corresponding Source of the work is not available for anyone 501 | to copy, free of charge and under the terms of this License, through a 502 | publicly available network server or other readily accessible means, 503 | then you must either (1) cause the Corresponding Source to be so 504 | available, or (2) arrange to deprive yourself of the benefit of the 505 | patent license for this particular work, or (3) arrange, in a manner 506 | consistent with the requirements of this License, to extend the patent 507 | license to downstream recipients. "Knowingly relying" means you have 508 | actual knowledge that, but for the patent license, your conveying the 509 | covered work in a country, or your recipient's use of the covered work 510 | in a country, would infringe one or more identifiable patents in that 511 | country that you have reason to believe are valid. 512 | 513 | If, pursuant to or in connection with a single transaction or 514 | arrangement, you convey, or propagate by procuring conveyance of, a 515 | covered work, and grant a patent license to some of the parties 516 | receiving the covered work authorizing them to use, propagate, modify 517 | or convey a specific copy of the covered work, then the patent license 518 | you grant is automatically extended to all recipients of the covered 519 | work and works based on it. 520 | 521 | A patent license is "discriminatory" if it does not include within 522 | the scope of its coverage, prohibits the exercise of, or is 523 | conditioned on the non-exercise of one or more of the rights that are 524 | specifically granted under this License. You may not convey a covered 525 | work if you are a party to an arrangement with a third party that is 526 | in the business of distributing software, under which you make payment 527 | to the third party based on the extent of your activity of conveying 528 | the work, and under which the third party grants, to any of the 529 | parties who would receive the covered work from you, a discriminatory 530 | patent license (a) in connection with copies of the covered work 531 | conveyed by you (or copies made from those copies), or (b) primarily 532 | for and in connection with specific products or compilations that 533 | contain the covered work, unless you entered into that arrangement, 534 | or that patent license was granted, prior to 28 March 2007. 535 | 536 | Nothing in this License shall be construed as excluding or limiting 537 | any implied license or other defenses to infringement that may 538 | otherwise be available to you under applicable patent law. 539 | 540 | 12. No Surrender of Others' Freedom. 541 | 542 | If conditions are imposed on you (whether by court order, agreement or 543 | otherwise) that contradict the conditions of this License, they do not 544 | excuse you from the conditions of this License. If you cannot convey a 545 | covered work so as to satisfy simultaneously your obligations under this 546 | License and any other pertinent obligations, then as a consequence you may 547 | not convey it at all. For example, if you agree to terms that obligate you 548 | to collect a royalty for further conveying from those to whom you convey 549 | the Program, the only way you could satisfy both those terms and this 550 | License would be to refrain entirely from conveying the Program. 551 | 552 | 13. Use with the GNU Affero General Public License. 553 | 554 | Notwithstanding any other provision of this License, you have 555 | permission to link or combine any covered work with a work licensed 556 | under version 3 of the GNU Affero General Public License into a single 557 | combined work, and to convey the resulting work. The terms of this 558 | License will continue to apply to the part which is the covered work, 559 | but the special requirements of the GNU Affero General Public License, 560 | section 13, concerning interaction through a network will apply to the 561 | combination as such. 562 | 563 | 14. Revised Versions of this License. 564 | 565 | The Free Software Foundation may publish revised and/or new versions of 566 | the GNU General Public License from time to time. Such new versions will 567 | be similar in spirit to the present version, but may differ in detail to 568 | address new problems or concerns. 569 | 570 | Each version is given a distinguishing version number. If the 571 | Program specifies that a certain numbered version of the GNU General 572 | Public License "or any later version" applies to it, you have the 573 | option of following the terms and conditions either of that numbered 574 | version or of any later version published by the Free Software 575 | Foundation. If the Program does not specify a version number of the 576 | GNU General Public License, you may choose any version ever published 577 | by the Free Software Foundation. 578 | 579 | If the Program specifies that a proxy can decide which future 580 | versions of the GNU General Public License can be used, that proxy's 581 | public statement of acceptance of a version permanently authorizes you 582 | to choose that version for the Program. 583 | 584 | Later license versions may give you additional or different 585 | permissions. However, no additional obligations are imposed on any 586 | author or copyright holder as a result of your choosing to follow a 587 | later version. 588 | 589 | 15. Disclaimer of Warranty. 590 | 591 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY 592 | APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT 593 | HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY 594 | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, 595 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 596 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM 597 | IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF 598 | ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 599 | 600 | 16. Limitation of Liability. 601 | 602 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 603 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS 604 | THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY 605 | GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE 606 | USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF 607 | DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD 608 | PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), 609 | EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF 610 | SUCH DAMAGES. 611 | 612 | 17. Interpretation of Sections 15 and 16. 613 | 614 | If the disclaimer of warranty and limitation of liability provided 615 | above cannot be given local legal effect according to their terms, 616 | reviewing courts shall apply local law that most closely approximates 617 | an absolute waiver of all civil liability in connection with the 618 | Program, unless a warranty or assumption of liability accompanies a 619 | copy of the Program in return for a fee. 620 | 621 | END OF TERMS AND CONDITIONS 622 | 623 | How to Apply These Terms to Your New Programs 624 | 625 | If you develop a new program, and you want it to be of the greatest 626 | possible use to the public, the best way to achieve this is to make it 627 | free software which everyone can redistribute and change under these terms. 628 | 629 | To do so, attach the following notices to the program. It is safest 630 | to attach them to the start of each source file to most effectively 631 | state the exclusion of warranty; and each file should have at least 632 | the "copyright" line and a pointer to where the full notice is found. 633 | 634 | 635 | Copyright (C) 636 | 637 | This program is free software: you can redistribute it and/or modify 638 | it under the terms of the GNU General Public License as published by 639 | the Free Software Foundation, either version 3 of the License, or 640 | (at your option) any later version. 641 | 642 | This program is distributed in the hope that it will be useful, 643 | but WITHOUT ANY WARRANTY; without even the implied warranty of 644 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 645 | GNU General Public License for more details. 646 | 647 | You should have received a copy of the GNU General Public License 648 | along with this program. If not, see . 649 | 650 | Also add information on how to contact you by electronic and paper mail. 651 | 652 | If the program does terminal interaction, make it output a short 653 | notice like this when it starts in an interactive mode: 654 | 655 | Copyright (C) 656 | This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. 657 | This is free software, and you are welcome to redistribute it 658 | under certain conditions; type `show c' for details. 659 | 660 | The hypothetical commands `show w' and `show c' should show the appropriate 661 | parts of the General Public License. Of course, your program's commands 662 | might be different; for a GUI interface, you would use an "about box". 663 | 664 | You should also get your employer (if you work as a programmer) or school, 665 | if any, to sign a "copyright disclaimer" for the program, if necessary. 666 | For more information on this, and how to apply and follow the GNU GPL, see 667 | . 668 | 669 | The GNU General Public License does not permit incorporating your program 670 | into proprietary programs. If your program is a subroutine library, you 671 | may consider it more useful to permit linking proprietary applications with 672 | the library. If this is what you want to do, use the GNU Lesser General 673 | Public License instead of this License. But first, please read 674 | . 675 | -------------------------------------------------------------------------------- /grafana-dashboards/rpi-throttling-example.json: -------------------------------------------------------------------------------- 1 | { 2 | "annotations": { 3 | "list": [ 4 | { 5 | "builtIn": 1, 6 | "datasource": "-- Grafana --", 7 | "enable": true, 8 | "hide": true, 9 | "iconColor": "rgba(0, 211, 255, 1)", 10 | "name": "Annotations & Alerts", 11 | "type": "dashboard" 12 | } 13 | ] 14 | }, 15 | "editable": true, 16 | "gnetId": null, 17 | "graphTooltip": 0, 18 | "id": 10, 19 | "links": [], 20 | "panels": [ 21 | { 22 | "aliasColors": {}, 23 | "bars": false, 24 | "dashLength": 10, 25 | "dashes": false, 26 | "datasource": "InfluxDB", 27 | "fill": 1, 28 | "fillGradient": 3, 29 | "gridPos": { 30 | "h": 4, 31 | "w": 12, 32 | "x": 0, 33 | "y": 0 34 | }, 35 | "id": 3, 36 | "legend": { 37 | "avg": false, 38 | "current": false, 39 | "max": false, 40 | "min": false, 41 | "show": false, 42 | "total": false, 43 | "values": false 44 | }, 45 | "lines": true, 46 | "linewidth": 1, 47 | "nullPointMode": "null", 48 | "options": { 49 | "dataLinks": [] 50 | }, 51 | "percentage": false, 52 | "pointradius": 2, 53 | "points": false, 54 | "renderer": "flot", 55 | "seriesOverrides": [ 56 | { 57 | "alias": "/Active:.*/", 58 | "yaxis": 2 59 | } 60 | ], 61 | "spaceLength": 10, 62 | "stack": false, 63 | "steppedLine": false, 64 | "targets": [ 65 | { 66 | "alias": "Load5: $tag_host", 67 | "groupBy": [ 68 | { 69 | "params": [ 70 | "$__interval" 71 | ], 72 | "type": "time" 73 | }, 74 | { 75 | "params": [ 76 | "host" 77 | ], 78 | "type": "tag" 79 | }, 80 | { 81 | "params": [ 82 | "none" 83 | ], 84 | "type": "fill" 85 | } 86 | ], 87 | "measurement": "system", 88 | "orderByTime": "ASC", 89 | "policy": "default", 90 | "refId": "A", 91 | "resultFormat": "time_series", 92 | "select": [ 93 | [ 94 | { 95 | "params": [ 96 | "load5" 97 | ], 98 | "type": "field" 99 | }, 100 | { 101 | "params": [], 102 | "type": "mean" 103 | } 104 | ] 105 | ], 106 | "tags": [ 107 | { 108 | "key": "rack", 109 | "operator": "=", 110 | "value": "rpi" 111 | } 112 | ] 113 | }, 114 | { 115 | "alias": "Active: $tag_host", 116 | "groupBy": [ 117 | { 118 | "params": [ 119 | "$__interval" 120 | ], 121 | "type": "time" 122 | }, 123 | { 124 | "params": [ 125 | "host" 126 | ], 127 | "type": "tag" 128 | }, 129 | { 130 | "params": [ 131 | "none" 132 | ], 133 | "type": "fill" 134 | } 135 | ], 136 | "measurement": "cpu", 137 | "orderByTime": "ASC", 138 | "policy": "default", 139 | "refId": "B", 140 | "resultFormat": "time_series", 141 | "select": [ 142 | [ 143 | { 144 | "params": [ 145 | "time_active" 146 | ], 147 | "type": "field" 148 | }, 149 | { 150 | "params": [], 151 | "type": "mean" 152 | } 153 | ] 154 | ], 155 | "tags": [ 156 | { 157 | "key": "rack", 158 | "operator": "=", 159 | "value": "rpi" 160 | } 161 | ] 162 | } 163 | ], 164 | "thresholds": [], 165 | "timeFrom": null, 166 | "timeRegions": [], 167 | "timeShift": null, 168 | "title": "CPU Activity", 169 | "tooltip": { 170 | "shared": true, 171 | "sort": 0, 172 | "value_type": "individual" 173 | }, 174 | "type": "graph", 175 | "xaxis": { 176 | "buckets": null, 177 | "mode": "time", 178 | "name": null, 179 | "show": false, 180 | "values": [] 181 | }, 182 | "yaxes": [ 183 | { 184 | "format": "short", 185 | "label": null, 186 | "logBase": 1, 187 | "max": null, 188 | "min": null, 189 | "show": true 190 | }, 191 | { 192 | "format": "short", 193 | "label": null, 194 | "logBase": 1, 195 | "max": null, 196 | "min": null, 197 | "show": false 198 | } 199 | ], 200 | "yaxis": { 201 | "align": false, 202 | "alignLevel": null 203 | } 204 | }, 205 | { 206 | "aliasColors": {}, 207 | "bars": false, 208 | "dashLength": 10, 209 | "dashes": false, 210 | "datasource": "InfluxDB", 211 | "fill": 0, 212 | "fillGradient": 0, 213 | "gridPos": { 214 | "h": 4, 215 | "w": 12, 216 | "x": 12, 217 | "y": 0 218 | }, 219 | "id": 2, 220 | "legend": { 221 | "avg": false, 222 | "current": false, 223 | "max": false, 224 | "min": false, 225 | "show": false, 226 | "total": false, 227 | "values": false 228 | }, 229 | "lines": true, 230 | "linewidth": 1, 231 | "nullPointMode": "null", 232 | "options": { 233 | "dataLinks": [] 234 | }, 235 | "percentage": false, 236 | "pointradius": 2, 237 | "points": false, 238 | "renderer": "flot", 239 | "seriesOverrides": [ 240 | { 241 | "alias": "medina" 242 | }, 243 | { 244 | "alias": "octopi" 245 | }, 246 | { 247 | "alias": "tycho" 248 | } 249 | ], 250 | "spaceLength": 10, 251 | "stack": false, 252 | "steppedLine": false, 253 | "targets": [ 254 | { 255 | "alias": "Level: $tag_host", 256 | "groupBy": [ 257 | { 258 | "params": [ 259 | "$__interval" 260 | ], 261 | "type": "time" 262 | }, 263 | { 264 | "params": [ 265 | "host" 266 | ], 267 | "type": "tag" 268 | }, 269 | { 270 | "params": [ 271 | "none" 272 | ], 273 | "type": "fill" 274 | } 275 | ], 276 | "measurement": "wireless", 277 | "orderByTime": "ASC", 278 | "policy": "default", 279 | "refId": "A", 280 | "resultFormat": "time_series", 281 | "select": [ 282 | [ 283 | { 284 | "params": [ 285 | "level" 286 | ], 287 | "type": "field" 288 | }, 289 | { 290 | "params": [], 291 | "type": "mean" 292 | } 293 | ] 294 | ], 295 | "tags": [ 296 | { 297 | "key": "rack", 298 | "operator": "=", 299 | "value": "rpi" 300 | } 301 | ] 302 | } 303 | ], 304 | "thresholds": [], 305 | "timeFrom": null, 306 | "timeRegions": [], 307 | "timeShift": null, 308 | "title": "Wireless Signal", 309 | "tooltip": { 310 | "shared": true, 311 | "sort": 0, 312 | "value_type": "individual" 313 | }, 314 | "type": "graph", 315 | "xaxis": { 316 | "buckets": null, 317 | "mode": "time", 318 | "name": null, 319 | "show": false, 320 | "values": [] 321 | }, 322 | "yaxes": [ 323 | { 324 | "format": "dB", 325 | "label": null, 326 | "logBase": 1, 327 | "max": null, 328 | "min": null, 329 | "show": false 330 | }, 331 | { 332 | "format": "dB", 333 | "label": null, 334 | "logBase": 1, 335 | "max": null, 336 | "min": null, 337 | "show": false 338 | } 339 | ], 340 | "yaxis": { 341 | "align": false, 342 | "alignLevel": null 343 | } 344 | }, 345 | { 346 | "aliasColors": {}, 347 | "bars": false, 348 | "dashLength": 10, 349 | "dashes": false, 350 | "datasource": "InfluxDB", 351 | "fill": 1, 352 | "fillGradient": 0, 353 | "gridPos": { 354 | "h": 3, 355 | "w": 12, 356 | "x": 0, 357 | "y": 4 358 | }, 359 | "id": 5, 360 | "legend": { 361 | "avg": false, 362 | "current": false, 363 | "max": false, 364 | "min": false, 365 | "show": false, 366 | "total": false, 367 | "values": false 368 | }, 369 | "lines": true, 370 | "linewidth": 1, 371 | "nullPointMode": "null", 372 | "options": { 373 | "dataLinks": [] 374 | }, 375 | "percentage": false, 376 | "pointradius": 2, 377 | "points": false, 378 | "renderer": "flot", 379 | "seriesOverrides": [ 380 | { 381 | "alias": "/Mem Free.*/", 382 | "fill": 0 383 | } 384 | ], 385 | "spaceLength": 10, 386 | "stack": false, 387 | "steppedLine": false, 388 | "targets": [ 389 | { 390 | "alias": "Mem Free: $tag_host", 391 | "groupBy": [ 392 | { 393 | "params": [ 394 | "$__interval" 395 | ], 396 | "type": "time" 397 | }, 398 | { 399 | "params": [ 400 | "host" 401 | ], 402 | "type": "tag" 403 | }, 404 | { 405 | "params": [ 406 | "none" 407 | ], 408 | "type": "fill" 409 | } 410 | ], 411 | "measurement": "mem", 412 | "orderByTime": "ASC", 413 | "policy": "autogen", 414 | "refId": "A", 415 | "resultFormat": "time_series", 416 | "select": [ 417 | [ 418 | { 419 | "params": [ 420 | "used_percent" 421 | ], 422 | "type": "field" 423 | }, 424 | { 425 | "params": [], 426 | "type": "mean" 427 | } 428 | ] 429 | ], 430 | "tags": [ 431 | { 432 | "key": "rack", 433 | "operator": "=", 434 | "value": "rpi" 435 | } 436 | ] 437 | } 438 | ], 439 | "thresholds": [], 440 | "timeFrom": null, 441 | "timeRegions": [], 442 | "timeShift": null, 443 | "title": "Memory Utilization", 444 | "tooltip": { 445 | "shared": true, 446 | "sort": 0, 447 | "value_type": "individual" 448 | }, 449 | "type": "graph", 450 | "xaxis": { 451 | "buckets": null, 452 | "mode": "time", 453 | "name": null, 454 | "show": false, 455 | "values": [] 456 | }, 457 | "yaxes": [ 458 | { 459 | "format": "short", 460 | "label": null, 461 | "logBase": 1, 462 | "max": "101", 463 | "min": "0", 464 | "show": false 465 | }, 466 | { 467 | "format": "short", 468 | "label": null, 469 | "logBase": 1, 470 | "max": null, 471 | "min": null, 472 | "show": false 473 | } 474 | ], 475 | "yaxis": { 476 | "align": false, 477 | "alignLevel": null 478 | } 479 | }, 480 | { 481 | "aliasColors": {}, 482 | "bars": false, 483 | "dashLength": 10, 484 | "dashes": false, 485 | "datasource": "InfluxDB", 486 | "fill": 0, 487 | "fillGradient": 0, 488 | "gridPos": { 489 | "h": 3, 490 | "w": 12, 491 | "x": 12, 492 | "y": 4 493 | }, 494 | "id": 17, 495 | "legend": { 496 | "avg": false, 497 | "current": false, 498 | "max": false, 499 | "min": false, 500 | "show": false, 501 | "total": false, 502 | "values": false 503 | }, 504 | "lines": true, 505 | "linewidth": 1, 506 | "nullPointMode": "null", 507 | "options": { 508 | "dataLinks": [] 509 | }, 510 | "percentage": false, 511 | "pointradius": 2, 512 | "points": false, 513 | "renderer": "flot", 514 | "seriesOverrides": [ 515 | { 516 | "alias": "medina" 517 | }, 518 | { 519 | "alias": "octopi" 520 | }, 521 | { 522 | "alias": "tycho" 523 | } 524 | ], 525 | "spaceLength": 10, 526 | "stack": false, 527 | "steppedLine": false, 528 | "targets": [ 529 | { 530 | "alias": "Level: $tag_host", 531 | "groupBy": [ 532 | { 533 | "params": [ 534 | "$__interval" 535 | ], 536 | "type": "time" 537 | }, 538 | { 539 | "params": [ 540 | "host" 541 | ], 542 | "type": "tag" 543 | }, 544 | { 545 | "params": [ 546 | "none" 547 | ], 548 | "type": "fill" 549 | } 550 | ], 551 | "measurement": "disk", 552 | "orderByTime": "ASC", 553 | "policy": "default", 554 | "refId": "A", 555 | "resultFormat": "time_series", 556 | "select": [ 557 | [ 558 | { 559 | "params": [ 560 | "free" 561 | ], 562 | "type": "field" 563 | }, 564 | { 565 | "params": [], 566 | "type": "first" 567 | } 568 | ] 569 | ], 570 | "tags": [ 571 | { 572 | "key": "rack", 573 | "operator": "=", 574 | "value": "rpi" 575 | }, 576 | { 577 | "condition": "AND", 578 | "key": "device", 579 | "operator": "=", 580 | "value": "mmcblk0p2" 581 | } 582 | ] 583 | } 584 | ], 585 | "thresholds": [], 586 | "timeFrom": null, 587 | "timeRegions": [], 588 | "timeShift": null, 589 | "title": "Disk Free", 590 | "tooltip": { 591 | "shared": true, 592 | "sort": 0, 593 | "value_type": "individual" 594 | }, 595 | "type": "graph", 596 | "xaxis": { 597 | "buckets": null, 598 | "mode": "time", 599 | "name": null, 600 | "show": false, 601 | "values": [] 602 | }, 603 | "yaxes": [ 604 | { 605 | "format": "decbytes", 606 | "label": null, 607 | "logBase": 1, 608 | "max": null, 609 | "min": null, 610 | "show": false 611 | }, 612 | { 613 | "format": "decbytes", 614 | "label": null, 615 | "logBase": 1, 616 | "max": null, 617 | "min": null, 618 | "show": false 619 | } 620 | ], 621 | "yaxis": { 622 | "align": false, 623 | "alignLevel": null 624 | } 625 | }, 626 | { 627 | "cacheTimeout": null, 628 | "datasource": null, 629 | "gridPos": { 630 | "h": 3, 631 | "w": 12, 632 | "x": 0, 633 | "y": 7 634 | }, 635 | "id": 23, 636 | "links": [], 637 | "options": { 638 | "fieldOptions": { 639 | "calcs": [ 640 | "lastNotNull" 641 | ], 642 | "defaults": { 643 | "links": [], 644 | "mappings": [ 645 | { 646 | "id": 0, 647 | "op": "=", 648 | "text": "N/A", 649 | "type": 1, 650 | "value": "null" 651 | } 652 | ], 653 | "max": 1, 654 | "min": 0, 655 | "nullValueMode": "connected", 656 | "thresholds": [ 657 | { 658 | "color": "#299c46", 659 | "value": null 660 | }, 661 | { 662 | "color": "#d44a3a", 663 | "value": 1 664 | } 665 | ], 666 | "unit": "none" 667 | }, 668 | "override": {}, 669 | "values": false 670 | }, 671 | "orientation": "horizontal", 672 | "showThresholdLabels": false, 673 | "showThresholdMarkers": false 674 | }, 675 | "pluginVersion": "6.4.4", 676 | "targets": [ 677 | { 678 | "alias": "$tag_host", 679 | "groupBy": [ 680 | { 681 | "params": [ 682 | "$__interval" 683 | ], 684 | "type": "time" 685 | }, 686 | { 687 | "params": [ 688 | "host" 689 | ], 690 | "type": "tag" 691 | }, 692 | { 693 | "params": [ 694 | "none" 695 | ], 696 | "type": "fill" 697 | } 698 | ], 699 | "measurement": "rpi_throttling", 700 | "orderByTime": "ASC", 701 | "policy": "default", 702 | "refId": "A", 703 | "resultFormat": "time_series", 704 | "select": [ 705 | [ 706 | { 707 | "params": [ 708 | "now_undervolted" 709 | ], 710 | "type": "field" 711 | }, 712 | { 713 | "params": [], 714 | "type": "last" 715 | } 716 | ] 717 | ], 718 | "tags": [ 719 | { 720 | "key": "rack", 721 | "operator": "=", 722 | "value": "rpi" 723 | } 724 | ] 725 | } 726 | ], 727 | "timeFrom": null, 728 | "timeShift": null, 729 | "title": "Throttle: Undervolted (Now)", 730 | "type": "gauge" 731 | }, 732 | { 733 | "cacheTimeout": null, 734 | "datasource": null, 735 | "gridPos": { 736 | "h": 3, 737 | "w": 12, 738 | "x": 12, 739 | "y": 7 740 | }, 741 | "id": 24, 742 | "links": [], 743 | "options": { 744 | "fieldOptions": { 745 | "calcs": [ 746 | "last" 747 | ], 748 | "defaults": { 749 | "mappings": [ 750 | { 751 | "id": 0, 752 | "op": "=", 753 | "text": "N/A", 754 | "type": 1, 755 | "value": "null" 756 | } 757 | ], 758 | "max": 1, 759 | "min": 0, 760 | "nullValueMode": "connected", 761 | "thresholds": [ 762 | { 763 | "color": "#299c46", 764 | "value": null 765 | }, 766 | { 767 | "color": "#d44a3a", 768 | "value": 1 769 | } 770 | ], 771 | "unit": "none" 772 | }, 773 | "override": {}, 774 | "values": false 775 | }, 776 | "orientation": "horizontal", 777 | "showThresholdLabels": false, 778 | "showThresholdMarkers": false 779 | }, 780 | "pluginVersion": "6.4.4", 781 | "targets": [ 782 | { 783 | "alias": "$tag_host", 784 | "groupBy": [ 785 | { 786 | "params": [ 787 | "$__interval" 788 | ], 789 | "type": "time" 790 | }, 791 | { 792 | "params": [ 793 | "host" 794 | ], 795 | "type": "tag" 796 | }, 797 | { 798 | "params": [ 799 | "none" 800 | ], 801 | "type": "fill" 802 | } 803 | ], 804 | "measurement": "rpi_throttling", 805 | "orderByTime": "ASC", 806 | "policy": "default", 807 | "refId": "A", 808 | "resultFormat": "time_series", 809 | "select": [ 810 | [ 811 | { 812 | "params": [ 813 | "since_boot_undervolted" 814 | ], 815 | "type": "field" 816 | }, 817 | { 818 | "params": [], 819 | "type": "last" 820 | } 821 | ] 822 | ], 823 | "tags": [ 824 | { 825 | "key": "rack", 826 | "operator": "=", 827 | "value": "rpi" 828 | } 829 | ] 830 | } 831 | ], 832 | "timeFrom": null, 833 | "timeShift": null, 834 | "title": "Throttle: Undervolted (Since Boot)", 835 | "type": "gauge" 836 | }, 837 | { 838 | "cacheTimeout": null, 839 | "datasource": null, 840 | "gridPos": { 841 | "h": 3, 842 | "w": 12, 843 | "x": 0, 844 | "y": 10 845 | }, 846 | "id": 19, 847 | "links": [], 848 | "options": { 849 | "fieldOptions": { 850 | "calcs": [ 851 | "last" 852 | ], 853 | "defaults": { 854 | "mappings": [ 855 | { 856 | "id": 0, 857 | "op": "=", 858 | "text": "N/A", 859 | "type": 1, 860 | "value": "null" 861 | } 862 | ], 863 | "max": 1, 864 | "min": 0, 865 | "nullValueMode": "connected", 866 | "thresholds": [ 867 | { 868 | "color": "#299c46", 869 | "value": null 870 | }, 871 | { 872 | "color": "#d44a3a", 873 | "value": 1 874 | } 875 | ], 876 | "unit": "none" 877 | }, 878 | "override": {}, 879 | "values": false 880 | }, 881 | "orientation": "horizontal", 882 | "showThresholdLabels": false, 883 | "showThresholdMarkers": false 884 | }, 885 | "pluginVersion": "6.4.4", 886 | "targets": [ 887 | { 888 | "alias": "$tag_host", 889 | "groupBy": [ 890 | { 891 | "params": [ 892 | "$__interval" 893 | ], 894 | "type": "time" 895 | }, 896 | { 897 | "params": [ 898 | "host" 899 | ], 900 | "type": "tag" 901 | }, 902 | { 903 | "params": [ 904 | "none" 905 | ], 906 | "type": "fill" 907 | } 908 | ], 909 | "measurement": "rpi_throttling", 910 | "orderByTime": "ASC", 911 | "policy": "default", 912 | "refId": "A", 913 | "resultFormat": "time_series", 914 | "select": [ 915 | [ 916 | { 917 | "params": [ 918 | "now_arm_frequency_capped" 919 | ], 920 | "type": "field" 921 | }, 922 | { 923 | "params": [], 924 | "type": "last" 925 | } 926 | ] 927 | ], 928 | "tags": [ 929 | { 930 | "key": "rack", 931 | "operator": "=", 932 | "value": "rpi" 933 | } 934 | ] 935 | } 936 | ], 937 | "timeFrom": null, 938 | "timeShift": null, 939 | "title": "Throttle: ARM Freq Cap (Now)", 940 | "type": "gauge" 941 | }, 942 | { 943 | "cacheTimeout": null, 944 | "datasource": null, 945 | "gridPos": { 946 | "h": 3, 947 | "w": 12, 948 | "x": 12, 949 | "y": 10 950 | }, 951 | "id": 20, 952 | "links": [], 953 | "options": { 954 | "fieldOptions": { 955 | "calcs": [ 956 | "last" 957 | ], 958 | "defaults": { 959 | "mappings": [ 960 | { 961 | "id": 0, 962 | "op": "=", 963 | "text": "N/A", 964 | "type": 1, 965 | "value": "null" 966 | } 967 | ], 968 | "max": 1, 969 | "min": 0, 970 | "nullValueMode": "connected", 971 | "thresholds": [ 972 | { 973 | "color": "#299c46", 974 | "value": null 975 | }, 976 | { 977 | "color": "#d44a3a", 978 | "value": 1 979 | } 980 | ], 981 | "unit": "none" 982 | }, 983 | "override": {}, 984 | "values": false 985 | }, 986 | "orientation": "horizontal", 987 | "showThresholdLabels": false, 988 | "showThresholdMarkers": false 989 | }, 990 | "pluginVersion": "6.4.4", 991 | "targets": [ 992 | { 993 | "alias": "$tag_host", 994 | "groupBy": [ 995 | { 996 | "params": [ 997 | "$__interval" 998 | ], 999 | "type": "time" 1000 | }, 1001 | { 1002 | "params": [ 1003 | "host" 1004 | ], 1005 | "type": "tag" 1006 | }, 1007 | { 1008 | "params": [ 1009 | "none" 1010 | ], 1011 | "type": "fill" 1012 | } 1013 | ], 1014 | "measurement": "rpi_throttling", 1015 | "orderByTime": "ASC", 1016 | "policy": "default", 1017 | "refId": "A", 1018 | "resultFormat": "time_series", 1019 | "select": [ 1020 | [ 1021 | { 1022 | "params": [ 1023 | "since_boot_arm_frequency_capped" 1024 | ], 1025 | "type": "field" 1026 | }, 1027 | { 1028 | "params": [], 1029 | "type": "last" 1030 | } 1031 | ] 1032 | ], 1033 | "tags": [ 1034 | { 1035 | "key": "rack", 1036 | "operator": "=", 1037 | "value": "rpi" 1038 | } 1039 | ] 1040 | } 1041 | ], 1042 | "timeFrom": null, 1043 | "timeShift": null, 1044 | "title": "Throttle: ARM Freq Cap (Since Boot)", 1045 | "type": "gauge" 1046 | }, 1047 | { 1048 | "cacheTimeout": null, 1049 | "datasource": null, 1050 | "gridPos": { 1051 | "h": 3, 1052 | "w": 12, 1053 | "x": 0, 1054 | "y": 13 1055 | }, 1056 | "id": 21, 1057 | "links": [], 1058 | "options": { 1059 | "fieldOptions": { 1060 | "calcs": [ 1061 | "last" 1062 | ], 1063 | "defaults": { 1064 | "mappings": [ 1065 | { 1066 | "id": 0, 1067 | "op": "=", 1068 | "text": "N/A", 1069 | "type": 1, 1070 | "value": "null" 1071 | } 1072 | ], 1073 | "max": 1, 1074 | "min": 0, 1075 | "nullValueMode": "connected", 1076 | "thresholds": [ 1077 | { 1078 | "color": "#299c46", 1079 | "value": null 1080 | }, 1081 | { 1082 | "color": "#d44a3a", 1083 | "value": 1 1084 | } 1085 | ], 1086 | "unit": "none" 1087 | }, 1088 | "override": {}, 1089 | "values": false 1090 | }, 1091 | "orientation": "horizontal", 1092 | "showThresholdLabels": false, 1093 | "showThresholdMarkers": false 1094 | }, 1095 | "pluginVersion": "6.4.4", 1096 | "targets": [ 1097 | { 1098 | "alias": "$tag_host", 1099 | "groupBy": [ 1100 | { 1101 | "params": [ 1102 | "$__interval" 1103 | ], 1104 | "type": "time" 1105 | }, 1106 | { 1107 | "params": [ 1108 | "host" 1109 | ], 1110 | "type": "tag" 1111 | }, 1112 | { 1113 | "params": [ 1114 | "none" 1115 | ], 1116 | "type": "fill" 1117 | } 1118 | ], 1119 | "measurement": "rpi_throttling", 1120 | "orderByTime": "ASC", 1121 | "policy": "default", 1122 | "refId": "A", 1123 | "resultFormat": "time_series", 1124 | "select": [ 1125 | [ 1126 | { 1127 | "params": [ 1128 | "now_soft_temp_limit_reached" 1129 | ], 1130 | "type": "field" 1131 | }, 1132 | { 1133 | "params": [], 1134 | "type": "last" 1135 | } 1136 | ] 1137 | ], 1138 | "tags": [ 1139 | { 1140 | "key": "rack", 1141 | "operator": "=", 1142 | "value": "rpi" 1143 | } 1144 | ] 1145 | } 1146 | ], 1147 | "timeFrom": null, 1148 | "timeShift": null, 1149 | "title": "Throttle: Soft Temp Limit Reached (Now)", 1150 | "type": "gauge" 1151 | }, 1152 | { 1153 | "cacheTimeout": null, 1154 | "datasource": null, 1155 | "gridPos": { 1156 | "h": 3, 1157 | "w": 12, 1158 | "x": 12, 1159 | "y": 13 1160 | }, 1161 | "id": 22, 1162 | "links": [], 1163 | "options": { 1164 | "fieldOptions": { 1165 | "calcs": [ 1166 | "last" 1167 | ], 1168 | "defaults": { 1169 | "mappings": [ 1170 | { 1171 | "id": 0, 1172 | "op": "=", 1173 | "text": "N/A", 1174 | "type": 1, 1175 | "value": "null" 1176 | } 1177 | ], 1178 | "max": 1, 1179 | "min": 0, 1180 | "nullValueMode": "connected", 1181 | "thresholds": [ 1182 | { 1183 | "color": "#299c46", 1184 | "value": null 1185 | }, 1186 | { 1187 | "color": "#d44a3a", 1188 | "value": 1 1189 | } 1190 | ], 1191 | "unit": "none" 1192 | }, 1193 | "override": {}, 1194 | "values": false 1195 | }, 1196 | "orientation": "horizontal", 1197 | "showThresholdLabels": false, 1198 | "showThresholdMarkers": false 1199 | }, 1200 | "pluginVersion": "6.4.4", 1201 | "targets": [ 1202 | { 1203 | "alias": "$tag_host", 1204 | "groupBy": [ 1205 | { 1206 | "params": [ 1207 | "$__interval" 1208 | ], 1209 | "type": "time" 1210 | }, 1211 | { 1212 | "params": [ 1213 | "host" 1214 | ], 1215 | "type": "tag" 1216 | }, 1217 | { 1218 | "params": [ 1219 | "none" 1220 | ], 1221 | "type": "fill" 1222 | } 1223 | ], 1224 | "measurement": "rpi_throttling", 1225 | "orderByTime": "ASC", 1226 | "policy": "default", 1227 | "refId": "A", 1228 | "resultFormat": "time_series", 1229 | "select": [ 1230 | [ 1231 | { 1232 | "params": [ 1233 | "since_boot_soft_temp_limit_reached" 1234 | ], 1235 | "type": "field" 1236 | }, 1237 | { 1238 | "params": [], 1239 | "type": "last" 1240 | } 1241 | ] 1242 | ], 1243 | "tags": [ 1244 | { 1245 | "key": "rack", 1246 | "operator": "=", 1247 | "value": "rpi" 1248 | } 1249 | ] 1250 | } 1251 | ], 1252 | "timeFrom": null, 1253 | "timeShift": null, 1254 | "title": "Throttle: Soft Temp Limit Reached (Since Boot)", 1255 | "type": "gauge" 1256 | }, 1257 | { 1258 | "cacheTimeout": null, 1259 | "datasource": null, 1260 | "gridPos": { 1261 | "h": 3, 1262 | "w": 12, 1263 | "x": 0, 1264 | "y": 16 1265 | }, 1266 | "id": 26, 1267 | "links": [], 1268 | "options": { 1269 | "fieldOptions": { 1270 | "calcs": [ 1271 | "last" 1272 | ], 1273 | "defaults": { 1274 | "mappings": [ 1275 | { 1276 | "id": 0, 1277 | "op": "=", 1278 | "text": "N/A", 1279 | "type": 1, 1280 | "value": "null" 1281 | } 1282 | ], 1283 | "max": 1, 1284 | "min": 0, 1285 | "nullValueMode": "connected", 1286 | "thresholds": [ 1287 | { 1288 | "color": "#299c46", 1289 | "value": null 1290 | }, 1291 | { 1292 | "color": "#d44a3a", 1293 | "value": 1 1294 | } 1295 | ], 1296 | "unit": "none" 1297 | }, 1298 | "override": {}, 1299 | "values": false 1300 | }, 1301 | "orientation": "horizontal", 1302 | "showThresholdLabels": false, 1303 | "showThresholdMarkers": false 1304 | }, 1305 | "pluginVersion": "6.4.4", 1306 | "targets": [ 1307 | { 1308 | "alias": "$tag_host", 1309 | "groupBy": [ 1310 | { 1311 | "params": [ 1312 | "$__interval" 1313 | ], 1314 | "type": "time" 1315 | }, 1316 | { 1317 | "params": [ 1318 | "host" 1319 | ], 1320 | "type": "tag" 1321 | }, 1322 | { 1323 | "params": [ 1324 | "none" 1325 | ], 1326 | "type": "fill" 1327 | } 1328 | ], 1329 | "measurement": "rpi_throttling", 1330 | "orderByTime": "ASC", 1331 | "policy": "default", 1332 | "refId": "A", 1333 | "resultFormat": "time_series", 1334 | "select": [ 1335 | [ 1336 | { 1337 | "params": [ 1338 | "now_throttled" 1339 | ], 1340 | "type": "field" 1341 | }, 1342 | { 1343 | "params": [], 1344 | "type": "last" 1345 | } 1346 | ] 1347 | ], 1348 | "tags": [ 1349 | { 1350 | "key": "rack", 1351 | "operator": "=", 1352 | "value": "rpi" 1353 | } 1354 | ] 1355 | } 1356 | ], 1357 | "timeFrom": null, 1358 | "timeShift": null, 1359 | "title": "Throttle: Throttled (Since Boot)", 1360 | "type": "gauge" 1361 | }, 1362 | { 1363 | "cacheTimeout": null, 1364 | "datasource": null, 1365 | "gridPos": { 1366 | "h": 3, 1367 | "w": 12, 1368 | "x": 12, 1369 | "y": 16 1370 | }, 1371 | "id": 25, 1372 | "links": [], 1373 | "options": { 1374 | "fieldOptions": { 1375 | "calcs": [ 1376 | "last" 1377 | ], 1378 | "defaults": { 1379 | "mappings": [ 1380 | { 1381 | "id": 0, 1382 | "op": "=", 1383 | "text": "N/A", 1384 | "type": 1, 1385 | "value": "null" 1386 | } 1387 | ], 1388 | "max": 1, 1389 | "min": 0, 1390 | "nullValueMode": "connected", 1391 | "thresholds": [ 1392 | { 1393 | "color": "#299c46", 1394 | "value": null 1395 | }, 1396 | { 1397 | "color": "#d44a3a", 1398 | "value": 1 1399 | } 1400 | ], 1401 | "unit": "none" 1402 | }, 1403 | "override": {}, 1404 | "values": false 1405 | }, 1406 | "orientation": "horizontal", 1407 | "showThresholdLabels": false, 1408 | "showThresholdMarkers": false 1409 | }, 1410 | "pluginVersion": "6.4.4", 1411 | "targets": [ 1412 | { 1413 | "alias": "$tag_host", 1414 | "groupBy": [ 1415 | { 1416 | "params": [ 1417 | "$__interval" 1418 | ], 1419 | "type": "time" 1420 | }, 1421 | { 1422 | "params": [ 1423 | "host" 1424 | ], 1425 | "type": "tag" 1426 | }, 1427 | { 1428 | "params": [ 1429 | "none" 1430 | ], 1431 | "type": "fill" 1432 | } 1433 | ], 1434 | "measurement": "rpi_throttling", 1435 | "orderByTime": "ASC", 1436 | "policy": "default", 1437 | "refId": "A", 1438 | "resultFormat": "time_series", 1439 | "select": [ 1440 | [ 1441 | { 1442 | "params": [ 1443 | "since_boot_throttled" 1444 | ], 1445 | "type": "field" 1446 | }, 1447 | { 1448 | "params": [], 1449 | "type": "last" 1450 | } 1451 | ] 1452 | ], 1453 | "tags": [ 1454 | { 1455 | "key": "rack", 1456 | "operator": "=", 1457 | "value": "rpi" 1458 | } 1459 | ] 1460 | } 1461 | ], 1462 | "timeFrom": null, 1463 | "timeShift": null, 1464 | "title": "Throttle: Throttled (Since Boot)", 1465 | "type": "gauge" 1466 | } 1467 | ], 1468 | "refresh": "30s", 1469 | "schemaVersion": 20, 1470 | "style": "dark", 1471 | "tags": [], 1472 | "templating": { 1473 | "list": [] 1474 | }, 1475 | "time": { 1476 | "from": "now-6h", 1477 | "to": "now" 1478 | }, 1479 | "timepicker": { 1480 | "refresh_intervals": [ 1481 | "5s", 1482 | "10s", 1483 | "30s", 1484 | "1m", 1485 | "5m", 1486 | "15m", 1487 | "30m", 1488 | "1h", 1489 | "2h", 1490 | "1d" 1491 | ] 1492 | }, 1493 | "timezone": "", 1494 | "title": "RPi Throttling", 1495 | "uid": "5kiFow1Wk", 1496 | "version": 1 1497 | } --------------------------------------------------------------------------------