Jump to content

Template:Networking rut2 9 modbus custom register block: Difference between revisions

no edit summary
No edit summary
No edit summary
Line 27: Line 27:
{{#switch:{{{name}}}
{{#switch:{{{name}}}
|RUTX10=
|RUTX10=
#!/bin/ash
<pre>
while true
#!/bin/ash
do
while true
date > /tmp/regfile  #where data will be stored
do
df {{!}} awk 'NR==3 {print $3}' >> /tmp/regfile
date > /tmp/regfile  #where data will be stored
df {{!}} awk 'NR==4 {print $3}' >> /tmp/regfile
df {{!}} awk 'NR==3 {print $3}' >> /tmp/regfile
sleep 5
df {{!}} awk 'NR==4 {print $3}' >> /tmp/regfile
done
sleep 5
done
</pre>
|RUTX08=
|RUTX08=
#!/bin/ash
<pre>
while true
#!/bin/ash
do
while true
date > /tmp/regfile  #where data will be stored
do
df {{!}} awk 'NR==3 {print $3}' >> /tmp/regfile
date > /tmp/regfile  #where data will be stored
df {{!}} awk 'NR==4 {print $3}' >> /tmp/regfile
df {{!}} awk 'NR==3 {print $3}' >> /tmp/regfile
sleep 5
df {{!}} awk 'NR==4 {print $3}' >> /tmp/regfile
done
sleep 5
done
</pre>
|
|
<pre>
  #!/bin/ash
  #!/bin/ash
  while true
  while true
Line 53: 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 78: Line 84:
  27
  27
|
|
  Wed Jun 17 15:11:29 EEST 2020
  Wed Jun 17 15:11:29 EEST 2020
  -69
  -69