bpf-map

command module
v0.0.0-...-fe5f78b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 10, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

README

bpf-map

Archived: This tool has been superseded by bpftool.

A small tool to generically introspect BPF maps without requiring to be aware of the specific data structures stored inside. Can print the metadata of the map or its contents in hexadecimal form.

Install

Install from source via go get:

go get github.com/cilium/bpf-map

Download the binary release:

curl -SsL https://github.com/cilium/bpf-map/releases/download/v1.0/bpf-map -o bpf-map
chmod +x bpf-map

Usage

$ bpf-map dump /sys/fs/bpf/tc/globals/path/map

Example

$ sudo bpf-map info /sys/fs/bpf/tc/globals/cilium_lxc
Type:		Hash
Key size:	4
Value size:	104
Max entries:	1024
Flags:		0x0

$ sudo bpf-map dump /sys/fs/bpf/tc/globals/cilium_lxc
Key:
00000000  e8 f7 01 00                                       |....|
Value:
00000000  11 00 00 00 01 02 ca 74  0e c4 d8 25 33 18 00 00  |.......t...%3...|
00000010  1a 19 4b e1 ed 4b 00 00  f0 0d 00 00 00 00 00 00  |..K..K..........|
00000020  c0 a8 21 0b 00 00 74 ca  00 00 00 00 00 00 00 00  |..!...t.........|
00000030  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
00000040  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
00000050  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
00000060  00 00 00 00 00 00 00 00                           |........|

Key:
00000000  ee 1c 01 00                                       |....|
Value:
00000000  0f 00 00 00 01 01 d6 8a  4e 9b 9d a5 57 d5 00 00  |........N...W...|
00000010  ba 58 00 80 b9 c1 00 00  f0 0d 00 00 00 00 00 00  |.X..............|
00000020  c0 a8 21 0b 00 00 8a d6  00 00 00 00 00 00 00 00  |..!.............|
00000030  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
00000040  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
00000050  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
00000060  00 00 00 00 00 00 00 00                           |........|
[...]

Documentation

Overview

Copyright 2016 Authors of Cilium

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL