Compared files  

Left
/fw/dreame.vacuum.p2041/4.1.2_1041/xout/_root/etc/rc.d/monitor.sh
Last modified2020-09-29 16:43:14
Size3.5 Kb (162 Lines)
EncodingLatin 1 - ANSI (CP1252) default
Right
/fw/dreame.vacuum.p2041/4.1.2_1051/xout/_root/etc/rc.d/monitor.sh
Last modified2020-11-04 14:13:54
Size4.5 Kb (204 Lines)
EncodingLatin 1 - ANSI (CP1252) default


   Comparison Statistics  

Detailed Statistics

All Changes
 BlocksLines
Unchanged12153
Inserted436
Deleted22
Ignored00
Changed522




   Comparison Details  

2 skipped lines
3 3 DEVICE_NAME=`jsonpath -i /etc/os-release -e "@.product"`
4 4 DEBUG_VERSION_FILE=/data/initialize.sh
5 5 VMRSS_LOG_FILE=/data/log/VmRss.md
  6 SYS_AUTO_REBOOT=/data/sys_auto_reboot.mark
6 7 AVA_CRASH_MARK=/data/log/ava_crash.mark
7 8 AVA_RESTART_MARK=/tmp/restart_ava.mark
8 9  
68 skipped lines
77 78         break
78 79         fi
79 80         fi
80            
81 81  
82 82         LOG_NAME=${DIR_NAME}/monitor-`date "+%Y%m%d-%H%M%S"`.log
83 83  
84    
85 84         top -b -n 1  >> ${LOG_NAME}
86 85         sleep 1
87 86  
36 skipped lines
124 123         then
125 124         NUM=`expr $NUM - 3 `
126 125         tail -n $NUM /tmp/count.txt | xargs rm    
127         fi   126         fi
128 127     fi
129 128     COUNTNUM=$(( $COUNTNUM + 1 ))
130     wait  129     wait
131     done &   130     done &
132 131  
133 132 else
134 133  
3 skipped lines
138 137     do
139 138  
140 139     avacmd media {\"type\":\"media\",\"cmd\":\"status_get\"} > ${LOG_FILE} 2>&1 &
141     sleep 15 140     sleep 30
142 141     grep ok ${LOG_FILE}
143 142  
144 143     if [ $? -eq 0 ]; then
  144         rm -rf /data/ava_reboot_cnt
145 145         log "ava is live!"
146 146     else
147 147         if [ -e ${AVA_RESTART_MARK} ]; then
148 148         rm -f ${AVA_RESTART_MARK}
  149         rm -rf /data/ava_reboot_cnt
149 150         sync
150 151         else
  152         sysmon.sh > /tmp/log/sys.log && sync
151         tar zcf /data/tmp_log.tar.gz /tmp/log/ 153         tar zcf /data/tmp_log.tar.gz /tmp/log/
152         tar jcf /data/log/ava_log.tbz2 /etc/os-release /tmp/log/ /data/log/script.log /data/log/wifi* /data/log/ptime.csv 154         tar jcf /data/log/ava_log.tbz2 /etc/os-release /tmp/log/sys.log /tmp/log/log_err /data/log/ptime.csv
153 155         touch $AVA_CRASH_MARK && sync
  156  
  157         if [ -f /data/ava_reboot_cnt ]; then
  158         cnt=`cat /data/ava_reboot_cnt`
  159         else
  160         cnt=0
  161         fi
  162         let cnt++
  163  
  164         if [ -f ${AVA_CRASH_COUNT} ]; then
  165         crash_cnt=`cat ${AVA_CRASH_COUNT}`
  166         else
  167         crash_cnt=0
  168         fi
  169         let crash_cnt++
  170         echo -n "$crash_cnt" > ${AVA_CRASH_COUNT}
  171  
  172         if [ "$cnt" -ge 3 ]; then
  173         if [ "${DEVICE_NAME}" == "p2009" -o "${DEVICE_NAME}" == "p2041" ]; then
  174         if [ ! -f ${SYS_AUTO_REBOOT} ]; then
  175         touch ${SYS_AUTO_REBOOT}
  176         touch ${QUIET_START_MARK}
  177         rm -f /data/ava_reboot_cnt
  178         sync
  179         reboot
  180         else
  181         /usr/bin/factory_reset.sh monitor_rescue_brick
  182         fi
  183         fi
  184         cnt=0
  185         fi
  186  
  187         echo $cnt > /data/ava_reboot_cnt
  188         sync
154 189         fi
155 190         /etc/rc.d/ava.sh >/dev/null 2>&1 &
156 191     fi
157 192  
158     sleep 60 193     sleep 15
  194     PID=`pidof -o %PPID ava`
  195     if [ -n "${PID}" ]; then
  196         if [ -f /data/ava_reboot_cnt ]; then
  197         rm -f /data/ava_reboot_cnt
  198         sync
  199         fi
  200     fi
159 201     wait
160 202     done &
161 203 fi
1 skipped line

   Text comparison Options  

Syntax colouring language used: Shell
Match character case: yes.
Match line endings: no.
Match spaces

At start of lines: yes,
In middle of lines: yes,
At end of lines: yes.
Blank lines as empty lines: no.
Activate comparison algorithm
At word level: yes,
At character level: no.


   Legend  

Unchanged lineExample of unchanged line
Modified lineExample of modified line
Added lineExample of added line
Removed lineExample of removed line
Ignored lineExample of ignored line