---
name: "function::get_loadavg_index"
section: "3stap"
platform: "linux"
package: "systemtap-doc"
version: "5.1-5"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/function::get_loadavg_index"
---

# function::get\_loadavg\_index(3stap)

Get the load average for a specified interval

## NAME

function::get\_loadavg\_index - Get the load average for a specified interval

## SYNOPSIS

```
    get_loadavg_index:long(indx:long)
```

## ARGUMENTS

*indx*

The load average interval to capture.

## DESCRIPTION

This function returns the load average at a specified interval. The three load average values 1, 5 and 15 minute average corresponds to indexes 0, 1 and 2 of the avenrun array - see linux/sched.h. Please note that the truncated-integer portion of the load average is returned. If the specified index is out-of-bounds, then an error message and exception is thrown.

## SEE ALSO0

[*tapset::loadavg*(3stap)](/tapset::loadavg/3stap.md)
