Platforms to show: All Mac Windows Linux Cross-Platform

/Linux/Linux SysInfo


Required plugins for this example: MBS Linux Plugin

You find this example project in your Plugins Download as a Xojo project file within the examples folder: /Linux/Linux SysInfo

This example is the version from Sun, 17th Mar 2012.

Project "Linux SysInfo.xojo_binary_project"
Class App Inherits Application
Const kEditClear = "&Löschen"
Const kFileQuit = "Beenden"
Const kFileQuitShortcut = ""
End Class
Class MainWindow Inherits Window
Control List Inherits Listbox
ControlInstance List Inherits Listbox
End Control
EventHandler Sub Open() dim l as new LinuxSysInfoMBS List.ColumnAlignment(1) = List.AlignRight List.AddRow "Valid" if l.Valid then list.Cell(List.LastIndex,1) = "yes" else list.Cell(List.LastIndex,1) = "no" end if List.AddRow "NumberOfProcesses" list.Cell(List.LastIndex,1) = str(l.NumberOfProcesses) List.AddRow "NumberOfProcessors" list.Cell(List.LastIndex,1) = str(l.NumberOfProcessors) List.AddRow "NumberOfProcessorsConfigured" list.Cell(List.LastIndex,1) = str(l.NumberOfProcessorsConfigured) List.AddRow "PhysicalPages" list.Cell(List.LastIndex,1) = str(l.PhysicalPages)+" pages" List.AddRow "availablePhysicalPages" list.Cell(List.LastIndex,1) = str(l.availablePhysicalPages)+" pages" dim n as integer = l.upTime dim seconds as integer = n mod 60 n = n \ 60 dim minutes as integer = n mod 60 n = n \ 60 dim hours as integer = n mod 24 n = n \ 24 dim days as integer = n List.AddRow "upTime" list.Cell(List.LastIndex,1) = str(l.upTime)+" seconds" List.AddRow "" list.Cell(List.LastIndex,1) = str(Days)+" days, "+str(hours)+" hours, "+str(minutes)+" minutes, "+str(seconds)+" seconds" List.AddRow "loads 1 min" list.Cell(List.LastIndex,1) = str(l.loads(0)) List.AddRow "loads 5 min" list.Cell(List.LastIndex,1) = str(l.loads(1)) List.AddRow "loads 15 min" list.Cell(List.LastIndex,1) = str(l.loads(2)) dim MB as double = 1024*1024 List.AddRow "TotalRam" list.Cell(List.LastIndex,1) = format(l.TotalRam / MB, "0.0") + " MB" List.AddRow "FreeRam" list.Cell(List.LastIndex,1) = format(l.FreeRam / MB, "0.0") + " MB" List.AddRow "SharedRam" list.Cell(List.LastIndex,1) = format(l.SharedRam / MB, "0.0") + " MB" List.AddRow "BufferRam" list.Cell(List.LastIndex,1) = format(l.BufferRam / MB, "0.0") + " MB" List.AddRow "TotalSwap" list.Cell(List.LastIndex,1) = format(l.TotalSwap / MB, "0.0") + " MB" List.AddRow "FreeSwap" list.Cell(List.LastIndex,1) = format(l.FreeSwap / MB, "0.0") + " MB" List.AddRow "TotalHigh" list.Cell(List.LastIndex,1) = format(l.TotalHigh / MB, "0.0") + " MB" List.AddRow "FreeHigh" list.Cell(List.LastIndex,1) = format(l.FreeHigh / MB, "0.0") + " MB" End EventHandler
End Class
MenuBar MenuBar1
MenuItem FileMenu = "&Ablage"
MenuItem FileQuit = "#App.kFileQuit"
MenuItem EditMenu = "&Bearbeiten"
MenuItem EditUndo = "&Rückgängig"
MenuItem UntitledMenu1 = "-"
MenuItem EditCut = "&Ausschneiden"
MenuItem EditCopy = "&Kopieren"
MenuItem EditPaste = "&Einfügen"
MenuItem EditClear = "#App.kEditClear"
MenuItem UntitledMenu0 = "-"
MenuItem EditSelectAll = "&Alles auswählen"
End MenuBar
End Project

See also:

The items on this page are in the following plugins: MBS Linux Plugin.


The biggest plugin in space...