[Bugfix][T106BUG-605]Fix the idle of CPU is 0

Only Configure: No
Affected branch: master
Affected module: sdk-ready
Is it affected on both ZXIC and MTK: only ZXIC
Self-test: Yes
Doc Update: No

Change-Id: Ia5568b92941c3e55664cc22401fc1c25e8a1111a
diff --git a/cap/zx297520v3/src/lynq/framework/lynq-sdk-ready/lynq_timer.cpp b/cap/zx297520v3/src/lynq/framework/lynq-sdk-ready/lynq_timer.cpp
index b9fba74..4893dcb 100755
--- a/cap/zx297520v3/src/lynq/framework/lynq-sdk-ready/lynq_timer.cpp
+++ b/cap/zx297520v3/src/lynq/framework/lynq-sdk-ready/lynq_timer.cpp
@@ -333,22 +333,26 @@
     pclose(fp_1);

     while(1)

     {

+        ALOGD("start check");

         i = 0;

+        sleep(300);

+

         system("date >>/var/log/check_file/cpu_moniter.txt");

         ret = system("top -b |head -n 25 >>/var/log/check_file/cpu_moniter.txt");

         ALOGD("cpu ret %d", ret);

+        usleep(600000);

         system("date >>/var/log/check_file/inter_moniter.txt");

         ret = system("cat /proc/interrupts |grep -v \":          0          0\" >>/var/log/check_file/inter_moniter.txt");

         ALOGD("interrupts ret %d", ret);

-

+        usleep(600000);

         system("date >>/var/log/check_file/pid_moniter.txt");

         ret = system("ps -e \"%p %a\" | grep -v \"\\[\" >>/var/log/check_file/pid_moniter.txt");

         ALOGD("pid ret %d", ret);

-

+        usleep(600000);

         system("date >>/var/log/check_file/meminfo_moniter.txt");

         ret = system("cat /proc/meminfo >>/var/log/check_file/meminfo_moniter.txt");

         ALOGD("meminfo ret %d", ret);

-

+        usleep(600000);

         system("date >>/var/log/check_file/buddyinfo_moniter.txt");

         ret = system("cat /proc/buddyinfo >>/var/log/check_file/buddyinfo_moniter.txt");

         ALOGD("buddyinfo ret %d", ret);

@@ -357,10 +361,11 @@
         ret = system("ps -auxw|grep -v \"0.0  0.0\"|grep -v \"0.1  0.0\"|grep -v \"0.0  0.1\" >>/var/log/check_file/ps_auxw_moniter.txt");

         ALOGD("ps_auxw ret %d", ret);

 #endif

+        usleep(600000);

         system("date >>/var/log/check_file/cur_freq_moniter.txt");

         ret = system("cat /sys/devices/system/cpu/cpufreq/policy0/scaling_cur_freq >>/var/log/check_file/cur_freq_moniter.txt");

         ALOGD("cur_freq ret %d", ret);

-

+        usleep(600000);

         system("date >>/var/log/check_file/available_frequencies_moniter.txt");

         ret = system("cat /sys/devices/system/cpu/cpufreq/policy0/scaling_available_frequencies >>/var/log/check_file/available_frequencies_moniter.txt");

         ALOGD("available_frequencies ret %d", ret);

@@ -370,13 +375,14 @@
         while(fgets(pid[i], 8, fp) != NULL)

         {

             ALOGD("pid[%d]:%s", i, pid[i]);

-             delete_enter(pid[i]);

-             i++;

+            delete_enter(pid[i]);

+            i++;

         }

         pclose(fp);

 

         for(j=1;j<i;j++)

         {

+            usleep(300000);

             sprintf(buf, "ls /proc/%s/fd | wc -l", pid[j]);

             fp = popen(buf, "r");

             fgets(ffd[j], 4, fp);

@@ -418,7 +424,6 @@
         num++;

         sprintf(timebuf, "echo \"%d\" >/var/log/check_time", num);

         ret = system(timebuf);

-        sleep(300);

     }

     return NULL;