In the CLI, you can use the command ipfs stats bw -p <peer id>to see the total number of bytes sent and received between your node and the peer identifier you are transmitting.
$ ipfs stats bw -p QmeMKDA6HbDD8Bwb4WoAQ7s9oKZTBpy55YFKG1RSHnBz6a
Bandwidth
TotalIn: 875 B
TotalOut: 14 kB
RateIn: 0 B/s
RateOut: 0 B/s
: https://docs.ipfs.io/reference/api/cli/#ipfs-stats-bw.
ipfs.stats.bw js IPFS js-ipfs js-ipfs-http-client http api ipfs.
ipfs.stats.bw , dht- , .
, ipfs bitswap ledger .
$ ipfs bitswap ledger QmeMKDA6HbDD8Bwb4WoAQ7s9oKZTBpy55YFKG1RSHnBz6a
Ledger for QmeMKDA6HbDD8Bwb4WoAQ7s9oKZTBpy55YFKG1RSHnBz6a
Debt ratio: 0.000000
Exchanges: 0
Bytes sent: 0
Bytes received: 0
: https://docs.ipfs.io/reference/api/cli/#ipfs-bitswap-ledger
API js-ipfs js-http-api-client.