Skip to main content

Load

Get the load averages of target hosts. osapi behavior get --name load and osapi behavior method get show the same.

Behavior​

Nameload
DescriptionGet the load averages of target hosts
Placementnode
Internalno
APIyes
CLIyes
Nextno
Platformslinux, darwin
Sudonone
Runsnone
Writesnone
Keeps stateno
Usesnone
Used bystatus

Methods (1)​

NAMEVERBHTTPROUTEPERMISSIONDESCRIPTION
getreadGET/api/node/{hostname}/loadload:readGet the load averages of the host

Types (1)​

NAMEINPUTOUTPUT
getGetInputEntry { load_average }

Settings (0)​

None. Declare them with behavior.Config.

Telemetry​

Spanbehavior.load.<method>
Child spansexec sysctl
Metricsosapi_behavior_calls_total, osapi_behavior_duration_seconds, osapi_behavior_changes_total
Attributesosapi.behavior.name, osapi.behavior.method, osapi.behavior.verb, osapi.behavior.outcome, osapi.behavior.changed
Recorded inputsnone

Method get​

Nameget
Verbread
DescriptionGet the load averages of the host
DetailReads the averages of the run queue over 1, 5 and 15 minutes.
HTTPGET
Route/api/node/{hostname}/load
Permissionload:read
Commandosapi client node load get
Input typeGetInput
Output typeEntry

Input (0)​

None. The method takes no input; its command needs only --target.

Output (1)​

FIELDTYPEDESCRIPTION
load_averageobjectThe load averages of the host

Examples (1)​

EXAMPLEINPUTOUTPUT
A host under a light load(none)load_average=map[15min:0.25 1min:0.32 5min:0.28]