Saltar al contenido principal
Versión: Siguiente

Application info

Application info : Object

ParámetrosTipoDescripción
ResultadoObjectInformación sobre la actividad de la aplicación activa
Historia
LanzamientoModificaciones
21 R2Soporte de las propiedades "useFluentUI" y "canUseFluentUI"

Descripción

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

El comando puede ejecutarse en aplicaciones que funcionen tanto en entornos autónomos como cliente/servidor. The information returned depends on where Application info is executed. Por ejemplo, si se ejecuta desde un 4D remoto, la información sólo se aplica a la estación de trabajo remota. Si el comando se llama en un método que se ejecuta en el servidor, la información devuelta se aplica al servidor.

El objeto devuelto contiene las siguientes propiedades:

PropiedadTipoDescriptionEjemplo
canUseFluentUIbooleanTrue if the running configuration (application and system) allows the application to use Fluent UI on Windows (useless on macOS). Valores posibles: true, false.true
cpuUsage(*)numberPorcentaje de procesador utilizado por 4D. Note, for Macs, the number displayed is for 1 core and represents an average for the processor.10.03
headlessbooleanTrue si la aplicación se ejecuta en modo sin interfaz. Valores posibles: true, false. For more information, see Command Line Interface.false
IPAddressesAllowDenycollectionSólo 4D Server. Returns a collection of IP addresses that are allowed or denied in the database's settings. Para más información, consulte Configuración IP.[{"mode": "allow", "ip": "192.168.*"},{...}]
[ ].modestringPropiedad que describe si la dirección IP está permitida o no. Possible values: "allow" or "deny""allow"
[ ].ipstringDirección IP"192.167.1.2"
IPAddressesToListencollectionSólo 4D Server. Returns the IP addresses that 4D Server listens for. Para más información, consulte Configuración IP.["192.168.18.12","192.168.18.10"]
launchedAsServicebooleanTrue si la aplicación se lanza como un servicio. Valores posibles: 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
newConnectionsAllowedbooleanSólo 4D Server. True si se permiten nuevas conexiones. Valores posibles: true, false. For more information, see Accept/Reject New Connections Button.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. No se devuelve en un entorno autónomo. Mínimo: 1. For more information, see Port Number.19814
remoteDebuggerSessionIDtextSession ID of the remote application to which the server debugger is attached. Este ID también es devuelto por Process activity."A838A40BJN3NJKH..."
SDIModebooleanTrue if the application is running in SDI mode on Windows (useless on macOS). Valores posibles: true, false. For more information, see SDI modetrue
TLSEnabledbooleanTrue if TLS enabled for client/server communications. No se devuelve en un entorno autónomo. Valores posibles: true, false. Para más información, ver Encriptar comunicaciones cliente-servidor.
uptimenumberTiempo transcurrido (en segundos) desde que se abrió la base 4D local. Para conexiones remotas, devuelve el tiempo transcurrido desde que se estableció la conexión.143
useFluentUIbooleanTrue if the application is running in Fluent UI on Windows (useless on macOS). Valores posibles: true, false.true
useLegacyNetworkLayerbooleanTrue si se utiliza la capa de red heredada para el servidor de aplicaciones. No se devuelve en un entorno autónomo. Valores posibles: true, false. For more information, see Network layer.false
useQUICNetworkLayerbooleanTrue if QUIC network layer used for the application server and db4d server. No se devuelve en un entorno autónomo. Valores posibles: true, false. Para más información, consulte esta entrada de blog.false
volumeShadowCopyStatusstringReturns the status of the Volume Shadow Copy Service. Sólo Windows. 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.
"disponible"

(*) 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.

Ejemplo

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
}

Si el código se ejecuta desde un cliente remoto 4D, el objeto contiene (por ejemplo):

{
"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
}

Ver también

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

Propiedades

Número de comando1599
Hilo seguro