Advertisement
Pertile

Node-RED misura temperatura velocità e memoria

Mar 26th, 2017
1,628
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.42 KB | None | 0 0
  1. [
  2. {
  3. "id": "2c4719ff.f67376",
  4. "type": "tab",
  5. "label": "Flow 1"
  6. },
  7. {
  8. "id": "67dc7642.62dc88",
  9. "type": "exec",
  10. "z": "2c4719ff.f67376",
  11. "command": "vcgencmd measure_temp",
  12. "addpay": false,
  13. "append": "",
  14. "useSpawn": false,
  15. "timer": "",
  16. "name": "Temp",
  17. "x": 309,
  18. "y": 171,
  19. "wires": [
  20. [
  21. "e73a6e0b.fbdd4"
  22. ],
  23. [],
  24. []
  25. ]
  26. },
  27. {
  28. "id": "50af9116.2454a",
  29. "type": "inject",
  30. "z": "2c4719ff.f67376",
  31. "name": "",
  32. "topic": "",
  33. "payload": "",
  34. "payloadType": "date",
  35. "repeat": "1",
  36. "crontab": "",
  37. "once": false,
  38. "x": 112,
  39. "y": 233,
  40. "wires": [
  41. [
  42. "6ed697dc.ca6af8",
  43. "67dc7642.62dc88",
  44. "36fdf7dc.81d5e8"
  45. ]
  46. ]
  47. },
  48. {
  49. "id": "e73a6e0b.fbdd4",
  50. "type": "function",
  51. "z": "2c4719ff.f67376",
  52. "name": "SubString",
  53. "func": "str = msg.payload \nmsg.payload = str.substring(5, 9);\nreturn msg;",
  54. "outputs": 1,
  55. "noerr": 0,
  56. "x": 447,
  57. "y": 158,
  58. "wires": [
  59. [
  60. "42634714.c65168"
  61. ]
  62. ]
  63. },
  64. {
  65. "id": "42634714.c65168",
  66. "type": "ui_gauge",
  67. "z": "2c4719ff.f67376",
  68. "name": "T CPU",
  69. "group": "ea1dfcaa.d5eeb",
  70. "order": 1,
  71. "width": "6",
  72. "height": "5",
  73. "gtype": "gage",
  74. "title": "CPU Temp.",
  75. "label": "°C",
  76. "format": "{{value}}",
  77. "min": 0,
  78. "max": "90",
  79. "colors": [
  80. "#00b500",
  81. "#b6e203",
  82. "#ca3838"
  83. ],
  84. "x": 590,
  85. "y": 158,
  86. "wires": []
  87. },
  88. {
  89. "id": "6ed697dc.ca6af8",
  90. "type": "exec",
  91. "z": "2c4719ff.f67376",
  92. "command": "top -d 0.5 -b -n2 | grep \"Cpu(s)\"|tail -n 1 | awk '{print $2 + $4}'",
  93. "addpay": false,
  94. "append": "",
  95. "useSpawn": "",
  96. "timer": "",
  97. "name": "LOAD",
  98. "x": 307,
  99. "y": 232.5,
  100. "wires": [
  101. [
  102. "98f6b2ed.33891"
  103. ],
  104. [],
  105. []
  106. ]
  107. },
  108. {
  109. "id": "98f6b2ed.33891",
  110. "type": "ui_gauge",
  111. "z": "2c4719ff.f67376",
  112. "name": "CPU LOAD",
  113. "group": "5d3dc874.cb2248",
  114. "order": 1,
  115. "width": "6",
  116. "height": "6",
  117. "gtype": "donut",
  118. "title": "CPU LOAD",
  119. "label": "%",
  120. "format": "{{value}}",
  121. "min": 0,
  122. "max": "90",
  123. "colors": [
  124. "#00b500",
  125. "#e6e600",
  126. "#ca3838"
  127. ],
  128. "x": 573,
  129. "y": 218,
  130. "wires": []
  131. },
  132. {
  133. "id": "36fdf7dc.81d5e8",
  134. "type": "exec",
  135. "z": "2c4719ff.f67376",
  136. "command": "free | grep Mem | awk '{print 100*($4+$6+$7)/$2}'",
  137. "addpay": false,
  138. "append": "",
  139. "useSpawn": "",
  140. "timer": "",
  141. "name": "MEM",
  142. "x": 310,
  143. "y": 301,
  144. "wires": [
  145. [
  146. "e438e659.375738"
  147. ],
  148. [],
  149. []
  150. ]
  151. },
  152. {
  153. "id": "e438e659.375738",
  154. "type": "ui_text",
  155. "z": "2c4719ff.f67376",
  156. "group": "ea1dfcaa.d5eeb",
  157. "order": 2,
  158. "width": "6",
  159. "height": "1",
  160. "name": "",
  161. "label": "Free Memory :",
  162. "format": "{{msg.payload}}%",
  163. "layout": "row-center",
  164. "x": 565,
  165. "y": 288,
  166. "wires": []
  167. },
  168. {
  169. "id": "ea1dfcaa.d5eeb",
  170. "type": "ui_group",
  171. "z": "",
  172. "name": "Temp",
  173. "tab": "a692bd60.1068c",
  174. "order": 1,
  175. "disp": false,
  176. "width": "6"
  177. },
  178. {
  179. "id": "5d3dc874.cb2248",
  180. "type": "ui_group",
  181. "z": "",
  182. "name": "Load",
  183. "tab": "a692bd60.1068c",
  184. "order": 2,
  185. "disp": false,
  186. "width": "6"
  187. },
  188. {
  189. "id": "a692bd60.1068c",
  190. "type": "ui_tab",
  191. "z": "",
  192. "name": "Home",
  193. "icon": "dashboard",
  194. "order": 1
  195. }
  196. ]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement