Topics   All   MacOS (Only)   Windows (Only)   Linux (Only, Not)   iOS (Only, Not)  
Components   Crossplatform Mac & Win   Server   Client   Old   Deprecated   Guides   Examples   Videos
New in version: 9.5   10.0   10.1   10.2   10.3   10.4   10.5   11.0   11.1   11.2    Statistic    FMM    Blog  

SystemInfo.AppUsageStatistics

Queries information about resource utilization.

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

Parameters

none

Result

Returns JSON or error.

Description

Queries information about resource utilization.
FieldDescription
UserTimeUsedSeconds of user time used.
SystemTimeUsedSeconds of system time used.
IntegralMaxResidentSetSizeIntegral max resident set size. Maximum memory usage of this app.
IntegralSharedTextMemorySizeIntegral shared text memory size.
IntegralUnsharedDataSizeIntegral unshared data size.
IntegralUnsharedStackSizeIntegral unshared stack size.
PageReclaimsNumber of page reclaims.
PageFaultsNumber of page faults.
SwapsNumber of swaps.
BlockInputOperationsNumber of block input operations.
BlockOutputOperationsNumber of block output operations.
MessagesSentNumber of messages sent.
MessagesReceivedNumber of messages received.
SignalsReceivedNumber of signals received.
VoluntaryContextSwitchesNumber of voluntary context switches.
InvoluntaryContextSwitchesNumber of involuntary context switches.

You can query on begin of a script and end of a script and compare (UserTimeUsed+SystemTimeUsed) to time difference to learn how much CPU usage was.

Examples

Query statistics:

MBS( "SystemInfo.AppUsageStatistics" )

Example result:
{
  "InvoluntaryContextSwitches" : 39406,
  "BlockOutputOperations" : 0,
  "IntegralUnsharedDataSize" : 0,
  "IntegralSharedTextMemorySize" : 0,
  "VoluntaryContextSwitches" : 7563,
  "MessagesReceived" : 45,
  "PageReclaims" : 118459,
  "SignalsReceived" : 0,
  "IntegralUnsharedStackSize" : 0,
  "SystemTimeUsed" : 1.3969780000000001,
  "UserTimeUsed" : 4.3447100000000001,
  "IntegralMaxResidentSetSize" : 369901568,
  "MessagesSent" : 24,
  "BlockInputOperations" : 0,
  "Swaps" : 0,
  "PageFaults" : 8927
}

Release notes

Blog Entries

FileMaker Magazin

Created 15th October 2020, last changed 14th November 2020


SystemInfo.ADSystemInfo - SystemInfo.AvailableRAM

Feedback: Report problem or ask question.




Links
MBS Xojo Plugins

Start Chat