[Feature][T8TSK-254][SDK-READY]add meminfo and buddyinfo
Only Configure: No
Affected branch: GSW3.0-No-Connman
Affected module: suspend
Is it addected on both ZXIC and MTK: only MTK
Self-test: Yes
Doc Update: No
Change-Id: I0b40408d8e8bf146421d0e13d2a46a29fc0f77d1
diff --git a/framework/lynq-sdk-ready/src/timer/lynq_timer.cpp b/framework/lynq-sdk-ready/src/timer/lynq_timer.cpp
index f8e2a6a..1edddfb 100755
--- a/framework/lynq-sdk-ready/src/timer/lynq_timer.cpp
+++ b/framework/lynq-sdk-ready/src/timer/lynq_timer.cpp
@@ -281,11 +281,32 @@
system("date >>/media/check_file/inter_moniter.txt");
ret = system("cat /proc/interrupts |grep -v \": 0 0\" >>/media/check_file/inter_moniter.txt");
RLOGD("interrupts ret %d", ret);
+
system("date >>/media/check_file/pid_moniter.txt");
ret = system("ps -eo \"%p %a\" | grep -v \"\\[\" >>/media/check_file/pid_moniter.txt");
RLOGD("pid ret %d", ret);
- system("date >>/media/check_file/fd_moniter.txt");
+ system("date >>/media/check_file/meminfo_moniter.txt");
+ ret = system("cat /proc/meminfo >>/media/check_file/meminfo_moniter.txt");
+ RLOGD("meminfo ret %d", ret);
+
+ system("date >>/media/check_file/buddyinfo_moniter.txt");
+ ret = system("cat /proc/buddyinfo >>/media/check_file/buddyinfo_moniter.txt");
+ RLOGD("buddyinfo ret %d", ret);
+
+ system("date >>/media/check_file/ps_auxw_moniter.txt");
+ ret = system("ps -auxw|grep -v \"0.0 0.0\"|grep -v \"0.1 0.0\"|grep -v \"0.0 0.1\" >>/media/check_file/ps_auxw_moniter.txt");
+ RLOGD("ps_auxw ret %d", ret);
+
+ system("date >>/media/check_file/cur_freq_moniter.txt");
+ ret = system("cat /sys/devices/system/cpu/cpufreq/policy0/scaling_cur_freq >>/media/check_file/cur_freq_moniter.txt");
+ RLOGD("cur_freq ret %d", ret);
+
+ system("date >>/media/check_file/available_frequencies_moniter.txt");
+ ret = system("cat /sys/devices/system/cpu/cpufreq/policy0/scaling_available_frequencies >>/media/check_file/available_frequencies_moniter.txt");
+ RLOGD("available_frequencies ret %d", ret);
+
+ system("date >>/media/check_file/fd_moniter.txt");
fp = popen("ps -eo \"%p %a\" | grep -v \"\\[\"|awk '{print $1}'","r");
while(fgets(pid[i], 8, fp) != NULL)
{
@@ -304,16 +325,29 @@
pclose(fp);
}
- if(num > 60)
+ if(num > 228)
{
system("cp /media/check_file/cpu_moniter.txt /media/check_file/cpu_moniter_1.txt");
- system("cp /media/check_file/inter_moniter.txt check_file/inter_moniter_1.txt");
+ system("cp /media/check_file/inter_moniter.txt /media/check_file/inter_moniter_1.txt");
system("cp /media/check_file/pid_moniter.txt /media/check_file/pid_moniter_1.txt");
system("cp /media/check_file/fd_moniter.txt /media/check_file/fd_moniter_1.txt");
+ system("cp /media/check_file/fd_moniter.txt /media/check_file/meminfo_moniter_1.txt");
+ system("cp /media/check_file/fd_moniter.txt /media/check_file/buddyinfo_moniter_1.txt");
+ system("cp /media/check_file/fd_moniter.txt /media/check_file/ps_auxw_moniter_1.txt");
+ system("cp /media/check_file/fd_moniter.txt /media/check_file/cur_freq_moniter_1.txt");
+ system("cp /media/check_file/fd_moniter.txt /media/check_file/available_frequencies_moniter_1.txt");
+
+
system("rm -rf /media/check_file/cpu_moniter.txt");
system("rm -rf /media/check_file/inter_moniter.txt");
system("rm -rf /media/check_file/pid_moniter.txt");
system("rm -rf /media/check_file/fd_moniter.txt");
+ system("rm -rf /media/check_file/meminfo_moniter.txt");
+ system("rm -rf /media/check_file/buddyinfo_moniter.txt");
+ system("rm -rf /media/check_file/ps_auxw_moniter.txt");
+ system("rm -rf /media/check_file/cur_freq_moniter.txt");
+ system("rm -rf /media/check_file/available_frequencies_moniter.txt");
+
num = 0;
}
num++;
@@ -324,6 +358,7 @@
}
+
void start_timer_request(void)
{
pthread_t thid,thid_1;