## 18.3. Monitoring

This section describes procedures that can be used to monitor the database.

`apoc.monitor.ids` | node and relationships-ids in total and in use
`apoc.monitor.kernel` | store information such as kernel version, start time, read-only, database-name, store-log-version etc.
`apoc.monitor.store` | store size information for the different types of stores
`apoc.monitor.tx` | number of transactions total,opened,committed,concurrent,rolled-back,last-tx-id
`apoc.monitor.locks(minWaitTime long)` | db locking information such as avertedDeadLocks, lockCount, contendedLockCount and contendedLocks etc. (enterprise)

The following returns ID usage:

    CALL apoc.monitor.ids();

Table 18.4. Results
nodeIds | relIds | propIds | relTypeIds
--- | --- | --- | ---
400 | 3560 | 4000 | 7

The following returns store information:

    CALL apoc.monitor.kernel();

Table 18.5. Results
readOnly | kernelVersion | storeId | kernelStartTime | databaseName | storeLogVersion | storeCreationDate
--- | --- | --- | --- | --- | --- | ---
FALSE | "neo4j-kernel, version: 3.5.6,73866e84158298d5f4a7325b6466c0189ad21d11" | "7f450cfe1e4fefb5" | "2019-06-24 12:01:01" | "graph.db" | 0 | "2019-06-24 11:59:28"

The following returns store size information:

    CALL apoc.monitor.store();

Table 18.6. Results
logSize | stringStoreSize | arrayStoreSize | relStoreSize | propStoreSize | totalStoreSize | nodeStoreSize
--- | --- | --- | --- | --- | --- | ---
691264 | 8192 | 8192 | 122400 | 171339 | 1207741 | 8190

The following returns transaction information:

    CALL apoc.monitor.tx();

Table 18.7. Results
rolledBackTx | peakTx | lastTxId | currentOpenedTx | totalOpenedTx | totalTx
--- | --- | --- | --- | --- | ---
2213 | 6 | 16 | 1 | 9170 | 6956