diff --git a/docs/en/sql-reference/functions/other-functions.md b/docs/en/sql-reference/functions/other-functions.md index 11c1e9ad3cf..bce3f9144b1 100644 --- a/docs/en/sql-reference/functions/other-functions.md +++ b/docs/en/sql-reference/functions/other-functions.md @@ -2463,3 +2463,39 @@ Result: │ Linux 4.15.0-55-generic │ └─────────────────────────┘ ``` + +## zookeeperSessionUptime {#zookeepersessionuptime} + +Returns the uptime of the current ZooKeeper session in seconds. + +**Syntax** + +``` sql +zookeeperSessionUptime() +``` + +**Arguments** + +- None. + +**Returned value** + +- Uptime of the current ZooKeeper session in seconds. + +Type: [UInt32](../../sql-reference/data-types/int-uint.md). + +**Example** + +Query: + +``` sql +SELECT zookeeperSessionUptime(); +``` + +Result: + +``` text +┌─zookeeperSessionUptime()─┐ +│ 286 │ +└──────────────────────────┘ +``` diff --git a/docs/ru/sql-reference/functions/other-functions.md b/docs/ru/sql-reference/functions/other-functions.md index 7d2cea0af4e..62f25c221c5 100644 --- a/docs/ru/sql-reference/functions/other-functions.md +++ b/docs/ru/sql-reference/functions/other-functions.md @@ -2411,3 +2411,39 @@ SELECT getOSKernelVersion(); │ Linux 4.15.0-55-generic │ └─────────────────────────┘ ``` + +## zookeeperSessionUptime {#zookeepersessionuptime} + +Возвращает аптайм текущего сеанса ZooKeeper в секундах. + +**Синтаксис** + +``` sql +zookeeperSessionUptime() +``` + +**Аргументы** + +- Нет. + +**Возвращаемое значение** + +- Аптайм текущего сеанса ZooKeeper в секундах. + +Тип: [UInt32](../../sql-reference/data-types/int-uint.md). + +**Пример** + +Запрос: + +``` sql +SELECT zookeeperSessionUptime(); +``` + +Результат: + +``` text +┌─zookeeperSessionUptime()─┐ +│ 286 │ +└──────────────────────────┘ +```