Skip to main content
Version: Next

Application info

Application info : Object

ParameterTypeDescription
Function resultObjectInformation about the active application activity

Description

The Application info command returns an object providing detailed information about the active application's activity and network configuration.

The command can be executed on applications running in both standalone and client/server environments. The information returned depends on where Application info is executed. For example, if executed from a remote 4D, the information applies only to the remote workstation. If the command is called in a method that is executed on the server, the information returned applies to the the server.

The returned object contains the following properties:

PropertyTypeDescriptionExample
cpuUsage(*)numberPercentage of processor used by 4D. Note, for Macs, the number displayed is for 1 core and represents an average for the processor.10.03
headlessbooleanTrue if the application is running in headless mode. Possible values: true, false. For more information, see Command Line Interface.false
IPAddressesAllowDenycollection4D Server only. Returns a collection of IP addresses that are allowed or denied in the database's settings. For more information, see IP configuration.[{"mode": "allow", "ip": "192.168.*"},{...}]
[ ].modestringProperty describing whether the IP address is allowed or not. Possible values: "allow" or "deny""allow"
[ ].ipstringIP address"192.167.1.2"
IPAddressesToListencollection4D Server only. Returns the IP addresses that 4D Server listens for. For more information, see IP configuration.["192.168.18.12","192.168.18.10"]
launchedAsServicebooleanTrue if application launched as a service. Possible values: true, false. For more information, see Registering a Database as a Service.false
networkInputThroughput(*)numberThe data rate (bytes/seconds) for network input of the machine running the application. In remote mode, the rate for the remote machine is returned. For more information, see Monitor Page.37311495
networkOutputThroughput(*)numberThe data rate (bytes/seconds) for network output of the machine running the application. In remote mode, the rate for the remote machine is returned. For more information, see Monitor Page.88058023
newConnectionsAllowedboolean4D Server only. True if new connections allowed. Possible values: true, false. For more information, see .true
pidnumberID of the 4D application instance process (provided by the OS) -- allows identifying each running 4D instance, for example from an external script16600
portIDnumber4D Server: port for active listening, 4D remote: port for remote connections. Not returned in standalone environment. Minimum: 1. For more information, see Port Number.19814
remoteDebuggerSessionIDtextSession ID of the remote application to which the server debugger is attached. This ID is also returned by Process activity."A838A40BJN3NJKH..."
SDIModebooleanTrue if the application is running in SDI mode on Windows (useless on macOS). Possible values: true, false. For more information, see SDI mode on developer.4d.comtrue
TLSEnabledbooleanTrue if TLS enabled for client/server communications. Not returned in standalone environment. Possible values: true, false. For more information, see TLS Protocol and Client/Server Connections.true
uptimenumberTime elapsed (in seconds) since local 4D database was opened. For remote connections, returns the time elapsed since the connection was made.143
useLegacyNetworkLayerbooleanTrue if legacy network layer used for the application server. Not returned in standalone environment. Possible values: true, false. For more information, see Activating or deactivating the legacy network layer.false
useQUICNetworkLayerbooleanTrue if QUIC network layer used for the application server and db4d server (beta in 4D v20, see Compatibility page). Not returned in standalone environment. Possible values: true, false. For more information, see this blog post.false
volumeShadowCopyStatusstringReturns the status of the Volume Shadow Copy Service. Windows only. For more information, see Using Volume Shadow Copy Service on Windows. Possible values:
ConstantValueComment
vss availableavailableThe service is available.
vss errorerrorThe service experienced an error.
vss not availablenotAvailableThe service is unavailable.
vss update requiredupdateRequiredThe service needs to be updated.
"available"

(*) On Windows, you need to get this counter previously initialized, for example by a call to the Application info command in the On Startup database method.

Example

The following code returns an object containing information about the running application:

 var $appInfo : Object
$appInfo:=Application info

If the code is executed from a standalone environment, the object contains (for example):

{
"launchedAsService": false,
"volumeShadowCopyStatus": "notAvailable",
"cpuUsage": 10.035875,
"uptime": 469,
"headless": false,
"pid": 16500,
"networkInputThroughput": 377263157,
"networkOutputThroughput": 12345242236
}

If the code is executed from a 4D remote client, the object contains (for example):

{
"launchedAsService": false,
"volumeShadowCopyStatus": "notAvailable",
"cpuUsage": 10.035875,
"portID": 19814,
"TLSEnabled": false,
"uptime": 143,
"headless": false,
"pid": 1550,
"useLegacyNetworkLayer": true,
"networkInputThroughput": 268047058,
"networkOutputThroughput": 12207686274
}

If the code is executed on 4D Server, the object contains (for example):

{
"launchedAsService": false,
"volumeShadowCopyStatus": "notAvailable",
"cpuUsage": 10.016125,
"portID": 19814,
"TLSEnabled": false,
"uptime": 192,
"headless": false,
"pid": 9560,
"useLegacyNetworkLayer": true,
"useQUICNetworkLayer": false,
"newConnectionsAllowed": true,
"IPAddressesToListen": [
"192.168.18.8",
"192.168.18.7"
],
"IPAddressesAllowDeny": [
{
"mode": "allow",
"ip": "192.168.*"
},
{
"mode": "deny",
"ip": "192.167.15.3"
},
{
"mode": "allow",
"ip": "192.167.1.2"
}
],
"networkInputThroughput": 149014925,
"networkOutputThroughput": 80238805
}

See also

Execute on server
Get database parameter
System info
REJECT NEW REMOTE CONNECTIONS

Properties

Command number1599
Thread safe