stat

Display traffic stats about one or many resources.

Examples

# Get all deployments in the test namespace.
linkerd stat deployments -n test

# Get the hello1 replication controller in the test namespace.
linkerd stat replicationcontrollers hello1 -n test

# Get all namespaces.
linkerd stat namespaces

# Get all inbound stats to the web deployment.
linkerd stat deploy/web

# Get all inbound stats to the pod1 and pod2 pods
linkerd stat po pod1 pod2

# Get all inbound stats to the pod1 pod and the web deployment
linkerd stat po/pod1 deploy/web

# Get all pods in all namespaces that call the hello1 deployment in the test namespace.
linkerd stat pods --to deploy/hello1 --to-namespace test --all-namespaces

# Get all pods in all namespaces that call the hello1 service in the test namespace.
linkerd stat pods --to svc/hello1 --to-namespace test --all-namespaces

# Get all services in all namespaces that receive calls from hello1 deployment in the test namespace.
linkerd stat services --from deploy/hello1 --from-namespace test --all-namespaces

# Get all trafficsplits and their leaf services.
linkerd stat ts

# Get the hello-split trafficsplit and its leaf services.
linkerd stat ts/hello-split

# Get all trafficsplits and their leaf services, and metrics for any traffic coming to the leaf services from the hello1 deployment.
linkerd stat ts --from deploy/hello1

# Get all namespaces that receive traffic from the default namespace.
linkerd stat namespaces --from ns/default

# Get all inbound stats to the test namespace.
linkerd stat ns/test

Flags

Flag Usage
--all-namespaces
-A
If present, returns stats across all namespaces, ignoring the “–namespace” flag
--from If present, restricts outbound stats from the specified resource name
--from-namespace Sets the namespace used from lookup the “–from” resource; by default the current “–namespace” is used
--namespace
-n
Namespace of the specified resource
--output
-o
Output format; one of: “table” or “json” or “wide”
--time-window
-t
Stat window (for example: “10s”, “1m”, “10m”, “1h”)
--to If present, restricts outbound stats to the specified resource name
--to-namespace Sets the namespace used to lookup the “–to” resource; by default the current “–namespace” is used