SystemInfo.AppUsageStatistics
-----------------------------

Queries information about resource utilization.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [SystemInfo](component_SystemInfo.md) | [10.5](newinversion105.md) | ✅ Yes | ❌ No | ❌ No | ✅ Yes, on macOS | ✅ Yes |

MBS( "SystemInfo.AppUsageStatistics" ) ### Parameters

none

### Result

Returns JSON or error.

### Description

Queries information about resource utilization.  
| Field | Description |
|---|---|
| UserTimeUsed | Seconds of user time used. |
| SystemTimeUsed | Seconds of system time used. |
| IntegralMaxResidentSetSize | Integral max resident set size. Maximum memory usage of this app. |
| IntegralSharedTextMemorySize | Integral shared text memory size. |
| IntegralUnsharedDataSize | Integral unshared data size. |
| IntegralUnsharedStackSize | Integral unshared stack size. |
| PageReclaims | Number of page reclaims. |
| PageFaults | Number of page faults. |
| Swaps | Number of swaps. |
| BlockInputOperations | Number of block input operations. |
| BlockOutputOperations | Number of block output operations. |
| MessagesSent | Number of messages sent. |
| MessagesReceived | Number of messages received. |
| SignalsReceived | Number of signals received. |
| VoluntaryContextSwitches | Number of voluntary context switches. |
| InvoluntaryContextSwitches | Number 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" )  
<small>  
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 } </small>### See also

- [SystemInfo.AppResourceUsageStatistics](SystemInfoAppResourceUsageStatistics.md)

### Release notes

- **Version 10.5**
    - Added [SystemInfo.AppUsageStatistics](https://www.mbsplugins.eu/SystemInfoAppUsageStatistics.shtml) function.

### Blog Entries

- [Neues MBS FileMaker Plugin 10.5 - Über 6400 Funktionen in einem Plugin](https://www.mbsplugins.de/archive/2020-11-17/Neues_MBS_FileMaker_Plugin_105/monkeybreadsoftware_blog_filemaker)
- [MBS FileMaker Plugin 10.5 - More than 6400 Functions In One Plugin](https://www.mbsplugins.de/archive/2020-11-17/MBS_FileMaker_Plugin_105_-_Mor/monkeybreadsoftware_blog_filemaker)
- [MBS FileMaker Plugin, version 10.5pr5](https://www.mbsplugins.de/archive/2020-10-17/MBS_FileMaker_Plugin_version_1/monkeybreadsoftware_blog_filemaker)

### FileMaker Magazin

- [Ausgabe 6/2020, Seite 26](https://filemaker-magazin.de/neuigkeit/4118-Appetithappen-FMM_202006)

This function is free to use.

Created 15th October 2020 , last changed 28th January 2023

  
[SystemInfo.AppResourceUsageStatistics](SystemInfoAppResourceUsageStatistics.md) - [SystemInfo.AvailableRAM](SystemInfoAvailableRAM.md)

[HTML Version](SystemInfoAppUsageStatistics.shtml)