fb:porticula NoPaste
[Linux] CPU und RAM Informationen
Uploader: | Westbeam |
Datum/Zeit: | 25.08.2012 11:31:54 |
Dim As String lin
Var cpus=1
Shell "cat /proc/cpuinfo > "+CurDir()+"/cpuinfo"
Var file=Freefile
Open "cpuinfo" For Input As #file
Do Until Eof(file)
Line Input #file,lin
If Instr(lin,"model name") Then
Print "Processor "+Str(cpus)
cpus+=1
Print "Processor name:"+Mid(lin,13)
Elseif Instr(lin,"cpu MHz") Then
Print "Speed:"+Mid(lin,11)+" MHz"
End If
Loop
Close #file
Print ""
Shell "cat /proc/meminfo > "+CurDir()+"/meminfo"
Var file2=Freefile
Open "meminfo" For Input As #file2
Do Until Eof(file2)
Line Input #file2,lin
If Instr(lin,"MemTotal") Then
Print "Total Memory:"+Mid(lin,16)
Elseif Instr(lin,"MemFree") Then
Print "Free Memory:"+Mid(lin,16)
End If
Loop
Close #file2