Components | All | New | MacOS | Windows | Linux | iOS | ||||
Examples | Mac & Win | Server | Client | Guides | Statistic | FMM | Blog | Deprecated | Old |
SystemInfo.NetworkStats
Queries network statistics for link layer on MacOS.
Component | Version | macOS | Windows | Linux | Server | iOS SDK |
SystemInfo | 10.0 | ✅ Yes | ❌ No | ❌ No | ✅ Yes, on macOS | ❌ No |
Parameters
Parameter | Description | Example |
---|---|---|
Name | The name of the interface to query. Can be empty for array of all interfaces. Pass "sum" to sum up all counters. |
"en0" |
Result
Returns JSON or error.
Description
Queries network statistics for link layer on MacOS.Returns JSON array of objects, each with the following keys:
Name, PhysicalType, Type, MTU, Baudrate, InputPackets, InputErrors, OutputPackets, OutputErrors, Collisions, InputBytes, OutputBytes, InputMulticasts, OutputMulticasts.
Type is the type of device which includes 1 for ethernet and 6 for Wifi.
Baudrate | The linespeed. |
Collisions | The number of collisions on csma interfaces. |
InputBytes | Total number of octets received. |
InputErrors | The number of input errors on interface. |
InputMulticasts | The number of packets received via multicast. |
InputPackets | The number of packets received. |
MTU | The maximum transmission unit. |
Name | The name of the interface. |
OutputBytes | Total number of octets sent. |
OutputErrors | The number of output errors. |
OutputMulticasts | The number of packets sent via multicast. |
OutputPackets | The number of packets sent. |
PhysicalType | The physical network type. e.g., AUI, Thinnet, 10base-T, etc |
Type | The network type. |
Examples
Query statistics for all interfaces:
MBS( "SystemInfo.NetworkStats" )
Example result:
[
{
"Name": "lo0",
"PhysicalType": 24,
"Type": 24,
"MTU": 16384,
"Baudrate": 0,
"InputPackets": 1211504,
"InputErrors": 0,
"OutputPackets": 1211504,
"OutputErrors": 0,
"Collisions": 0,
"InputBytes": 424215552,
"OutputBytes": 424215552,
"InputMulticasts": 866700,
"OutputMulticasts": 0
},
...
]
Query statistics for en0, first ethernet card:
MBS( "SystemInfo.NetworkStats"; "en0" )
Example result:
{
"Name": "en0",
"PhysicalType": 6,
"Type": 6,
"MTU": 1500,
"Baudrate": 112050000,
"InputPackets": 3349997,
"InputErrors": 0,
"OutputPackets": 9122258,
"OutputErrors": 28815,
"Collisions": 0,
"InputBytes": 2294099968,
"OutputBytes": 9673651200,
"InputMulticasts": 67811,
"OutputMulticasts": 0
}
Query sum of statistics:
MBS( "SystemInfo.NetworkStats"; "sum" )
Example result:
{
"Name": "sum",
"InputPackets": 3393156,
"InputErrors": 0,
"OutputPackets": 9154972,
"OutputErrors": 29387,
"Collisions": 0,
"InputBytes": 2303736832,
"OutputBytes": 9682581504,
"InputMulticasts": 88721,
"OutputMulticasts": 0
}
Release notes
- Version 10.0
- Added SystemInfo.NetworkStats function.
Blog Entries
- Neues MBS FileMaker Plugin 10.0
- MBS FileMaker Plugin 10.0 - More than 6000 Functions In One Plugin
- MBS FileMaker Plugin, version 9.6pr2
This function is free to use.
Created 3th December 2019, last changed 28th January 2023