---
title: "Server Statistics"
description: "Server statistics describe the node that runs your algorithm."
canonical: https://www.quantconnect.com/docs/v2/writing-algorithms/statistics/server-statistics
markdown: https://www.quantconnect.com/docs/v2/writing-algorithms/statistics/server-statistics.md
language: python
source: https://github.com/QuantConnect/Documentation/tree/master/03%20Writing%20Algorithms/39%20Statistics/04%20Server%20Statistics
modified: 2026-11-19
index: https://www.quantconnect.com/llms.txt
---

# Server Statistics

[Documentation](https://www.quantconnect.com/docs/v2.md) > [Writing Algorithms](https://www.quantconnect.com/docs/v2/writing-algorithms.md) > [Statistics](https://www.quantconnect.com/docs/v2/writing-algorithms/statistics.md) > Server Statistics

> Code examples are shown in Python. Append `?lang=csharp` to this URL for the C# version of this page.

## Introduction

Server statistics describe the node that runs your algorithm instead of the performance of the algorithm. LEAN attaches them to the backtest and live results, so you can see how much of the node CPU and RAM the algorithm uses, which version of LEAN runs it, and how long the node has been running.

## Default Statistics

The following table describes the server statistics:

| Statistic | Description |
| --- | --- |
| CPU Usage | Percentage of the node CPU in use. |
| Used RAM (MB) | RAM the algorithm uses, in megabytes. |
| Total RAM (MB) | RAM the node provides, in megabytes. |
| Hostname | Name of the machine that runs the algorithm, which starts with the type of deployment. |
| LEAN Version | Version of LEAN that runs the algorithm. |
| Up Time | Time the node has been running, in days, hours, minutes, and seconds. |

The available statistics depend on the version of LEAN that produces the results. Results from before LEAN reported the server statistics don't have them.

## Get Values

To get the server statistics inside an algorithm, call the `get_server_statistics` method of the `OS` class. For more information about the resource metrics the `OS` class exposes, see [Memory Metrics](https://www.quantconnect.com/docs/v2/writing-algorithms/key-concepts/debugging-tools.md#07-Memory-Metrics).

```python
for kvp in OS.get_server_statistics():
    self.log(f"{kvp.key}: {kvp.value}")
```

The following table describes the other ways to get the server statistics of your backtests and live algorithms:

| Deployment Target | Execution Mode | Access Tools |
| --- | --- | --- |
| QuantConnect Cloud | Backtest | [ReadBacktest](https://www.quantconnect.com/docs/v2/research-environment/meta-analysis/backtest-analysis.md) API method [/backtests/read](https://www.quantconnect.com/docs/v2/cloud-platform/api-reference/backtest-management/read-backtest/backtest-statistics.md) endpoint [Downloaded results file](https://www.quantconnect.com/docs/v2/cloud-platform/backtesting/results.md#17-Download-Results) |
| QuantConnect Cloud | Live Trading | [ReadLiveAlgorithm](https://www.quantconnect.com/docs/v2/research-environment/meta-analysis/live-analysis.md) API method [/live/read](https://www.quantconnect.com/docs/v2/cloud-platform/api-reference/live-management/read-live-algorithm/live-algorithm-statistics.md) endpoint |
| Local | Backtest | `<organizationWorkspace> / <projectName> / backtests / <unixTimestamp> / <algorithmId>.json` |
| Local | Live Trading | `<organizationWorkspace> / <projectName> / live / <timeStamp> / L-<deploymentId>.json` |
