LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 09-17-2011, 02:36 AM   #1
koshihaku
Member
 
Registered: Aug 2010
Posts: 50

Rep: Reputation: 0
May I ask a question about Android here?


I am a student and I have to do an experiment about software stress test.

I installed Android emulator on Ubuntu to simulate an Android equipment.
The experiment should be conductinig stress test on one or some applications.
At the same time, I need to obtain the memory variation of the Android emulator(especially free memory).

I am considering using awk of busybox to get information from /proc/meminfo of the Android in the adb shell.
But I failed to write a script to get these information periodically.For example, every 10 minutes.

Before this experiment, I wrote an script to measure the memory information of a Ubuntu system, like this
Code:
LOG_FILE="output of sysmon.csv"

echo "ElapsedTime,Buffers(kb),SwapCached(kb),SwapFree(kb),Mapped(kb),MemFree(kb)" > "$LOG_FILE"

ELAPSED_TIME=`date +%D:%H:%M:%S:%N`      #hour, minute, second, nanu second
PERIOD=184                            # seconds

while :
do
  Buffers=`awk '/Buffers/ {print $2}' < "/proc/meminfo"`
  SwapCached=`awk '/SwapCached/ {print $2}' < "/proc/meminfo"`
  SwapFree=`awk '/SwapFree/ {print $2}' < "/proc/meminfo"`
  Mapped=`awk '/Mapped/ {print $2}' < "/proc/meminfo"`
  MemFree=`awk '/MemFree/ {print $2}' < "/proc/meminfo"`
    
  echo "$ELAPSED_TIME,$Buffers,$SwapCached,$SwapFree,$Mapped,$MemFree" >> "$LOG_FILE"
  sleep "$PERIOD"
  ELAPSED_TIME=`date +%D:%H:%M:%S:%N`
done
Could you please give me any suggestion?
Thank you very much!

Last edited by koshihaku; 09-17-2011 at 02:39 AM.
 
Old 09-17-2011, 08:48 PM   #2
corp769
LQ Guru
 
Registered: Apr 2005
Location: /dev/null
Posts: 5,818

Rep: Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007
Hello,

To get better responses, I would re-post this thread over on AndroidQuestions - http://www.androidquestions.org/forum.php

Cheers,

Josh
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
question about android.hardware.usb and midi interfaces P5music Linux - Mobile 8 04-09-2012 10:26 AM
Android HTC Inspire mobile brondband Question pythonsyntax Linux - Laptop and Netbook 2 05-05-2011 02:20 PM
LXer: Android App Build Environment With Eclipse, Android SDK, PhoneGap (Fedora 14) LXer Syndicated Linux News 2 02-01-2011 11:11 AM
LXer: Get Started with Android application development using Linux and Android SDK LXer Syndicated Linux News 0 01-06-2011 01:50 PM
LXer: What I like about Android - and what I don't -- My Android Review (including my Favorite Apps) LXer Syndicated Linux News 0 11-18-2010 02:20 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 02:35 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration