Line 25: |
Line 25: |
| | | |
| Insert following <b>script</b> (this script is for this manual purpose, yours might be different) example: | | Insert following <b>script</b> (this script is for this manual purpose, yours might be different) example: |
− | | + | {{#switch:{{{name}}} |
| + | |RUTX10= |
| + | <pre> |
| + | #!/bin/ash |
| + | while true |
| + | do |
| + | date > /tmp/regfile #where data will be stored |
| + | df | awk 'NR==3 {print $3}' >> /tmp/regfile |
| + | df | awk 'NR==4 {print $3}' >> /tmp/regfile |
| + | sleep 5 |
| + | done |
| + | </pre> |
| + | |RUTX08= |
| + | <pre> |
| + | #!/bin/ash |
| + | while true |
| + | do |
| + | date > /tmp/regfile #where data will be stored |
| + | df | awk 'NR==3 {print $3}' >> /tmp/regfile |
| + | df | awk 'NR==4 {print $3}' >> /tmp/regfile |
| + | sleep 5 |
| + | done |
| + | </pre> |
| + | | |
| + | <pre> |
| #!/bin/ash | | #!/bin/ash |
| while true | | while true |
Line 34: |
Line 58: |
| sleep 5 | | sleep 5 |
| done | | done |
− | | + | </pre> |
| + | }} |
| After saving change execution rights with this command: | | After saving change execution rights with this command: |
| | | |
Line 46: |
Line 71: |
| And script will run in the background. | | And script will run in the background. |
| | | |
− | With this script we will be able to get routers local time and couple GSM values each 5 seconds. | + | With this script we will be able to get routers local time and couple {{#switch:{{{name}}} |
| + | |RUTX10= DF application |RUTX08= DF application | GSM}} values each 5 seconds. |
| Data stored in <b>regfile (cat /tmp/regfile)</b> looks like this: | | Data stored in <b>regfile (cat /tmp/regfile)</b> looks like this: |
| + | {{#switch:{{{name}}} |
| + | |RUTX10= |
| + | <pre> |
| + | Wed Jun 17 15:11:29 EEST 2020 |
| + | 69 |
| + | 27 |
| + | </pre> |
| + | |RUTX08= |
| + | <pre> |
| + | Wed Jun 17 15:11:29 EEST 2020 |
| + | 69 |
| + | 27 |
| + | </pre> |
| + | | |
| + | <pre> |
| + | Wed Jun 17 15:11:29 EEST 2020 |
| + | -69 |
| + | 27 |
| + | </pre> |
| + | }} |
| | | |
− | Wed Jun 17 15:11:29 EEST 2020
| |
− | -69
| |
− | 27
| |
| | | |
| To view collected data in HEX execute this command via SSH: | | To view collected data in HEX execute this command via SSH: |