Components All New MacOS Windows Linux iOS
Examples Mac & Win Server Client Guides Statistic FMM Blog Deprecated Old

SystemInfo.LinuxSystemInfo

Queries Linux system information details.

Component Version macOS Windows Linux Server iOS SDK
SystemInfo 11.2 ❌ No ❌ No ✅ Yes ✅ Yes, on Linux ❌ No
MBS( "SystemInfo.LinuxSystemInfo" )

Parameters

none

Result

Returns JSON or error.

Description

Queries Linux system information details.
Returns JSON with various information about the linux environment.

Values include:
UpTimeSeconds since boot
Loads1, 5, and 15 minute load averages
TotalRAMTotal usable main memory size
FreeRAMAvailable memory size
SharedRAMAmount of shared memory
BufferRAMMemory used by buffers
TotalSwapTotal swap space size
FreeSwapSwap space still available
ProcessesNumber of current processes
TotalHighTotal high memory size
FreeHighAvailable high memory size
MemoryUnitMemory unit size in bytes
ConfiguredProcessorsHow many CPU cores.
AvailableProcessorsHow many available to you.
TotalPhysicalPagesTotal physical memory pages
AvailablePhysicalPagesAvailable memory pages.

Usually RAM numbers are in bytes and since page size is usually 4096 bytes, TotalPhysicalPages * 4096 is TotalRAM.

For loads, you may need to divide by core count if you like to present it as percentage of CPU usage.

If loads are > AvailableProcessors, you may have not enough CPU power.
If FreeSwap is below TotalSwap, you have not enough RAM.

Examples

Run it on a Linux server with Ubuntu:

Exit Script [ Text Result: MBS("SystemInfo.LinuxSystemInfo") ]

Example result:
{ "UpTime": 708, "Loads": [0.023873, 0.048828, 0.067382], "TotalRAM": 4112195584, "FreeRAM": 1589587968, "SharedRAM": 1622016, "BufferRAM": 20881408, "TotalSwap": 4111462400, "FreeSwap": 4111462400, "Processes": 1010, "TotalHigh": 0, "FreeHigh": 0, "MemoryUnit": 1, "ConfiguredProcessors": 4, "AvailableProcessors": 4, "TotalPhysicalPages": 1003954, "AvailablePhysicalPages": 388083 }

Run it on a Linux server with CentOS:

Exit Script [ Text Result: MBS("SystemInfo.LinuxSystemInfo") ]

Example result:
{ "UpTime": 803, "Loads": [0.049316, 0.04345, 0.045898], "TotalRAM": 2964705280, "FreeRAM": 275378176, "SharedRAM": 0, "BufferRAM": 1105920, "TotalSwap": 2147479552, "FreeSwap": 2147479552, "Processes": 1150, "TotalHigh": 0, "FreeHigh": 0, "MemoryUnit": 1, "ConfiguredProcessors": 2, "AvailableProcessors": 2, "TotalPhysicalPages": 723805, "AvailablePhysicalPages": 67231 }

See also

Release notes

Blog Entries

This function is free to use.

Created 8th May 2021, last changed 28th January 2023


SystemInfo.IsiOSAppOnMac - SystemInfo.MACAddress