> For the complete documentation index, see [llms.txt](https://docs.glesys.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.glesys.com/products/connectivity/load-balancer/how-tos/view-statistics.md).

# View statistics

***

## View statistics using the control panel

Under the **Statistics** tab, you can view the number of connections to the load balancer in a graph. The maximum number of connections you set is also displayed as a red line.

<figure><img src="/files/Aq1rdraXjjgmQumm1XlH" alt=""><figcaption></figcaption></figure>

## View statistics using the API

It's possible to extract the current number of connections and the maximum number of allowed connections using the [API](/platform/control-panel/api.md). Use the [loadbalancer/details](https://github.com/GleSYS/API-docs/wiki/API-Documentation#loadbalancerdetails) endpoint to extract the information. The key `currentsessions` contains the number of current connections, and `maxconnections` contains the maximum number of allowed connections.

For example, by using cURL you can extract all the data in XML format:

{% code title="Command" %}

```
curl -s -X POST --data-urlencode "loadbalancerid=lb1234567" -k --basic -u CL123456:KEY https://api.glesys.com/loadbalancer/details/
```

{% endcode %}

Or, if you prefer JSON format:

{% code title="Command" %}

```
curl -s -X POST --data-urlencode "loadbalancerid=lb1234567" -k --basic -u CL123456:KEY https://api.glesys.com/loadbalancer/details/format/json
```

{% endcode %}

You can then use `jq` to select the first load balancer's `currentsessions`.

```
curl -s -X POST --data-urlencode "loadbalancerid=lb1234567" -k --basic -u CL123456:KEY https://api.glesys.com/loadbalancer/details/format/json | jq '.response.loadbalancer.frontends[0].currentsessions'
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.glesys.com/products/connectivity/load-balancer/how-tos/view-statistics.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
