The ffx target
commands can retrieve various types of information from Fuchsia devices.
The ffx target list
command prints the list of all Fuchsia devices connected to the host machine. This command is often used to quickly scan the following information of connected Fuchsia devices:
The ffx target show
command, unlike ffx target list
, targets only a single Fuchsia device and prints much detailed information about the device. To do so, ffx target show
requires that ffx
can establish a SSH connection to the target device. Below is some of the information you can obtain from ffx target show
:
Lastly, the ffx target snapshot
command generates a ZIP archive file that captures the current state of the target device. A snapshot from a device contains a generous amount of information helpful for debugging.
To get the list of all connected Fuchsia devices, run the following command:
ffx target list
This command prints output similar to the following:
$ ffx target list NAME SERIAL TYPE STATE ADDRS/IP AGE RCS fuchsia-5254-0063-5e7a <unknown> Unknown Unknown [172.16.241.43, fe80::7594:7308:4168:9fb1%brqemu] 0m8s N
To get the detailed information of your target Fuchsia device, run the following command:
ffx target show
This command prints output similar to the following:
$ ffx target show Target: Name: "fuchsia-4102-0ba9-8a3b" SSH Address: "[fe80::ae21:e7fa:8e1f:6c46%17]:22" Board: Name: "<BOARD_NAME>" Revision: "<REVISION_NUMBER>" ... Device: Serial number: "<SERIAL_NUMBER>" ... Product: ... Build date: "<DATE>" Build name: "<BUILD>" ... Model: "<MODEL>" Name: "<NAME>" ... Update: Current channel: "<CHANNEL>" Next channel: "<CHANNEL>" Build: Version: "<VERSION>" Product: "<PRODUCT>" Board: "<BOARD>" Commit: "<DATE>" ...
To generate a snapshot from your target Fuchsia device, run the following command:
ffx target snapshot
This command generates a ZIP archive file and prints its location, for example:
$ ffx target snapshot Exported /tmp/snapshots/20210616_183136/snapshot.zip
By default, the command stores the archive file in the /tmp
directory of the host machine. To change this directory, run ffx target snapshot --dir <PATH_TO_DIR>
.