Sl

KXflnfoiAiiistflnt ji« fgff.

• mi •»v»hv..»'cV< I •(.' v . f l ^iupibM - rt ,»1 WWUiiuil = WtWiK'iXMior VMiwfKV?«*^ \-<f»-, l.-.j — - .1 f-1<» " V« Xwf.'yli-i»

IV.l Wf :WvWi- C<-**.■■ t C» •}- • '•

k&ftWttJI] C'MDExecute» ¡HJflSSE^W "/system/bin/cat" tni^ttS "/proc/cpuinfo" 'Wft ft». ttlJ'MWflCPUtt'ja. istrfcSinH 16-8

4nMl6-8 Android G1 (ft CPU ilfA.

eo»InrosA.t«ht4ni: CPOfSft cpuis.g r;:ttSttpf AWA* «»T-f. -" l »»goMm h-.Vf t' ' R'nu't c<fcu r»v

CMni f at

2. &KA5ttJfc

¿MM iffCPU 'iWli-lft/proc/meminfo {h&, "I

Miffiii getSystcmService(Context.ACTIVITY SERVICE)$iR ActivityManager.Memorylnfo iit

public static String getMemorylnfo{Context context) { StringBuffer memorylnfo = new StringBuffer();

final ActivityManager activity-Manager (ActivityManager) context .getSystemService(Context.ACTIVITY_SERVICE);

Act.ivityManager.Memorylnfo outlnfo = new ActivityManager.Memorylnfo();

activityManager.getMemorylnfo(outlnfo);

memorylnfo. append ("\nTot.al Available Memory :").append{

memorylnfo.append("\nTotal Available Memory :")•append{ out Info.availMem >> 20) .append("M");

memorylnfo. append("Vnln low memory situation: ") .append(

outlnfo.lowMemory);

String result = null;

CMDExecute cmdexe new CMDExecute();

StringM args = ( "/system/bin/cat","/proc/meminfQ" }; result = cmdexe.run(args, "/system/bin/"); } catch (IOException ex) |

Log.i("fetch_process info", "ex=" + ex.toString {)); }

return memorylnfo.toString()+"\n\n"♦result; I

enifiegfiMtte

H imWH:

I'.ififWI' r? 'A.MH ActivityManagcr ^JuMii^"/proc/meminfo"

<51»a 16-9 hnlttfiiij. IGB, WTJH 28MB, «AJIHtWifflMfiifl-

3. ^^«fiiim f-tfLiii^WM&HrilUiJ UfflH df tft^«, WW. &5ft««ftttfi &Mmiifii««. W

publi : static String fetch diskinfo<) ( String result - null;

CMDExecute cmdexe = new CMDExecute(); try {

String!] args = ( "/system/bin/df" }; result cmdexe.run(args, "/system/bin/"); j catch (lOException ex) < ex.printStackTrace{); )

return result; J

WWl^M, ii>4J CMDExecute WW&Jm "/system/bin/df fir^JRitfifUJtflfB.

¡km 16-10 iirw#fij. KyMxinM, im^io vovJnfotAXftoi nt: -.9 ß <*<! "

-CI■ lf:it«ifc.jftJir>j!T Sflvr « V*:' •.!<

.•tx-hi.'vii-c« -- I .:4-»w.l-c" ■. •e-'j''

ivi,« .Iftii- Hi.,. -K-Ai .•rtt.<v-'Mik '.-At- -4&-»S 907449k ;..«■-von a 1*1 16-10 Jgft1gJ&

&IR 1$Jß(/sy stem/bin/netclg ÜT, -XcSfWJ&l

tout Ayoiiitic MroKyy ^M»» TOU! Ayallaöe Mt-nimi 2SM »n JqwmfiiMKy vnmi\mdvvt

Mferefree eüfTef»,

ActrtW.

{wapfaut. JjtWTfM!-'

0 0

Post a comment