---
title: "calicoctl node diags"
description: "Reference for the calicoctl node diags command in Calico Open Source, used to collect diagnostics from a single Calico node."
product: "Calico Open Source"
version: "3.33 (latest)"
section: "Reference"
canonical_url: "https://docs.tigera.io/calico/latest/reference/calicoctl/node/diags"
---

# calicoctl node diags

This section describes the `calicoctl node diags` command.

Read the [calicoctl Overview](https://docs.tigera.io/calico/latest/reference/calicoctl/overview.md) for a full list of calicoctl commands.

## Displaying the help text for 'calicoctl node diags' command

Run `calicoctl node diags --help` to display the following help menu for the command.

```text
Gather a diagnostics bundle from the Calico node on this host. Run it on the
affected node when troubleshooting a networking problem; it collects logs and
system information useful for diagnosis.

Usage:
  calicoctl node diags [flags]

Examples:
  calicoctl node diags

Flags:
  -h, --help             help for diags
      --log-dir string   The directory containing Calico logs. (default "/var/log/calico")

Global Flags:
      --allow-version-mismatch   Allow client and cluster versions mismatch
      --context string           The name of the kubeconfig context to use
  -l, --log-level string         Set the log level (panic, fatal, error, warn, info, debug) (default "panic")
```

### Examples

```bash
sudo calicoctl node diags
```

An example response follows.

```text
Collecting diagnostics
Using temp dir: /tmp/calico676127473
Dumping netstat
Dumping routes (IPv4)
Dumping routes (IPv6)
Dumping interface info (IPv4)
Dumping interface info (IPv6)
Dumping iptables (IPv4)
Dumping iptables (IPv6)
Dumping ipsets
exit status 1
Dumping ipsets (container)
Copying journal for calico-node.service
Dumping felix stats
Copying Calico logs

Diags saved to /tmp/calico676127473/diags-20170522_151219.tar.gz
If required, you can upload the diagnostics bundle to a file sharing service
such as transfer.sh using curl or similar.  For example:

    curl --upload-file /tmp/calico676127473/diags-20170522_151219.tar.gz https://transfer.sh//tmp/calico676127473/diags-20170522_151219.tar.gz
```

### Options

```text
      --log-dir string   The directory containing Calico logs. (default "/var/log/calico")
```
