MarkLogic 9 Product Documentation
xdmp.serverStatus

xdmp.serverStatus(
   host-id as (Number|String),
   server-id as (Number|String)[]
) as Sequence

Summary

Returns the status of an app-server on a host as a Sequence of ObjectNodes.

Parameters
host-id A host ID.
server-id One or more server IDs (HTTP, XDBC, ODBC, webDAV, or Task).

Required Privileges

http://marklogic.com/xdmp/privileges/status

Usage Notes

The structure of the data returned is as follows:

serverId

The server id.

serverName

The server name.

hostId

The unique key of the host

error

The error in processing server status.

serverKind

The kind of application server

enabled

The server is enabled.

port

The server socket bind internet port number.

root

The root document directory pathname.

modules

The ID of the database that contains application modules. If on the file-system, then 0.

database

The ID of the content database when applicable. In some cases, this is a forest ID or a random number (when neither a database ID nor a forest ID is available).

sslCertificateTemplate

The certificate template.

lastLogin

The ID of the last login database.

displayLastLogin

Whether an appserver should display last-login information.

address

The server socket bind numeric internet address.

backlog

The socket listen backlog.

threads

The current number of active applicatiton server threads.

maxThreads

The maximum number of application server threads allowed on each host in the group.

requestTimeout

The request socket recv timeout, in seconds.

keepAliveTimeout

The keep-alive socket recv timeout, in seconds.

sessionTimeout

The session expiration timeout, in seconds.

staticExpires

The static content expiration interval, in seconds.

maxTimeLimit

The upper bound for a request's time limit, in seconds.

defaultTimeLimit

The default time limit for a request, in seconds.

maxInferenceSize

The upper bound for a request's inference size, in megabytes.

defaultInferenceSize

The default inference size for a request, in megabytes.

collation

The default collation for queries.

multiVersionConcurrencyControl

distributeTimestamps

authentication

The authentication scheme to use for this server

defaultUser

The user used as the default user in application level authentication. Using the admin user as the default user is equivalent to turning security off.

privilege

The privilege restricting access to the server.

concurrentRequestLimit

The concurrent request limit.

defaultXqueryVersion

An application server's default XQuery language version.

currentTime

The current time.

requestStatuses

The requests being processed by the server.

This is an object with the following properties:

requestStatus

The request being processed by the server.

This is an object with the following properties:

requestId

A unique id for a request.

serverId

The server id.

hostId

The unique key of the host

transactionId

The unique key of the transaction

canceled

Has this request been canceled.

modules

The ID of the database that contains application modules. If on the file-system, then 0.

database

The ID of the content database when applicable. In some cases, this is a forest ID or a random number (when neither a database ID nor a forest ID is available).

root

The root document directory pathname.

requestKind

The kind of request (for example, invoke, eval).

requestText

The request text.

requestRewrittenText

The rewritten request text.

update

Specifies if this request an update (true for update requests).

startTime

The time the operation started.

timeLimit

The request's time limit, in seconds.

maxTimeLimit

The upper bound for a request's time limit, in seconds.

lockCount

The request's current limit on combined count for the number of times a read or a write lock was acquired.

readSize

The request's current limit on combined size read from disk (listSize+compressedTreeSize), in bytes.

user

The unique ID of the user executing the request.

clientAddress

The network address of a client

triggerDepth

The maximum depth of trigger invocation.

expandedTreeCacheHits

The number of hits on the expanded cache.

expandedTreeCacheMisses

The number of misses on the expanded cache.

requestState

The state of a request

profilingAllowed

Is profiling allowed for this request.

profilingEnabled

Is profiling currently enabled for this request.

debuggingAllowed

Is debugging allowed for this request.

debuggingStatus

The debugging status of the request.

retryCount

The number of retries on the request.

exprId

The expression id.

whereStopped

Where the request is stopped.

requestRate

The rate of a request (requests/sec).

queueSize

The number of tasks in the server queue.

queueLimit

The maximum number size of the queue.

expandedTreeCacheHits

The number of hits on the expanded cache.

expandedTreeCacheMisses

The number of misses on the expanded cache.

expandedTreeCacheHitRate

The average number of hits on the expanded cache.

expandedTreeCacheMissRate

The average number of misses on the expanded cache.

fsProgramCacheHits

The number of hits on the filesystem program cache.

fsProgramCacheMisses

The number of misses on the filesystem program cache.

dbProgramCacheHits

The number of hits on the database program cache.

dbProgramCacheMisses

The number of misses on the database program cache.

envProgramCacheHits

The number of hits on the XSLT environment program cache.

envProgramCacheMisses

The number of misses on the XSLT environment program cache.

fsMainModuleSeqCacheHits

The number of hits on the filesystem main module sequence cache.

fsMainModuleSeqCacheMisses

The number of misses on the filesystem main module sequence cache.

dbMainModuleSeqCacheHits

The number of hits on the database main module sequence cache.

dbMainModuleSeqCacheMisses

The number of misses on the database main module sequence cache.

fsLibModuleCacheHits

The number of hits on the filesystem library module cache.

fsLibModuleCacheMisses

The number of misses on the filesystem library module cache.

dbLibModuleCacheHits

The number of hits on the database library module cache.

dbLibModuleCacheMisses

The number of misses on the database library module cache.

fsSchemaCacheHits

The number of hits on the filesystem schema cache.

fsSchemaCacheMisses

The number of misses on the filesystem schema cache.

dbSchemaCacheHits

The number of hits on the database schema cache.

dbSchemaCacheMisses

The number of misses on the database schema cache.

envSchemaCacheHits

The number of hits on the environment schema cache.

envSchemaCacheMisses

The number of misses on the environment schema cache.

hosts

The host's view of all other hosts in the cluster.

This is an object with the following properties:

host

The host connection information.

This is an object with the following properties:

hostName

The internet host name.

roundTripCount

The total of round-trip communications between the App Server host and this host. A round trip is the completion of a request sent from the App Server host to another host in the cluster.

roundTripTime

The total time (as xs:dayTimeDuration) to complete the round trips from the App Server to this host.

roundTripRate

The moving average data throughput of sending a request and receiving result in a round trip, in megabytes per second.

roundTripLoad

Time threads spent in sending a request and receiving results in round-trips, in proportion to the elapsed time.

outputSgmlCharacterEntities

The character entities to use during output.

outputEncoding

The output encoding of the App Server.

defaultErrorFormat

The default error format for protocol errors. One of html,xml,json,compatiable

errorHandler

The error handler used, if any.

urlRewriter

The url rewriter used, if any.

requestTime

1 minute average of request time for this server.

serverReceiveBytes

The number of bytes received over the network.

serverReceiveTime

The time (as xs:dayTimeDuration) to receive over the network.

serverReceiveRate

The moving average of incoming network throughput, in megabytes per second.

serverReceiveLoad

Network time threads spent receiving data, in proportion to the elapsed time.

serverSendBytes

The number of bytes sent over the network.

serverSendTime

The time (as xs:dayTimeDuration) to send over the network.

serverSendRate

The moving average of outgoing network throughput, in megabytes per second.

serverSendLoad

Network time threads spent sending data, in proportion to the elapsed time.

Example

xdmp.serverStatus(xdmp.host(), xdmp.server("Admin"));
=>
{
 "serverId": "16410760008133871361",
 "serverName": "Admin",
 "hostId": "2485368722774099257",
 "serverKind": "http-server",
 "enabled": true,
 "port": 8001,
 "root": "Admin/",
 "modules": 0,
 "database": "6302398542082263257",
 "sslCertificateTemplate": 0,
 "lastLogin": 0,
 "displayLastLogin": false,
 "backlog": 256,
 "threads": 1,
 "maxThreads": 32,
 "requestTimeout": 30,
 "keepAliveTimeout": 5,
 "sessionTimeout": 3600,
 "staticExpires": 3600,
 "maxTimeLimit": 10800,
 "defaultTimeLimit": 600,
 "maxInferenceSize": 500,
 "defaultInferenceSize": 100,
 "collation": "http://marklogic.com/collation/",
 "multiVersionConcurrencyControl": "contemporaneous",
 "distributeTimestamps": "fast",
 "authentication": "digest",
 "defaultUser": "10306463041007996463",
 "privilege": 0,
 "concurrentRequestLimit": 0,
 "defaultXqueryVersion": "0.9-ml",
 "currentTime": "2014-12-17T19:57:46.218358-08:00",
 "requestStatuses": [],
 "requestRate": 0,
 "expandedTreeCacheHits": 4196,
 "expandedTreeCacheMisses": 547,
 "expandedTreeCacheHitRate": 0,
 "expandedTreeCacheMissRate": 0,
 "fsProgramCacheHits": 275,
 "fsProgramCacheMisses": 275,
 "dbProgramCacheHits": 0,
 "dbProgramCacheMisses": 0,
 "envProgramCacheHits": 0,
 "envProgramCacheMisses": 0,
 "fsMainModuleSeqCacheHits": 10,
 "fsMainModuleSeqCacheMisses": 10,
 "dbMainModuleSeqCacheHits": 0,
 "dbMainModuleSeqCacheMisses": 0,
 "fsLibModuleCacheHits": 1167,
 "fsLibModuleCacheMisses": 1167,
 "dbLibModuleCacheHits": 0,
 "dbLibModuleCacheMisses": 0,
 "hosts": [],
 "outputSgmlCharacterEntities": "none",
 "outputEncoding": "UTF-8",
 "errorHandler": "/error-switch.xqy",
 "urlRewriter": "rewriter.xqy",
 "requestTime": 0.195662498474121
}

Powered by MarkLogic Server | Terms of Use | Privacy Policy