diff options
author | Silke Hofstra <silkeh@users.noreply.github.com> | 2020-02-19 15:48:51 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-19 15:48:51 +0100 |
commit | 8faa843fc42260cabb749cc9eb8886c191f28f7c (patch) | |
tree | 175a091379d2bb4b419a5b917647abfb40a00094 | |
parent | ca1ac435eae5182b2795e14caa80713a7440687b (diff) | |
download | prometheus_node_collector-8faa843fc42260cabb749cc9eb8886c191f28f7c.tar.bz2 prometheus_node_collector-8faa843fc42260cabb749cc9eb8886c191f28f7c.tar.xz prometheus_node_collector-8faa843fc42260cabb749cc9eb8886c191f28f7c.zip |
Add Btrfs collector (#1512)
* Add procfs/btrfs to vendor folder
* Add Btrfs collector
Resolves #1100
Signed-off-by: Silke Hofstra <silke@slxh.eu>
-rw-r--r-- | CHANGELOG.md | 1 | ||||
-rw-r--r-- | collector/btrfs_linux.go | 189 | ||||
-rw-r--r-- | collector/btrfs_linux_test.go | 118 | ||||
-rw-r--r-- | collector/fixtures/e2e-output.txt | 49 | ||||
-rw-r--r-- | collector/fixtures/sys.ttar | 595 | ||||
-rwxr-xr-x | end-to-end-test.sh | 1 | ||||
-rw-r--r-- | vendor/github.com/prometheus/procfs/btrfs/btrfs.go | 67 | ||||
-rw-r--r-- | vendor/github.com/prometheus/procfs/btrfs/get.go | 251 | ||||
-rw-r--r-- | vendor/modules.txt | 1 |
9 files changed, 1272 insertions, 0 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index 19d3cff..e04c9ad 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md | |||
@@ -23,6 +23,7 @@ | |||
23 | * [FEATURE] Add new cooling_device metrics to thermal zone collector #1445 | 23 | * [FEATURE] Add new cooling_device metrics to thermal zone collector #1445 |
24 | * [FEATURE] Add new softnet collector #1576 | 24 | * [FEATURE] Add new softnet collector #1576 |
25 | * [FEATURE] Add RAPL collector #1523 | 25 | * [FEATURE] Add RAPL collector #1523 |
26 | * [FEATURE] Add Btrfs collector #1512 | ||
26 | * [ENHANCEMENT] Collect InfiniBand port state and physical state #1357 | 27 | * [ENHANCEMENT] Collect InfiniBand port state and physical state #1357 |
27 | * [ENHANCEMENT] Include additional XFS runtime statistics. #1423 | 28 | * [ENHANCEMENT] Include additional XFS runtime statistics. #1423 |
28 | * [ENHANCEMENT] Report non-fatal collection errors in the exporter metric. #1439 | 29 | * [ENHANCEMENT] Report non-fatal collection errors in the exporter metric. #1439 |
diff --git a/collector/btrfs_linux.go b/collector/btrfs_linux.go new file mode 100644 index 0000000..2336e65 --- /dev/null +++ b/collector/btrfs_linux.go | |||
@@ -0,0 +1,189 @@ | |||
1 | // Copyright 2019 The Prometheus Authors | ||
2 | // Licensed under the Apache License, Version 2.0 (the "License"); | ||
3 | // you may not use this file except in compliance with the License. | ||
4 | // You may obtain a copy of the License at | ||
5 | // | ||
6 | // http://www.apache.org/licenses/LICENSE-2.0 | ||
7 | // | ||
8 | // Unless required by applicable law or agreed to in writing, software | ||
9 | // distributed under the License is distributed on an "AS IS" BASIS, | ||
10 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
11 | // See the License for the specific language governing permissions and | ||
12 | // limitations under the License. | ||
13 | |||
14 | // +build !nobtrfs | ||
15 | |||
16 | package collector | ||
17 | |||
18 | import ( | ||
19 | "fmt" | ||
20 | |||
21 | "github.com/go-kit/kit/log" | ||
22 | "github.com/prometheus/client_golang/prometheus" | ||
23 | "github.com/prometheus/procfs/btrfs" | ||
24 | ) | ||
25 | |||
26 | // A btrfsCollector is a Collector which gathers metrics from Btrfs filesystems. | ||
27 | type btrfsCollector struct { | ||
28 | fs btrfs.FS | ||
29 | logger log.Logger | ||
30 | } | ||
31 | |||
32 | func init() { | ||
33 | registerCollector("btrfs", defaultEnabled, NewBtrfsCollector) | ||
34 | } | ||
35 | |||
36 | // NewBtrfsCollector returns a new Collector exposing Btrfs statistics. | ||
37 | func NewBtrfsCollector(logger log.Logger) (Collector, error) { | ||
38 | fs, err := btrfs.NewFS(*sysPath) | ||
39 | if err != nil { | ||
40 | return nil, fmt.Errorf("failed to open sysfs: %v", err) | ||
41 | } | ||
42 | |||
43 | return &btrfsCollector{ | ||
44 | fs: fs, | ||
45 | logger: logger, | ||
46 | }, nil | ||
47 | } | ||
48 | |||
49 | // Update retrieves and exports Btrfs statistics. | ||
50 | // It implements Collector. | ||
51 | func (c *btrfsCollector) Update(ch chan<- prometheus.Metric) error { | ||
52 | stats, err := c.fs.Stats() | ||
53 | if err != nil { | ||
54 | return fmt.Errorf("failed to retrieve Btrfs stats: %v", err) | ||
55 | } | ||
56 | |||
57 | for _, s := range stats { | ||
58 | c.updateBtrfsStats(ch, s) | ||
59 | } | ||
60 | |||
61 | return nil | ||
62 | } | ||
63 | |||
64 | // btrfsMetric represents a single Btrfs metric that is converted into a Prometheus Metric. | ||
65 | type btrfsMetric struct { | ||
66 | name string | ||
67 | desc string | ||
68 | value float64 | ||
69 | extraLabel []string | ||
70 | extraLabelValue []string | ||
71 | } | ||
72 | |||
73 | // updateBtrfsStats collects statistics for one bcache ID. | ||
74 | func (c *btrfsCollector) updateBtrfsStats(ch chan<- prometheus.Metric, s *btrfs.Stats) { | ||
75 | const subsystem = "btrfs" | ||
76 | |||
77 | // Basic information about the filesystem. | ||
78 | devLabels := []string{"uuid"} | ||
79 | |||
80 | // Retrieve the metrics. | ||
81 | metrics := c.getMetrics(s) | ||
82 | |||
83 | // Convert all gathered metrics to Prometheus Metrics and add to channel. | ||
84 | for _, m := range metrics { | ||
85 | labels := append(devLabels, m.extraLabel...) | ||
86 | |||
87 | desc := prometheus.NewDesc( | ||
88 | prometheus.BuildFQName(namespace, subsystem, m.name), | ||
89 | m.desc, | ||
90 | labels, | ||
91 | nil, | ||
92 | ) | ||
93 | |||
94 | labelValues := []string{s.UUID} | ||
95 | if len(m.extraLabelValue) > 0 { | ||
96 | labelValues = append(labelValues, m.extraLabelValue...) | ||
97 | } | ||
98 | |||
99 | ch <- prometheus.MustNewConstMetric( | ||
100 | desc, | ||
101 | prometheus.GaugeValue, | ||
102 | m.value, | ||
103 | labelValues..., | ||
104 | ) | ||
105 | } | ||
106 | } | ||
107 | |||
108 | // getMetrics returns metrics for the given Btrfs statistics. | ||
109 | func (c *btrfsCollector) getMetrics(s *btrfs.Stats) []btrfsMetric { | ||
110 | metrics := []btrfsMetric{ | ||
111 | { | ||
112 | name: "info", | ||
113 | desc: "Filesystem information", | ||
114 | value: 1, | ||
115 | extraLabel: []string{"label"}, | ||
116 | extraLabelValue: []string{s.Label}, | ||
117 | }, | ||
118 | { | ||
119 | name: "global_rsv_size_bytes", | ||
120 | desc: "Size of global reserve.", | ||
121 | value: float64(s.Allocation.GlobalRsvSize), | ||
122 | }, | ||
123 | } | ||
124 | |||
125 | // Information about devices. | ||
126 | for n, dev := range s.Devices { | ||
127 | metrics = append(metrics, btrfsMetric{ | ||
128 | name: "device_size_bytes", | ||
129 | desc: "Size of a device that is part of the filesystem.", | ||
130 | value: float64(dev.Size), | ||
131 | extraLabel: []string{"device"}, | ||
132 | extraLabelValue: []string{n}, | ||
133 | }) | ||
134 | } | ||
135 | |||
136 | // Information about data, metadata and system data. | ||
137 | metrics = append(metrics, c.getAllocationStats("data", s.Allocation.Data)...) | ||
138 | metrics = append(metrics, c.getAllocationStats("metadata", s.Allocation.Metadata)...) | ||
139 | metrics = append(metrics, c.getAllocationStats("system", s.Allocation.System)...) | ||
140 | |||
141 | return metrics | ||
142 | } | ||
143 | |||
144 | // getAllocationStats returns allocation metrics for the given Btrfs Allocation statistics. | ||
145 | func (c *btrfsCollector) getAllocationStats(a string, s *btrfs.AllocationStats) []btrfsMetric { | ||
146 | metrics := []btrfsMetric{ | ||
147 | { | ||
148 | name: "reserved_bytes", | ||
149 | desc: "Amount of space reserved for a data type", | ||
150 | value: float64(s.ReservedBytes), | ||
151 | extraLabel: []string{"block_group_type"}, | ||
152 | extraLabelValue: []string{a}, | ||
153 | }, | ||
154 | } | ||
155 | |||
156 | // Add all layout statistics. | ||
157 | for layout, stats := range s.Layouts { | ||
158 | metrics = append(metrics, c.getLayoutStats(a, layout, stats)...) | ||
159 | } | ||
160 | |||
161 | return metrics | ||
162 | } | ||
163 | |||
164 | // getLayoutStats returns metrics for a data layout. | ||
165 | func (c *btrfsCollector) getLayoutStats(a, l string, s *btrfs.LayoutUsage) []btrfsMetric { | ||
166 | return []btrfsMetric{ | ||
167 | { | ||
168 | name: "used_bytes", | ||
169 | desc: "Amount of used space by a layout/data type", | ||
170 | value: float64(s.UsedBytes), | ||
171 | extraLabel: []string{"block_group_type", "mode"}, | ||
172 | extraLabelValue: []string{a, l}, | ||
173 | }, | ||
174 | { | ||
175 | name: "size_bytes", | ||
176 | desc: "Amount of space allocated for a layout/data type", | ||
177 | value: float64(s.TotalBytes), | ||
178 | extraLabel: []string{"block_group_type", "mode"}, | ||
179 | extraLabelValue: []string{a, l}, | ||
180 | }, | ||
181 | { | ||
182 | name: "allocation_ratio", | ||
183 | desc: "Data allocation ratio for a layout/data type", | ||
184 | value: s.Ratio, | ||
185 | extraLabel: []string{"block_group_type", "mode"}, | ||
186 | extraLabelValue: []string{a, l}, | ||
187 | }, | ||
188 | } | ||
189 | } | ||
diff --git a/collector/btrfs_linux_test.go b/collector/btrfs_linux_test.go new file mode 100644 index 0000000..9db7419 --- /dev/null +++ b/collector/btrfs_linux_test.go | |||
@@ -0,0 +1,118 @@ | |||
1 | // Copyright 2019 The Prometheus Authors | ||
2 | // Licensed under the Apache License, Version 2.0 (the "License"); | ||
3 | // you may not use this file except in compliance with the License. | ||
4 | // You may obtain a copy of the License at | ||
5 | // | ||
6 | // http://www.apache.org/licenses/LICENSE-2.0 | ||
7 | // | ||
8 | // Unless required by applicable law or agreed to in writing, software | ||
9 | // distributed under the License is distributed on an "AS IS" BASIS, | ||
10 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
11 | // See the License for the specific language governing permissions and | ||
12 | // limitations under the License. | ||
13 | |||
14 | // +build !nobtrfs | ||
15 | |||
16 | package collector | ||
17 | |||
18 | import ( | ||
19 | "strings" | ||
20 | "testing" | ||
21 | |||
22 | "github.com/prometheus/procfs/btrfs" | ||
23 | ) | ||
24 | |||
25 | var expectedBtrfsMetrics = [][]btrfsMetric{ | ||
26 | { | ||
27 | {name: "info", value: 1, extraLabel: []string{"label"}, extraLabelValue: []string{"fixture"}}, | ||
28 | {name: "global_rsv_size_bytes", value: 1.6777216e+07}, | ||
29 | {name: "device_size_bytes", value: 1.073741824e+10, extraLabel: []string{"device"}, extraLabelValue: []string{"loop25"}}, | ||
30 | {name: "device_size_bytes", value: 1.073741824e+10, extraLabel: []string{"device"}, extraLabelValue: []string{"loop26"}}, | ||
31 | {name: "reserved_bytes", value: 0, extraLabel: []string{"block_group_type"}, extraLabelValue: []string{"data"}}, | ||
32 | {name: "used_bytes", value: 8.08189952e+08, extraLabel: []string{"block_group_type", "mode"}, extraLabelValue: []string{"data", "raid0"}}, | ||
33 | {name: "size_bytes", value: 2.147483648e+09, extraLabel: []string{"block_group_type", "mode"}, extraLabelValue: []string{"data", "raid0"}}, | ||
34 | {name: "allocation_ratio", value: 1, extraLabel: []string{"block_group_type", "mode"}, extraLabelValue: []string{"data", "raid0"}}, | ||
35 | {name: "reserved_bytes", value: 0, extraLabel: []string{"block_group_type"}, extraLabelValue: []string{"metadata"}}, | ||
36 | {name: "used_bytes", value: 933888, extraLabel: []string{"block_group_type", "mode"}, extraLabelValue: []string{"metadata", "raid1"}}, | ||
37 | {name: "size_bytes", value: 1.073741824e+09, extraLabel: []string{"block_group_type", "mode"}, extraLabelValue: []string{"metadata", "raid1"}}, | ||
38 | {name: "allocation_ratio", value: 2, extraLabel: []string{"block_group_type", "mode"}, extraLabelValue: []string{"metadata", "raid1"}}, | ||
39 | {name: "reserved_bytes", value: 0, extraLabel: []string{"block_group_type"}, extraLabelValue: []string{"system"}}, | ||
40 | {name: "used_bytes", value: 16384, extraLabel: []string{"block_group_type", "mode"}, extraLabelValue: []string{"system", "raid1"}}, | ||
41 | {name: "size_bytes", value: 8.388608e+06, extraLabel: []string{"block_group_type", "mode"}, extraLabelValue: []string{"system", "raid1"}}, | ||
42 | {name: "allocation_ratio", value: 2, extraLabel: []string{"block_group_type", "mode"}, extraLabelValue: []string{"system", "raid1"}}, | ||
43 | }, | ||
44 | { | ||
45 | {name: "info", value: 1, extraLabel: []string{"label"}, extraLabelValue: []string{""}}, | ||
46 | {name: "global_rsv_size_bytes", value: 1.6777216e+07}, | ||
47 | {name: "device_size_bytes", value: 1.073741824e+10, extraLabel: []string{"device"}, extraLabelValue: []string{"loop22"}}, | ||
48 | {name: "device_size_bytes", value: 1.073741824e+10, extraLabel: []string{"device"}, extraLabelValue: []string{"loop23"}}, | ||
49 | {name: "device_size_bytes", value: 1.073741824e+10, extraLabel: []string{"device"}, extraLabelValue: []string{"loop24"}}, | ||
50 | {name: "device_size_bytes", value: 1.073741824e+10, extraLabel: []string{"device"}, extraLabelValue: []string{"loop25"}}, | ||
51 | {name: "reserved_bytes", value: 0, extraLabel: []string{"block_group_type"}, extraLabelValue: []string{"data"}}, | ||
52 | {name: "used_bytes", value: 0, extraLabel: []string{"block_group_type", "mode"}, extraLabelValue: []string{"data", "raid5"}}, | ||
53 | {name: "size_bytes", value: 6.44087808e+08, extraLabel: []string{"block_group_type", "mode"}, extraLabelValue: []string{"data", "raid5"}}, | ||
54 | {name: "allocation_ratio", value: 1.3333333333333333, extraLabel: []string{"block_group_type", "mode"}, extraLabelValue: []string{"data", "raid5"}}, | ||
55 | {name: "reserved_bytes", value: 0, extraLabel: []string{"block_group_type"}, extraLabelValue: []string{"metadata"}}, | ||
56 | {name: "used_bytes", value: 114688, extraLabel: []string{"block_group_type", "mode"}, extraLabelValue: []string{"metadata", "raid6"}}, | ||
57 | {name: "size_bytes", value: 4.29391872e+08, extraLabel: []string{"block_group_type", "mode"}, extraLabelValue: []string{"metadata", "raid6"}}, | ||
58 | {name: "allocation_ratio", value: 2, extraLabel: []string{"block_group_type", "mode"}, extraLabelValue: []string{"metadata", "raid6"}}, | ||
59 | {name: "reserved_bytes", value: 0, extraLabel: []string{"block_group_type"}, extraLabelValue: []string{"system"}}, | ||
60 | {name: "used_bytes", value: 16384, extraLabel: []string{"block_group_type", "mode"}, extraLabelValue: []string{"system", "raid6"}}, | ||
61 | {name: "size_bytes", value: 1.6777216e+07, extraLabel: []string{"block_group_type", "mode"}, extraLabelValue: []string{"system", "raid6"}}, | ||
62 | {name: "allocation_ratio", value: 2, extraLabel: []string{"block_group_type", "mode"}, extraLabelValue: []string{"system", "raid6"}}, | ||
63 | }, | ||
64 | } | ||
65 | |||
66 | func checkMetric(exp, got *btrfsMetric) bool { | ||
67 | if exp.name != got.name || | ||
68 | exp.value != got.value || | ||
69 | len(exp.extraLabel) != len(got.extraLabel) || | ||
70 | len(exp.extraLabelValue) != len(got.extraLabelValue) { | ||
71 | return false | ||
72 | } | ||
73 | |||
74 | for i := range exp.extraLabel { | ||
75 | if exp.extraLabel[i] != got.extraLabel[i] { | ||
76 | return false | ||
77 | } | ||
78 | |||
79 | // Devices (loopXX) can appear in random order, so just check the first 4 characters. | ||
80 | if strings.HasPrefix(got.extraLabelValue[i], "loop") && | ||
81 | exp.extraLabelValue[i][:4] == got.extraLabelValue[i][:4] { | ||
82 | continue | ||
83 | } | ||
84 | |||
85 | if exp.extraLabelValue[i] != got.extraLabelValue[i] { | ||
86 | return false | ||
87 | } | ||
88 | } | ||
89 | |||
90 | return true | ||
91 | } | ||
92 | |||
93 | func TestBtrfs(t *testing.T) { | ||
94 | fs, _ := btrfs.NewFS("fixtures/sys") | ||
95 | collector := &btrfsCollector{fs: fs} | ||
96 | |||
97 | stats, err := collector.fs.Stats() | ||
98 | if err != nil { | ||
99 | t.Fatalf("Failed to retrieve Btrfs stats: %v", err) | ||
100 | } | ||
101 | if len(stats) != len(expectedBtrfsMetrics) { | ||
102 | t.Fatalf("Unexpected number of Btrfs stats: expected %v, got %v", len(expectedBtrfsMetrics), len(stats)) | ||
103 | } | ||
104 | |||
105 | for i, s := range stats { | ||
106 | metrics := collector.getMetrics(s) | ||
107 | if len(metrics) != len(expectedBtrfsMetrics[i]) { | ||
108 | t.Fatalf("Unexpected number of Btrfs metrics: expected %v, got %v", len(expectedBtrfsMetrics[i]), len(metrics)) | ||
109 | } | ||
110 | |||
111 | for j, m := range metrics { | ||
112 | exp := expectedBtrfsMetrics[i][j] | ||
113 | if !checkMetric(&exp, &m) { | ||
114 | t.Errorf("Incorrect btrfs metric: expected %#v, got: %#v", exp, m) | ||
115 | } | ||
116 | } | ||
117 | } | ||
118 | } | ||
diff --git a/collector/fixtures/e2e-output.txt b/collector/fixtures/e2e-output.txt index e34bf56..ddc048f 100644 --- a/collector/fixtures/e2e-output.txt +++ b/collector/fixtures/e2e-output.txt | |||
@@ -140,6 +140,54 @@ node_bonding_slaves{master="int"} 2 | |||
140 | # HELP node_boot_time_seconds Node boot time, in unixtime. | 140 | # HELP node_boot_time_seconds Node boot time, in unixtime. |
141 | # TYPE node_boot_time_seconds gauge | 141 | # TYPE node_boot_time_seconds gauge |
142 | node_boot_time_seconds 1.418183276e+09 | 142 | node_boot_time_seconds 1.418183276e+09 |
143 | # HELP node_btrfs_allocation_ratio Data allocation ratio for a layout/data type | ||
144 | # TYPE node_btrfs_allocation_ratio gauge | ||
145 | node_btrfs_allocation_ratio{block_group_type="data",mode="raid0",uuid="0abb23a9-579b-43e6-ad30-227ef47fcb9d"} 1 | ||
146 | node_btrfs_allocation_ratio{block_group_type="data",mode="raid5",uuid="7f07c59f-6136-449c-ab87-e1cf2328731b"} 1.3333333333333333 | ||
147 | node_btrfs_allocation_ratio{block_group_type="metadata",mode="raid1",uuid="0abb23a9-579b-43e6-ad30-227ef47fcb9d"} 2 | ||
148 | node_btrfs_allocation_ratio{block_group_type="metadata",mode="raid6",uuid="7f07c59f-6136-449c-ab87-e1cf2328731b"} 2 | ||
149 | node_btrfs_allocation_ratio{block_group_type="system",mode="raid1",uuid="0abb23a9-579b-43e6-ad30-227ef47fcb9d"} 2 | ||
150 | node_btrfs_allocation_ratio{block_group_type="system",mode="raid6",uuid="7f07c59f-6136-449c-ab87-e1cf2328731b"} 2 | ||
151 | # HELP node_btrfs_device_size_bytes Size of a device that is part of the filesystem. | ||
152 | # TYPE node_btrfs_device_size_bytes gauge | ||
153 | node_btrfs_device_size_bytes{device="loop22",uuid="7f07c59f-6136-449c-ab87-e1cf2328731b"} 1.073741824e+10 | ||
154 | node_btrfs_device_size_bytes{device="loop23",uuid="7f07c59f-6136-449c-ab87-e1cf2328731b"} 1.073741824e+10 | ||
155 | node_btrfs_device_size_bytes{device="loop24",uuid="7f07c59f-6136-449c-ab87-e1cf2328731b"} 1.073741824e+10 | ||
156 | node_btrfs_device_size_bytes{device="loop25",uuid="0abb23a9-579b-43e6-ad30-227ef47fcb9d"} 1.073741824e+10 | ||
157 | node_btrfs_device_size_bytes{device="loop25",uuid="7f07c59f-6136-449c-ab87-e1cf2328731b"} 1.073741824e+10 | ||
158 | node_btrfs_device_size_bytes{device="loop26",uuid="0abb23a9-579b-43e6-ad30-227ef47fcb9d"} 1.073741824e+10 | ||
159 | # HELP node_btrfs_global_rsv_size_bytes Size of global reserve. | ||
160 | # TYPE node_btrfs_global_rsv_size_bytes gauge | ||
161 | node_btrfs_global_rsv_size_bytes{uuid="0abb23a9-579b-43e6-ad30-227ef47fcb9d"} 1.6777216e+07 | ||
162 | node_btrfs_global_rsv_size_bytes{uuid="7f07c59f-6136-449c-ab87-e1cf2328731b"} 1.6777216e+07 | ||
163 | # HELP node_btrfs_info Filesystem information | ||
164 | # TYPE node_btrfs_info gauge | ||
165 | node_btrfs_info{label="",uuid="7f07c59f-6136-449c-ab87-e1cf2328731b"} 1 | ||
166 | node_btrfs_info{label="fixture",uuid="0abb23a9-579b-43e6-ad30-227ef47fcb9d"} 1 | ||
167 | # HELP node_btrfs_reserved_bytes Amount of space reserved for a data type | ||
168 | # TYPE node_btrfs_reserved_bytes gauge | ||
169 | node_btrfs_reserved_bytes{block_group_type="data",uuid="0abb23a9-579b-43e6-ad30-227ef47fcb9d"} 0 | ||
170 | node_btrfs_reserved_bytes{block_group_type="data",uuid="7f07c59f-6136-449c-ab87-e1cf2328731b"} 0 | ||
171 | node_btrfs_reserved_bytes{block_group_type="metadata",uuid="0abb23a9-579b-43e6-ad30-227ef47fcb9d"} 0 | ||
172 | node_btrfs_reserved_bytes{block_group_type="metadata",uuid="7f07c59f-6136-449c-ab87-e1cf2328731b"} 0 | ||
173 | node_btrfs_reserved_bytes{block_group_type="system",uuid="0abb23a9-579b-43e6-ad30-227ef47fcb9d"} 0 | ||
174 | node_btrfs_reserved_bytes{block_group_type="system",uuid="7f07c59f-6136-449c-ab87-e1cf2328731b"} 0 | ||
175 | # HELP node_btrfs_size_bytes Amount of space allocated for a layout/data type | ||
176 | # TYPE node_btrfs_size_bytes gauge | ||
177 | node_btrfs_size_bytes{block_group_type="data",mode="raid0",uuid="0abb23a9-579b-43e6-ad30-227ef47fcb9d"} 2.147483648e+09 | ||
178 | node_btrfs_size_bytes{block_group_type="data",mode="raid5",uuid="7f07c59f-6136-449c-ab87-e1cf2328731b"} 6.44087808e+08 | ||
179 | node_btrfs_size_bytes{block_group_type="metadata",mode="raid1",uuid="0abb23a9-579b-43e6-ad30-227ef47fcb9d"} 1.073741824e+09 | ||
180 | node_btrfs_size_bytes{block_group_type="metadata",mode="raid6",uuid="7f07c59f-6136-449c-ab87-e1cf2328731b"} 4.29391872e+08 | ||
181 | node_btrfs_size_bytes{block_group_type="system",mode="raid1",uuid="0abb23a9-579b-43e6-ad30-227ef47fcb9d"} 8.388608e+06 | ||
182 | node_btrfs_size_bytes{block_group_type="system",mode="raid6",uuid="7f07c59f-6136-449c-ab87-e1cf2328731b"} 1.6777216e+07 | ||
183 | # HELP node_btrfs_used_bytes Amount of used space by a layout/data type | ||
184 | # TYPE node_btrfs_used_bytes gauge | ||
185 | node_btrfs_used_bytes{block_group_type="data",mode="raid0",uuid="0abb23a9-579b-43e6-ad30-227ef47fcb9d"} 8.08189952e+08 | ||
186 | node_btrfs_used_bytes{block_group_type="data",mode="raid5",uuid="7f07c59f-6136-449c-ab87-e1cf2328731b"} 0 | ||
187 | node_btrfs_used_bytes{block_group_type="metadata",mode="raid1",uuid="0abb23a9-579b-43e6-ad30-227ef47fcb9d"} 933888 | ||
188 | node_btrfs_used_bytes{block_group_type="metadata",mode="raid6",uuid="7f07c59f-6136-449c-ab87-e1cf2328731b"} 114688 | ||
189 | node_btrfs_used_bytes{block_group_type="system",mode="raid1",uuid="0abb23a9-579b-43e6-ad30-227ef47fcb9d"} 16384 | ||
190 | node_btrfs_used_bytes{block_group_type="system",mode="raid6",uuid="7f07c59f-6136-449c-ab87-e1cf2328731b"} 16384 | ||
143 | # HELP node_buddyinfo_blocks Count of free blocks according to size. | 191 | # HELP node_buddyinfo_blocks Count of free blocks according to size. |
144 | # TYPE node_buddyinfo_blocks gauge | 192 | # TYPE node_buddyinfo_blocks gauge |
145 | node_buddyinfo_blocks{node="0",size="0",zone="DMA"} 1 | 193 | node_buddyinfo_blocks{node="0",size="0",zone="DMA"} 1 |
@@ -2560,6 +2608,7 @@ node_schedstat_waiting_seconds_total{cpu="1"} 364107.263788241 | |||
2560 | node_scrape_collector_success{collector="arp"} 1 | 2608 | node_scrape_collector_success{collector="arp"} 1 |
2561 | node_scrape_collector_success{collector="bcache"} 1 | 2609 | node_scrape_collector_success{collector="bcache"} 1 |
2562 | node_scrape_collector_success{collector="bonding"} 1 | 2610 | node_scrape_collector_success{collector="bonding"} 1 |
2611 | node_scrape_collector_success{collector="btrfs"} 1 | ||
2563 | node_scrape_collector_success{collector="buddyinfo"} 1 | 2612 | node_scrape_collector_success{collector="buddyinfo"} 1 |
2564 | node_scrape_collector_success{collector="conntrack"} 1 | 2613 | node_scrape_collector_success{collector="conntrack"} 1 |
2565 | node_scrape_collector_success{collector="cpu"} 1 | 2614 | node_scrape_collector_success{collector="cpu"} 1 |
diff --git a/collector/fixtures/sys.ttar b/collector/fixtures/sys.ttar index 47610fe..a4550a5 100644 --- a/collector/fixtures/sys.ttar +++ b/collector/fixtures/sys.ttar | |||
@@ -3233,6 +3233,601 @@ Lines: 1 | |||
3233 | 0 | 3233 | 0 |
3234 | Mode: 644 | 3234 | Mode: 644 |
3235 | # ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | 3235 | # ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
3236 | Directory: sys/fs/btrfs | ||
3237 | Mode: 755 | ||
3238 | # ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | ||
3239 | Directory: sys/fs/btrfs/0abb23a9-579b-43e6-ad30-227ef47fcb9d | ||
3240 | Mode: 755 | ||
3241 | # ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | ||
3242 | Directory: sys/fs/btrfs/0abb23a9-579b-43e6-ad30-227ef47fcb9d/allocation | ||
3243 | Mode: 755 | ||
3244 | # ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | ||
3245 | Directory: sys/fs/btrfs/0abb23a9-579b-43e6-ad30-227ef47fcb9d/allocation/data | ||
3246 | Mode: 755 | ||
3247 | # ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | ||
3248 | Path: sys/fs/btrfs/0abb23a9-579b-43e6-ad30-227ef47fcb9d/allocation/data/bytes_may_use | ||
3249 | Lines: 1 | ||
3250 | 0 | ||
3251 | Mode: 444 | ||
3252 | # ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | ||
3253 | Path: sys/fs/btrfs/0abb23a9-579b-43e6-ad30-227ef47fcb9d/allocation/data/bytes_pinned | ||
3254 | Lines: 1 | ||
3255 | 0 | ||
3256 | Mode: 444 | ||
3257 | # ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | ||
3258 | Path: sys/fs/btrfs/0abb23a9-579b-43e6-ad30-227ef47fcb9d/allocation/data/bytes_readonly | ||
3259 | Lines: 1 | ||
3260 | 0 | ||
3261 | Mode: 444 | ||
3262 | # ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | ||
3263 | Path: sys/fs/btrfs/0abb23a9-579b-43e6-ad30-227ef47fcb9d/allocation/data/bytes_reserved | ||
3264 | Lines: 1 | ||
3265 | 0 | ||
3266 | Mode: 444 | ||
3267 | # ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | ||
3268 | Path: sys/fs/btrfs/0abb23a9-579b-43e6-ad30-227ef47fcb9d/allocation/data/bytes_used | ||
3269 | Lines: 1 | ||
3270 | 808189952 | ||
3271 | Mode: 444 | ||
3272 | # ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | ||
3273 | Path: sys/fs/btrfs/0abb23a9-579b-43e6-ad30-227ef47fcb9d/allocation/data/disk_total | ||
3274 | Lines: 1 | ||
3275 | 2147483648 | ||
3276 | Mode: 444 | ||
3277 | # ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | ||
3278 | Path: sys/fs/btrfs/0abb23a9-579b-43e6-ad30-227ef47fcb9d/allocation/data/disk_used | ||
3279 | Lines: 1 | ||
3280 | 808189952 | ||
3281 | Mode: 444 | ||
3282 | # ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | ||
3283 | Path: sys/fs/btrfs/0abb23a9-579b-43e6-ad30-227ef47fcb9d/allocation/data/flags | ||
3284 | Lines: 1 | ||
3285 | 1 | ||
3286 | Mode: 444 | ||
3287 | # ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | ||
3288 | Directory: sys/fs/btrfs/0abb23a9-579b-43e6-ad30-227ef47fcb9d/allocation/data/raid0 | ||
3289 | Mode: 755 | ||
3290 | # ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | ||
3291 | Path: sys/fs/btrfs/0abb23a9-579b-43e6-ad30-227ef47fcb9d/allocation/data/raid0/total_bytes | ||
3292 | Lines: 1 | ||
3293 | 2147483648 | ||
3294 | Mode: 444 | ||
3295 | # ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | ||
3296 | Path: sys/fs/btrfs/0abb23a9-579b-43e6-ad30-227ef47fcb9d/allocation/data/raid0/used_bytes | ||
3297 | Lines: 1 | ||
3298 | 808189952 | ||
3299 | Mode: 444 | ||
3300 | # ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | ||
3301 | Path: sys/fs/btrfs/0abb23a9-579b-43e6-ad30-227ef47fcb9d/allocation/data/total_bytes | ||
3302 | Lines: 1 | ||
3303 | 2147483648 | ||
3304 | Mode: 444 | ||
3305 | # ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | ||
3306 | Path: sys/fs/btrfs/0abb23a9-579b-43e6-ad30-227ef47fcb9d/allocation/data/total_bytes_pinned | ||
3307 | Lines: 1 | ||
3308 | 0 | ||
3309 | Mode: 444 | ||
3310 | # ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | ||
3311 | Path: sys/fs/btrfs/0abb23a9-579b-43e6-ad30-227ef47fcb9d/allocation/global_rsv_reserved | ||
3312 | Lines: 1 | ||
3313 | 16777216 | ||
3314 | Mode: 444 | ||
3315 | # ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | ||
3316 | Path: sys/fs/btrfs/0abb23a9-579b-43e6-ad30-227ef47fcb9d/allocation/global_rsv_size | ||
3317 | Lines: 1 | ||
3318 | 16777216 | ||
3319 | Mode: 444 | ||
3320 | # ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | ||
3321 | Directory: sys/fs/btrfs/0abb23a9-579b-43e6-ad30-227ef47fcb9d/allocation/metadata | ||
3322 | Mode: 755 | ||
3323 | # ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | ||
3324 | Path: sys/fs/btrfs/0abb23a9-579b-43e6-ad30-227ef47fcb9d/allocation/metadata/bytes_may_use | ||
3325 | Lines: 1 | ||
3326 | 16777216 | ||
3327 | Mode: 444 | ||
3328 | # ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | ||
3329 | Path: sys/fs/btrfs/0abb23a9-579b-43e6-ad30-227ef47fcb9d/allocation/metadata/bytes_pinned | ||
3330 | Lines: 1 | ||
3331 | 0 | ||
3332 | Mode: 444 | ||
3333 | # ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | ||
3334 | Path: sys/fs/btrfs/0abb23a9-579b-43e6-ad30-227ef47fcb9d/allocation/metadata/bytes_readonly | ||
3335 | Lines: 1 | ||
3336 | 131072 | ||
3337 | Mode: 444 | ||
3338 | # ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | ||
3339 | Path: sys/fs/btrfs/0abb23a9-579b-43e6-ad30-227ef47fcb9d/allocation/metadata/bytes_reserved | ||
3340 | Lines: 1 | ||
3341 | 0 | ||
3342 | Mode: 444 | ||
3343 | # ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | ||
3344 | Path: sys/fs/btrfs/0abb23a9-579b-43e6-ad30-227ef47fcb9d/allocation/metadata/bytes_used | ||
3345 | Lines: 1 | ||
3346 | 933888 | ||
3347 | Mode: 444 | ||
3348 | # ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | ||
3349 | Path: sys/fs/btrfs/0abb23a9-579b-43e6-ad30-227ef47fcb9d/allocation/metadata/disk_total | ||
3350 | Lines: 1 | ||
3351 | 2147483648 | ||
3352 | Mode: 444 | ||
3353 | # ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | ||
3354 | Path: sys/fs/btrfs/0abb23a9-579b-43e6-ad30-227ef47fcb9d/allocation/metadata/disk_used | ||
3355 | Lines: 1 | ||
3356 | 1867776 | ||
3357 | Mode: 444 | ||
3358 | # ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | ||
3359 | Path: sys/fs/btrfs/0abb23a9-579b-43e6-ad30-227ef47fcb9d/allocation/metadata/flags | ||
3360 | Lines: 1 | ||
3361 | 4 | ||
3362 | Mode: 444 | ||
3363 | # ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | ||
3364 | Directory: sys/fs/btrfs/0abb23a9-579b-43e6-ad30-227ef47fcb9d/allocation/metadata/raid1 | ||
3365 | Mode: 755 | ||
3366 | # ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | ||
3367 | Path: sys/fs/btrfs/0abb23a9-579b-43e6-ad30-227ef47fcb9d/allocation/metadata/raid1/total_bytes | ||
3368 | Lines: 1 | ||
3369 | 1073741824 | ||
3370 | Mode: 444 | ||
3371 | # ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | ||
3372 | Path: sys/fs/btrfs/0abb23a9-579b-43e6-ad30-227ef47fcb9d/allocation/metadata/raid1/used_bytes | ||
3373 | Lines: 1 | ||
3374 | 933888 | ||
3375 | Mode: 444 | ||
3376 | # ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | ||
3377 | Path: sys/fs/btrfs/0abb23a9-579b-43e6-ad30-227ef47fcb9d/allocation/metadata/total_bytes | ||
3378 | Lines: 1 | ||
3379 | 1073741824 | ||
3380 | Mode: 444 | ||
3381 | # ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | ||
3382 | Path: sys/fs/btrfs/0abb23a9-579b-43e6-ad30-227ef47fcb9d/allocation/metadata/total_bytes_pinned | ||
3383 | Lines: 1 | ||
3384 | 0 | ||
3385 | Mode: 444 | ||
3386 | # ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | ||
3387 | Directory: sys/fs/btrfs/0abb23a9-579b-43e6-ad30-227ef47fcb9d/allocation/system | ||
3388 | Mode: 755 | ||
3389 | # ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | ||
3390 | Path: sys/fs/btrfs/0abb23a9-579b-43e6-ad30-227ef47fcb9d/allocation/system/bytes_may_use | ||
3391 | Lines: 1 | ||
3392 | 0 | ||
3393 | Mode: 444 | ||
3394 | # ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | ||
3395 | Path: sys/fs/btrfs/0abb23a9-579b-43e6-ad30-227ef47fcb9d/allocation/system/bytes_pinned | ||
3396 | Lines: 1 | ||
3397 | 0 | ||
3398 | Mode: 444 | ||
3399 | # ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | ||
3400 | Path: sys/fs/btrfs/0abb23a9-579b-43e6-ad30-227ef47fcb9d/allocation/system/bytes_readonly | ||
3401 | Lines: 1 | ||
3402 | 0 | ||
3403 | Mode: 444 | ||
3404 | # ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | ||
3405 | Path: sys/fs/btrfs/0abb23a9-579b-43e6-ad30-227ef47fcb9d/allocation/system/bytes_reserved | ||
3406 | Lines: 1 | ||
3407 | 0 | ||
3408 | Mode: 444 | ||
3409 | # ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | ||
3410 | Path: sys/fs/btrfs/0abb23a9-579b-43e6-ad30-227ef47fcb9d/allocation/system/bytes_used | ||
3411 | Lines: 1 | ||
3412 | 16384 | ||
3413 | Mode: 444 | ||
3414 | # ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | ||
3415 | Path: sys/fs/btrfs/0abb23a9-579b-43e6-ad30-227ef47fcb9d/allocation/system/disk_total | ||
3416 | Lines: 1 | ||
3417 | 16777216 | ||
3418 | Mode: 444 | ||
3419 | # ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | ||
3420 | Path: sys/fs/btrfs/0abb23a9-579b-43e6-ad30-227ef47fcb9d/allocation/system/disk_used | ||
3421 | Lines: 1 | ||
3422 | 32768 | ||
3423 | Mode: 444 | ||
3424 | # ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | ||
3425 | Path: sys/fs/btrfs/0abb23a9-579b-43e6-ad30-227ef47fcb9d/allocation/system/flags | ||
3426 | Lines: 1 | ||
3427 | 2 | ||
3428 | Mode: 444 | ||
3429 | # ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | ||
3430 | Directory: sys/fs/btrfs/0abb23a9-579b-43e6-ad30-227ef47fcb9d/allocation/system/raid1 | ||
3431 | Mode: 755 | ||
3432 | # ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | ||
3433 | Path: sys/fs/btrfs/0abb23a9-579b-43e6-ad30-227ef47fcb9d/allocation/system/raid1/total_bytes | ||
3434 | Lines: 1 | ||
3435 | 8388608 | ||
3436 | Mode: 444 | ||
3437 | # ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | ||
3438 | Path: sys/fs/btrfs/0abb23a9-579b-43e6-ad30-227ef47fcb9d/allocation/system/raid1/used_bytes | ||
3439 | Lines: 1 | ||
3440 | 16384 | ||
3441 | Mode: 444 | ||
3442 | # ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | ||
3443 | Path: sys/fs/btrfs/0abb23a9-579b-43e6-ad30-227ef47fcb9d/allocation/system/total_bytes | ||
3444 | Lines: 1 | ||
3445 | 8388608 | ||
3446 | Mode: 444 | ||
3447 | # ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | ||
3448 | Path: sys/fs/btrfs/0abb23a9-579b-43e6-ad30-227ef47fcb9d/allocation/system/total_bytes_pinned | ||
3449 | Lines: 1 | ||
3450 | 0 | ||
3451 | Mode: 444 | ||
3452 | # ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | ||
3453 | Path: sys/fs/btrfs/0abb23a9-579b-43e6-ad30-227ef47fcb9d/clone_alignment | ||
3454 | Lines: 1 | ||
3455 | 4096 | ||
3456 | Mode: 444 | ||
3457 | # ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | ||
3458 | Directory: sys/fs/btrfs/0abb23a9-579b-43e6-ad30-227ef47fcb9d/devices | ||
3459 | Mode: 755 | ||
3460 | # ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | ||
3461 | Directory: sys/fs/btrfs/0abb23a9-579b-43e6-ad30-227ef47fcb9d/devices/loop25 | ||
3462 | Mode: 755 | ||
3463 | # ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | ||
3464 | Path: sys/fs/btrfs/0abb23a9-579b-43e6-ad30-227ef47fcb9d/devices/loop25/size | ||
3465 | Lines: 1 | ||
3466 | 20971520 | ||
3467 | Mode: 444 | ||
3468 | # ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | ||
3469 | Directory: sys/fs/btrfs/0abb23a9-579b-43e6-ad30-227ef47fcb9d/devices/loop26 | ||
3470 | Mode: 755 | ||
3471 | # ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | ||
3472 | Path: sys/fs/btrfs/0abb23a9-579b-43e6-ad30-227ef47fcb9d/devices/loop26/size | ||
3473 | Lines: 1 | ||
3474 | 20971520 | ||
3475 | Mode: 444 | ||
3476 | # ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | ||
3477 | Directory: sys/fs/btrfs/0abb23a9-579b-43e6-ad30-227ef47fcb9d/features | ||
3478 | Mode: 755 | ||
3479 | # ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | ||
3480 | Path: sys/fs/btrfs/0abb23a9-579b-43e6-ad30-227ef47fcb9d/features/big_metadata | ||
3481 | Lines: 1 | ||
3482 | 1 | ||
3483 | Mode: 444 | ||
3484 | # ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | ||
3485 | Path: sys/fs/btrfs/0abb23a9-579b-43e6-ad30-227ef47fcb9d/features/extended_iref | ||
3486 | Lines: 1 | ||
3487 | 1 | ||
3488 | Mode: 644 | ||
3489 | # ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | ||
3490 | Path: sys/fs/btrfs/0abb23a9-579b-43e6-ad30-227ef47fcb9d/features/mixed_backref | ||
3491 | Lines: 1 | ||
3492 | 1 | ||
3493 | Mode: 444 | ||
3494 | # ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | ||
3495 | Path: sys/fs/btrfs/0abb23a9-579b-43e6-ad30-227ef47fcb9d/features/skinny_metadata | ||
3496 | Lines: 1 | ||
3497 | 1 | ||
3498 | Mode: 444 | ||
3499 | # ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | ||
3500 | Path: sys/fs/btrfs/0abb23a9-579b-43e6-ad30-227ef47fcb9d/label | ||
3501 | Lines: 1 | ||
3502 | fixture | ||
3503 | Mode: 644 | ||
3504 | # ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | ||
3505 | Path: sys/fs/btrfs/0abb23a9-579b-43e6-ad30-227ef47fcb9d/metadata_uuid | ||
3506 | Lines: 1 | ||
3507 | 0abb23a9-579b-43e6-ad30-227ef47fcb9d | ||
3508 | Mode: 444 | ||
3509 | # ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | ||
3510 | Path: sys/fs/btrfs/0abb23a9-579b-43e6-ad30-227ef47fcb9d/nodesize | ||
3511 | Lines: 1 | ||
3512 | 16384 | ||
3513 | Mode: 444 | ||
3514 | # ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | ||
3515 | Path: sys/fs/btrfs/0abb23a9-579b-43e6-ad30-227ef47fcb9d/quota_override | ||
3516 | Lines: 1 | ||
3517 | 0 | ||
3518 | Mode: 644 | ||
3519 | # ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | ||
3520 | Path: sys/fs/btrfs/0abb23a9-579b-43e6-ad30-227ef47fcb9d/sectorsize | ||
3521 | Lines: 1 | ||
3522 | 4096 | ||
3523 | Mode: 444 | ||
3524 | # ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | ||
3525 | Directory: sys/fs/btrfs/7f07c59f-6136-449c-ab87-e1cf2328731b | ||
3526 | Mode: 755 | ||
3527 | # ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | ||
3528 | Directory: sys/fs/btrfs/7f07c59f-6136-449c-ab87-e1cf2328731b/allocation | ||
3529 | Mode: 755 | ||
3530 | # ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | ||
3531 | Directory: sys/fs/btrfs/7f07c59f-6136-449c-ab87-e1cf2328731b/allocation/data | ||
3532 | Mode: 755 | ||
3533 | # ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | ||
3534 | Path: sys/fs/btrfs/7f07c59f-6136-449c-ab87-e1cf2328731b/allocation/data/bytes_may_use | ||
3535 | Lines: 1 | ||
3536 | 0 | ||
3537 | Mode: 444 | ||
3538 | # ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | ||
3539 | Path: sys/fs/btrfs/7f07c59f-6136-449c-ab87-e1cf2328731b/allocation/data/bytes_pinned | ||
3540 | Lines: 1 | ||
3541 | 0 | ||
3542 | Mode: 444 | ||
3543 | # ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | ||
3544 | Path: sys/fs/btrfs/7f07c59f-6136-449c-ab87-e1cf2328731b/allocation/data/bytes_readonly | ||
3545 | Lines: 1 | ||
3546 | 0 | ||
3547 | Mode: 444 | ||
3548 | # ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | ||
3549 | Path: sys/fs/btrfs/7f07c59f-6136-449c-ab87-e1cf2328731b/allocation/data/bytes_reserved | ||
3550 | Lines: 1 | ||
3551 | 0 | ||
3552 | Mode: 444 | ||
3553 | # ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | ||
3554 | Path: sys/fs/btrfs/7f07c59f-6136-449c-ab87-e1cf2328731b/allocation/data/bytes_used | ||
3555 | Lines: 1 | ||
3556 | 0 | ||
3557 | Mode: 444 | ||
3558 | # ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | ||
3559 | Path: sys/fs/btrfs/7f07c59f-6136-449c-ab87-e1cf2328731b/allocation/data/disk_total | ||
3560 | Lines: 1 | ||
3561 | 644087808 | ||
3562 | Mode: 444 | ||
3563 | # ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | ||
3564 | Path: sys/fs/btrfs/7f07c59f-6136-449c-ab87-e1cf2328731b/allocation/data/disk_used | ||
3565 | Lines: 1 | ||
3566 | 0 | ||
3567 | Mode: 444 | ||
3568 | # ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | ||
3569 | Path: sys/fs/btrfs/7f07c59f-6136-449c-ab87-e1cf2328731b/allocation/data/flags | ||
3570 | Lines: 1 | ||
3571 | 1 | ||
3572 | Mode: 444 | ||
3573 | # ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | ||
3574 | Directory: sys/fs/btrfs/7f07c59f-6136-449c-ab87-e1cf2328731b/allocation/data/raid5 | ||
3575 | Mode: 755 | ||
3576 | # ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | ||
3577 | Path: sys/fs/btrfs/7f07c59f-6136-449c-ab87-e1cf2328731b/allocation/data/raid5/total_bytes | ||
3578 | Lines: 1 | ||
3579 | 644087808 | ||
3580 | Mode: 444 | ||
3581 | # ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | ||
3582 | Path: sys/fs/btrfs/7f07c59f-6136-449c-ab87-e1cf2328731b/allocation/data/raid5/used_bytes | ||
3583 | Lines: 1 | ||
3584 | 0 | ||
3585 | Mode: 444 | ||
3586 | # ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | ||
3587 | Path: sys/fs/btrfs/7f07c59f-6136-449c-ab87-e1cf2328731b/allocation/data/total_bytes | ||
3588 | Lines: 1 | ||
3589 | 644087808 | ||
3590 | Mode: 444 | ||
3591 | # ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | ||
3592 | Path: sys/fs/btrfs/7f07c59f-6136-449c-ab87-e1cf2328731b/allocation/data/total_bytes_pinned | ||
3593 | Lines: 1 | ||
3594 | 0 | ||
3595 | Mode: 444 | ||
3596 | # ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | ||
3597 | Path: sys/fs/btrfs/7f07c59f-6136-449c-ab87-e1cf2328731b/allocation/global_rsv_reserved | ||
3598 | Lines: 1 | ||
3599 | 16777216 | ||
3600 | Mode: 444 | ||
3601 | # ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | ||
3602 | Path: sys/fs/btrfs/7f07c59f-6136-449c-ab87-e1cf2328731b/allocation/global_rsv_size | ||
3603 | Lines: 1 | ||
3604 | 16777216 | ||
3605 | Mode: 444 | ||
3606 | # ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | ||
3607 | Directory: sys/fs/btrfs/7f07c59f-6136-449c-ab87-e1cf2328731b/allocation/metadata | ||
3608 | Mode: 755 | ||
3609 | # ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | ||
3610 | Path: sys/fs/btrfs/7f07c59f-6136-449c-ab87-e1cf2328731b/allocation/metadata/bytes_may_use | ||
3611 | Lines: 1 | ||
3612 | 16777216 | ||
3613 | Mode: 444 | ||
3614 | # ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | ||
3615 | Path: sys/fs/btrfs/7f07c59f-6136-449c-ab87-e1cf2328731b/allocation/metadata/bytes_pinned | ||
3616 | Lines: 1 | ||
3617 | 0 | ||
3618 | Mode: 444 | ||
3619 | # ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | ||
3620 | Path: sys/fs/btrfs/7f07c59f-6136-449c-ab87-e1cf2328731b/allocation/metadata/bytes_readonly | ||
3621 | Lines: 1 | ||
3622 | 262144 | ||
3623 | Mode: 444 | ||
3624 | # ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | ||
3625 | Path: sys/fs/btrfs/7f07c59f-6136-449c-ab87-e1cf2328731b/allocation/metadata/bytes_reserved | ||
3626 | Lines: 1 | ||
3627 | 0 | ||
3628 | Mode: 444 | ||
3629 | # ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | ||
3630 | Path: sys/fs/btrfs/7f07c59f-6136-449c-ab87-e1cf2328731b/allocation/metadata/bytes_used | ||
3631 | Lines: 1 | ||
3632 | 114688 | ||
3633 | Mode: 444 | ||
3634 | # ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | ||
3635 | Path: sys/fs/btrfs/7f07c59f-6136-449c-ab87-e1cf2328731b/allocation/metadata/disk_total | ||
3636 | Lines: 1 | ||
3637 | 429391872 | ||
3638 | Mode: 444 | ||
3639 | # ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | ||
3640 | Path: sys/fs/btrfs/7f07c59f-6136-449c-ab87-e1cf2328731b/allocation/metadata/disk_used | ||
3641 | Lines: 1 | ||
3642 | 114688 | ||
3643 | Mode: 444 | ||
3644 | # ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | ||
3645 | Path: sys/fs/btrfs/7f07c59f-6136-449c-ab87-e1cf2328731b/allocation/metadata/flags | ||
3646 | Lines: 1 | ||
3647 | 4 | ||
3648 | Mode: 444 | ||
3649 | # ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | ||
3650 | Directory: sys/fs/btrfs/7f07c59f-6136-449c-ab87-e1cf2328731b/allocation/metadata/raid6 | ||
3651 | Mode: 755 | ||
3652 | # ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | ||
3653 | Path: sys/fs/btrfs/7f07c59f-6136-449c-ab87-e1cf2328731b/allocation/metadata/raid6/total_bytes | ||
3654 | Lines: 1 | ||
3655 | 429391872 | ||
3656 | Mode: 444 | ||
3657 | # ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | ||
3658 | Path: sys/fs/btrfs/7f07c59f-6136-449c-ab87-e1cf2328731b/allocation/metadata/raid6/used_bytes | ||
3659 | Lines: 1 | ||
3660 | 114688 | ||
3661 | Mode: 444 | ||
3662 | # ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | ||
3663 | Path: sys/fs/btrfs/7f07c59f-6136-449c-ab87-e1cf2328731b/allocation/metadata/total_bytes | ||
3664 | Lines: 1 | ||
3665 | 429391872 | ||
3666 | Mode: 444 | ||
3667 | # ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | ||
3668 | Path: sys/fs/btrfs/7f07c59f-6136-449c-ab87-e1cf2328731b/allocation/metadata/total_bytes_pinned | ||
3669 | Lines: 1 | ||
3670 | 0 | ||
3671 | Mode: 444 | ||
3672 | # ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | ||
3673 | Directory: sys/fs/btrfs/7f07c59f-6136-449c-ab87-e1cf2328731b/allocation/system | ||
3674 | Mode: 755 | ||
3675 | # ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | ||
3676 | Path: sys/fs/btrfs/7f07c59f-6136-449c-ab87-e1cf2328731b/allocation/system/bytes_may_use | ||
3677 | Lines: 1 | ||
3678 | 0 | ||
3679 | Mode: 444 | ||
3680 | # ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | ||
3681 | Path: sys/fs/btrfs/7f07c59f-6136-449c-ab87-e1cf2328731b/allocation/system/bytes_pinned | ||
3682 | Lines: 1 | ||
3683 | 0 | ||
3684 | Mode: 444 | ||
3685 | # ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | ||
3686 | Path: sys/fs/btrfs/7f07c59f-6136-449c-ab87-e1cf2328731b/allocation/system/bytes_readonly | ||
3687 | Lines: 1 | ||
3688 | 0 | ||
3689 | Mode: 444 | ||
3690 | # ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | ||
3691 | Path: sys/fs/btrfs/7f07c59f-6136-449c-ab87-e1cf2328731b/allocation/system/bytes_reserved | ||
3692 | Lines: 1 | ||
3693 | 0 | ||
3694 | Mode: 444 | ||
3695 | # ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | ||
3696 | Path: sys/fs/btrfs/7f07c59f-6136-449c-ab87-e1cf2328731b/allocation/system/bytes_used | ||
3697 | Lines: 1 | ||
3698 | 16384 | ||
3699 | Mode: 444 | ||
3700 | # ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | ||
3701 | Path: sys/fs/btrfs/7f07c59f-6136-449c-ab87-e1cf2328731b/allocation/system/disk_total | ||
3702 | Lines: 1 | ||
3703 | 16777216 | ||
3704 | Mode: 444 | ||
3705 | # ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | ||
3706 | Path: sys/fs/btrfs/7f07c59f-6136-449c-ab87-e1cf2328731b/allocation/system/disk_used | ||
3707 | Lines: 1 | ||
3708 | 16384 | ||
3709 | Mode: 444 | ||
3710 | # ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | ||
3711 | Path: sys/fs/btrfs/7f07c59f-6136-449c-ab87-e1cf2328731b/allocation/system/flags | ||
3712 | Lines: 1 | ||
3713 | 2 | ||
3714 | Mode: 444 | ||
3715 | # ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | ||
3716 | Directory: sys/fs/btrfs/7f07c59f-6136-449c-ab87-e1cf2328731b/allocation/system/raid6 | ||
3717 | Mode: 755 | ||
3718 | # ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | ||
3719 | Path: sys/fs/btrfs/7f07c59f-6136-449c-ab87-e1cf2328731b/allocation/system/raid6/total_bytes | ||
3720 | Lines: 1 | ||
3721 | 16777216 | ||
3722 | Mode: 444 | ||
3723 | # ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | ||
3724 | Path: sys/fs/btrfs/7f07c59f-6136-449c-ab87-e1cf2328731b/allocation/system/raid6/used_bytes | ||
3725 | Lines: 1 | ||
3726 | 16384 | ||
3727 | Mode: 444 | ||
3728 | # ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | ||
3729 | Path: sys/fs/btrfs/7f07c59f-6136-449c-ab87-e1cf2328731b/allocation/system/total_bytes | ||
3730 | Lines: 1 | ||
3731 | 16777216 | ||
3732 | Mode: 444 | ||
3733 | # ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | ||
3734 | Path: sys/fs/btrfs/7f07c59f-6136-449c-ab87-e1cf2328731b/allocation/system/total_bytes_pinned | ||
3735 | Lines: 1 | ||
3736 | 0 | ||
3737 | Mode: 444 | ||
3738 | # ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | ||
3739 | Path: sys/fs/btrfs/7f07c59f-6136-449c-ab87-e1cf2328731b/clone_alignment | ||
3740 | Lines: 1 | ||
3741 | 4096 | ||
3742 | Mode: 444 | ||
3743 | # ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | ||
3744 | Directory: sys/fs/btrfs/7f07c59f-6136-449c-ab87-e1cf2328731b/devices | ||
3745 | Mode: 755 | ||
3746 | # ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | ||
3747 | Directory: sys/fs/btrfs/7f07c59f-6136-449c-ab87-e1cf2328731b/devices/loop22 | ||
3748 | Mode: 755 | ||
3749 | # ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | ||
3750 | Path: sys/fs/btrfs/7f07c59f-6136-449c-ab87-e1cf2328731b/devices/loop22/size | ||
3751 | Lines: 1 | ||
3752 | 20971520 | ||
3753 | Mode: 644 | ||
3754 | # ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | ||
3755 | Directory: sys/fs/btrfs/7f07c59f-6136-449c-ab87-e1cf2328731b/devices/loop23 | ||
3756 | Mode: 755 | ||
3757 | # ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | ||
3758 | Path: sys/fs/btrfs/7f07c59f-6136-449c-ab87-e1cf2328731b/devices/loop23/size | ||
3759 | Lines: 1 | ||
3760 | 20971520 | ||
3761 | Mode: 644 | ||
3762 | # ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | ||
3763 | Directory: sys/fs/btrfs/7f07c59f-6136-449c-ab87-e1cf2328731b/devices/loop24 | ||
3764 | Mode: 755 | ||
3765 | # ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | ||
3766 | Path: sys/fs/btrfs/7f07c59f-6136-449c-ab87-e1cf2328731b/devices/loop24/size | ||
3767 | Lines: 1 | ||
3768 | 20971520 | ||
3769 | Mode: 644 | ||
3770 | # ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | ||
3771 | Directory: sys/fs/btrfs/7f07c59f-6136-449c-ab87-e1cf2328731b/devices/loop25 | ||
3772 | Mode: 755 | ||
3773 | # ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | ||
3774 | Path: sys/fs/btrfs/7f07c59f-6136-449c-ab87-e1cf2328731b/devices/loop25/size | ||
3775 | Lines: 1 | ||
3776 | 20971520 | ||
3777 | Mode: 644 | ||
3778 | # ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | ||
3779 | Directory: sys/fs/btrfs/7f07c59f-6136-449c-ab87-e1cf2328731b/features | ||
3780 | Mode: 755 | ||
3781 | # ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | ||
3782 | Path: sys/fs/btrfs/7f07c59f-6136-449c-ab87-e1cf2328731b/features/big_metadata | ||
3783 | Lines: 1 | ||
3784 | 1 | ||
3785 | Mode: 444 | ||
3786 | # ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | ||
3787 | Path: sys/fs/btrfs/7f07c59f-6136-449c-ab87-e1cf2328731b/features/extended_iref | ||
3788 | Lines: 1 | ||
3789 | 1 | ||
3790 | Mode: 644 | ||
3791 | # ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | ||
3792 | Path: sys/fs/btrfs/7f07c59f-6136-449c-ab87-e1cf2328731b/features/mixed_backref | ||
3793 | Lines: 1 | ||
3794 | 1 | ||
3795 | Mode: 444 | ||
3796 | # ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | ||
3797 | Path: sys/fs/btrfs/7f07c59f-6136-449c-ab87-e1cf2328731b/features/raid56 | ||
3798 | Lines: 1 | ||
3799 | 1 | ||
3800 | Mode: 444 | ||
3801 | # ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | ||
3802 | Path: sys/fs/btrfs/7f07c59f-6136-449c-ab87-e1cf2328731b/features/skinny_metadata | ||
3803 | Lines: 1 | ||
3804 | 1 | ||
3805 | Mode: 444 | ||
3806 | # ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | ||
3807 | Path: sys/fs/btrfs/7f07c59f-6136-449c-ab87-e1cf2328731b/label | ||
3808 | Lines: 0 | ||
3809 | Mode: 644 | ||
3810 | # ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | ||
3811 | Path: sys/fs/btrfs/7f07c59f-6136-449c-ab87-e1cf2328731b/metadata_uuid | ||
3812 | Lines: 1 | ||
3813 | 7f07c59f-6136-449c-ab87-e1cf2328731b | ||
3814 | Mode: 444 | ||
3815 | # ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | ||
3816 | Path: sys/fs/btrfs/7f07c59f-6136-449c-ab87-e1cf2328731b/nodesize | ||
3817 | Lines: 1 | ||
3818 | 16384 | ||
3819 | Mode: 444 | ||
3820 | # ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | ||
3821 | Path: sys/fs/btrfs/7f07c59f-6136-449c-ab87-e1cf2328731b/quota_override | ||
3822 | Lines: 1 | ||
3823 | 0 | ||
3824 | Mode: 644 | ||
3825 | # ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | ||
3826 | Path: sys/fs/btrfs/7f07c59f-6136-449c-ab87-e1cf2328731b/sectorsize | ||
3827 | Lines: 1 | ||
3828 | 4096 | ||
3829 | Mode: 444 | ||
3830 | # ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | ||
3236 | Directory: sys/fs/xfs | 3831 | Directory: sys/fs/xfs |
3237 | Mode: 755 | 3832 | Mode: 755 |
3238 | # ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | 3833 | # ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
diff --git a/end-to-end-test.sh b/end-to-end-test.sh index 6d0bce3..fb1520d 100755 --- a/end-to-end-test.sh +++ b/end-to-end-test.sh | |||
@@ -5,6 +5,7 @@ set -euf -o pipefail | |||
5 | enabled_collectors=$(cat << COLLECTORS | 5 | enabled_collectors=$(cat << COLLECTORS |
6 | arp | 6 | arp |
7 | bcache | 7 | bcache |
8 | btrfs | ||
8 | buddyinfo | 9 | buddyinfo |
9 | conntrack | 10 | conntrack |
10 | cpu | 11 | cpu |
diff --git a/vendor/github.com/prometheus/procfs/btrfs/btrfs.go b/vendor/github.com/prometheus/procfs/btrfs/btrfs.go new file mode 100644 index 0000000..094c898 --- /dev/null +++ b/vendor/github.com/prometheus/procfs/btrfs/btrfs.go | |||
@@ -0,0 +1,67 @@ | |||
1 | // Copyright 2019 The Prometheus Authors | ||
2 | // Licensed under the Apache License, Version 2.0 (the "License"); | ||
3 | // you may not use this file except in compliance with the License. | ||
4 | // You may obtain a copy of the License at | ||
5 | // | ||
6 | // http://www.apache.org/licenses/LICENSE-2.0 | ||
7 | // | ||
8 | // Unless required by applicable law or agreed to in writing, software | ||
9 | // distributed under the License is distributed on an "AS IS" BASIS, | ||
10 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
11 | // See the License for the specific language governing permissions and | ||
12 | // limitations under the License. | ||
13 | |||
14 | // Package btrfs provides access to statistics exposed by Btrfs filesystems. | ||
15 | package btrfs | ||
16 | |||
17 | // Stats contains statistics for a single Btrfs filesystem. | ||
18 | // See Linux fs/btrfs/sysfs.c for more information. | ||
19 | type Stats struct { | ||
20 | UUID, Label string | ||
21 | Allocation Allocation | ||
22 | Devices map[string]*Device | ||
23 | Features []string | ||
24 | CloneAlignment uint64 | ||
25 | NodeSize uint64 | ||
26 | QuotaOverride uint64 | ||
27 | SectorSize uint64 | ||
28 | } | ||
29 | |||
30 | // Allocation contains allocation statistics for data, metadata and system data. | ||
31 | type Allocation struct { | ||
32 | GlobalRsvReserved, GlobalRsvSize uint64 | ||
33 | Data, Metadata, System *AllocationStats | ||
34 | } | ||
35 | |||
36 | // AllocationStats contains allocation statistics for a data type. | ||
37 | type AllocationStats struct { | ||
38 | // Usage statistics | ||
39 | DiskUsedBytes uint64 | ||
40 | DiskTotalBytes uint64 | ||
41 | MayUseBytes uint64 | ||
42 | PinnedBytes uint64 | ||
43 | TotalPinnedBytes uint64 | ||
44 | ReadOnlyBytes uint64 | ||
45 | ReservedBytes uint64 | ||
46 | UsedBytes uint64 | ||
47 | TotalBytes uint64 | ||
48 | |||
49 | // Flags marking filesystem state | ||
50 | // See Linux fs/btrfs/ctree.h for more information. | ||
51 | Flags uint64 | ||
52 | |||
53 | // Additional disk usage statistics depending on the disk layout. | ||
54 | // At least one of these will exist and not be nil. | ||
55 | Layouts map[string]*LayoutUsage | ||
56 | } | ||
57 | |||
58 | // LayoutUsage contains additional usage statistics for a disk layout. | ||
59 | type LayoutUsage struct { | ||
60 | UsedBytes, TotalBytes uint64 | ||
61 | Ratio float64 | ||
62 | } | ||
63 | |||
64 | // Device contains information about a device that is part of a Btrfs filesystem. | ||
65 | type Device struct { | ||
66 | Size uint64 | ||
67 | } | ||
diff --git a/vendor/github.com/prometheus/procfs/btrfs/get.go b/vendor/github.com/prometheus/procfs/btrfs/get.go new file mode 100644 index 0000000..fa70daa --- /dev/null +++ b/vendor/github.com/prometheus/procfs/btrfs/get.go | |||
@@ -0,0 +1,251 @@ | |||
1 | // Copyright 2019 The Prometheus Authors | ||
2 | // Licensed under the Apache License, Version 2.0 (the "License"); | ||
3 | // you may not use this file except in compliance with the License. | ||
4 | // You may obtain a copy of the License at | ||
5 | // | ||
6 | // http://www.apache.org/licenses/LICENSE-2.0 | ||
7 | // | ||
8 | // Unless required by applicable law or agreed to in writing, software | ||
9 | // distributed under the License is distributed on an "AS IS" BASIS, | ||
10 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
11 | // See the License for the specific language governing permissions and | ||
12 | // limitations under the License. | ||
13 | |||
14 | package btrfs | ||
15 | |||
16 | import ( | ||
17 | "io/ioutil" | ||
18 | "os" | ||
19 | "path" | ||
20 | "path/filepath" | ||
21 | "strconv" | ||
22 | "strings" | ||
23 | |||
24 | "github.com/prometheus/procfs/internal/fs" | ||
25 | "github.com/prometheus/procfs/internal/util" | ||
26 | ) | ||
27 | |||
28 | // SectorSize contains the Linux sector size. | ||
29 | // > Linux always considers sectors to be 512 bytes long independently | ||
30 | // > of the devices real block size. | ||
31 | const SectorSize = 512 | ||
32 | |||
33 | // FS represents the pseudo-filesystem sys, which provides an interface to | ||
34 | // kernel data structures. | ||
35 | type FS struct { | ||
36 | sys *fs.FS | ||
37 | } | ||
38 | |||
39 | // NewDefaultFS returns a new Bcache using the default sys fs mount point. It will error | ||
40 | // if the mount point can't be read. | ||
41 | func NewDefaultFS() (FS, error) { | ||
42 | return NewFS(fs.DefaultSysMountPoint) | ||
43 | } | ||
44 | |||
45 | // NewFS returns a new Btrfs filesystem using the given sys fs mount point. It will error | ||
46 | // if the mount point can't be read. | ||
47 | func NewFS(mountPoint string) (FS, error) { | ||
48 | if strings.TrimSpace(mountPoint) == "" { | ||
49 | mountPoint = fs.DefaultSysMountPoint | ||
50 | } | ||
51 | sys, err := fs.NewFS(mountPoint) | ||
52 | if err != nil { | ||
53 | return FS{}, err | ||
54 | } | ||
55 | return FS{&sys}, nil | ||
56 | } | ||
57 | |||
58 | // Stats retrieves Btrfs filesystem runtime statistics for each mounted Btrfs filesystem. | ||
59 | func (fs FS) Stats() ([]*Stats, error) { | ||
60 | matches, err := filepath.Glob(fs.sys.Path("fs/btrfs/*-*")) | ||
61 | if err != nil { | ||
62 | return nil, err | ||
63 | } | ||
64 | |||
65 | stats := make([]*Stats, 0, len(matches)) | ||
66 | for _, uuidPath := range matches { | ||
67 | s, err := GetStats(uuidPath) | ||
68 | if err != nil { | ||
69 | return nil, err | ||
70 | } | ||
71 | |||
72 | // Set the UUID from the path when it could not be retrieved from the filesystem. | ||
73 | if s.UUID == "" { | ||
74 | s.UUID = filepath.Base(uuidPath) | ||
75 | } | ||
76 | |||
77 | stats = append(stats, s) | ||
78 | } | ||
79 | |||
80 | return stats, nil | ||
81 | } | ||
82 | |||
83 | // GetStats collects all Btrfs statistics from sysfs | ||
84 | func GetStats(uuidPath string) (*Stats, error) { | ||
85 | r := &reader{path: uuidPath} | ||
86 | s := r.readFilesystemStats() | ||
87 | if r.err != nil { | ||
88 | return nil, r.err | ||
89 | } | ||
90 | |||
91 | return s, nil | ||
92 | } | ||
93 | |||
94 | type reader struct { | ||
95 | path string | ||
96 | err error | ||
97 | devCount int | ||
98 | } | ||
99 | |||
100 | // readFile reads a file relative to the path of the reader. | ||
101 | // Non-existing files are ignored. | ||
102 | func (r *reader) readFile(n string) string { | ||
103 | b, err := util.SysReadFile(path.Join(r.path, n)) | ||
104 | if err != nil && !os.IsNotExist(err) { | ||
105 | r.err = err | ||
106 | } | ||
107 | return strings.TrimSpace(string(b)) | ||
108 | } | ||
109 | |||
110 | // readValues reads a number of numerical values into an uint64 slice. | ||
111 | func (r *reader) readValue(n string) (v uint64) { | ||
112 | // Read value from file | ||
113 | s := r.readFile(n) | ||
114 | if r.err != nil { | ||
115 | return | ||
116 | } | ||
117 | |||
118 | // Convert number | ||
119 | v, _ = strconv.ParseUint(s, 10, 64) | ||
120 | return | ||
121 | } | ||
122 | |||
123 | // listFiles returns a list of files for a directory of the reader. | ||
124 | func (r *reader) listFiles(p string) []string { | ||
125 | files, err := ioutil.ReadDir(path.Join(r.path, p)) | ||
126 | if err != nil { | ||
127 | r.err = err | ||
128 | return nil | ||
129 | } | ||
130 | |||
131 | names := make([]string, len(files)) | ||
132 | for i, f := range files { | ||
133 | names[i] = f.Name() | ||
134 | } | ||
135 | return names | ||
136 | } | ||
137 | |||
138 | // readAllocationStats reads Btrfs allocation data for the current path. | ||
139 | func (r *reader) readAllocationStats(d string) (a *AllocationStats) { | ||
140 | // Create a reader for this subdirectory | ||
141 | sr := &reader{path: path.Join(r.path, d), devCount: r.devCount} | ||
142 | |||
143 | // Get the stats | ||
144 | a = &AllocationStats{ | ||
145 | // Read basic allocation stats | ||
146 | MayUseBytes: sr.readValue("bytes_may_use"), | ||
147 | PinnedBytes: sr.readValue("bytes_pinned"), | ||
148 | ReadOnlyBytes: sr.readValue("bytes_readonly"), | ||
149 | ReservedBytes: sr.readValue("bytes_reserved"), | ||
150 | UsedBytes: sr.readValue("bytes_used"), | ||
151 | DiskUsedBytes: sr.readValue("disk_used"), | ||
152 | DiskTotalBytes: sr.readValue("disk_total"), | ||
153 | Flags: sr.readValue("flags"), | ||
154 | TotalBytes: sr.readValue("total_bytes"), | ||
155 | TotalPinnedBytes: sr.readValue("total_bytes_pinned"), | ||
156 | Layouts: sr.readLayouts(), | ||
157 | } | ||
158 | |||
159 | // Pass any error back | ||
160 | r.err = sr.err | ||
161 | |||
162 | return | ||
163 | } | ||
164 | |||
165 | // readLayouts reads all Btrfs layout statistics for the current path | ||
166 | func (r *reader) readLayouts() map[string]*LayoutUsage { | ||
167 | files, err := ioutil.ReadDir(r.path) | ||
168 | if err != nil { | ||
169 | r.err = err | ||
170 | return nil | ||
171 | } | ||
172 | |||
173 | m := make(map[string]*LayoutUsage) | ||
174 | for _, f := range files { | ||
175 | if f.IsDir() { | ||
176 | m[f.Name()] = r.readLayout(f.Name()) | ||
177 | } | ||
178 | } | ||
179 | |||
180 | return m | ||
181 | } | ||
182 | |||
183 | // readLayout reads the Btrfs layout statistics for an allocation layout. | ||
184 | func (r *reader) readLayout(p string) (l *LayoutUsage) { | ||
185 | l = new(LayoutUsage) | ||
186 | l.TotalBytes = r.readValue(path.Join(p, "total_bytes")) | ||
187 | l.UsedBytes = r.readValue(path.Join(p, "used_bytes")) | ||
188 | l.Ratio = r.calcRatio(p) | ||
189 | |||
190 | return | ||
191 | } | ||
192 | |||
193 | // calcRatio returns the calculated ratio for a layout mode. | ||
194 | func (r *reader) calcRatio(p string) float64 { | ||
195 | switch p { | ||
196 | case "single", "raid0": | ||
197 | return 1 | ||
198 | case "dup", "raid1", "raid10": | ||
199 | return 2 | ||
200 | case "raid5": | ||
201 | return float64(r.devCount) / (float64(r.devCount) - 1) | ||
202 | case "raid6": | ||
203 | return float64(r.devCount) / (float64(r.devCount) - 2) | ||
204 | default: | ||
205 | return 0 | ||
206 | } | ||
207 | } | ||
208 | |||
209 | // readDeviceInfo returns the information for all devices associated with this filesystem. | ||
210 | func (r *reader) readDeviceInfo(d string) map[string]*Device { | ||
211 | devs := r.listFiles("devices") | ||
212 | info := make(map[string]*Device, len(devs)) | ||
213 | for _, n := range devs { | ||
214 | info[n] = &Device{ | ||
215 | Size: SectorSize * r.readValue("devices/"+n+"/size"), | ||
216 | } | ||
217 | } | ||
218 | |||
219 | return info | ||
220 | } | ||
221 | |||
222 | // readFilesystemStats reads Btrfs statistics for a filesystem. | ||
223 | func (r *reader) readFilesystemStats() (s *Stats) { | ||
224 | // First get disk info, and add it to reader | ||
225 | devices := r.readDeviceInfo("devices") | ||
226 | r.devCount = len(devices) | ||
227 | |||
228 | s = &Stats{ | ||
229 | // Read basic filesystem information | ||
230 | Label: r.readFile("label"), | ||
231 | UUID: r.readFile("metadata_uuid"), | ||
232 | Features: r.listFiles("features"), | ||
233 | CloneAlignment: r.readValue("clone_alignment"), | ||
234 | NodeSize: r.readValue("nodesize"), | ||
235 | QuotaOverride: r.readValue("quota_override"), | ||
236 | SectorSize: r.readValue("sectorsize"), | ||
237 | |||
238 | // Device info | ||
239 | Devices: devices, | ||
240 | |||
241 | // Read allocation data | ||
242 | Allocation: Allocation{ | ||
243 | GlobalRsvReserved: r.readValue("allocation/global_rsv_reserved"), | ||
244 | GlobalRsvSize: r.readValue("allocation/global_rsv_size"), | ||
245 | Data: r.readAllocationStats("allocation/data"), | ||
246 | Metadata: r.readAllocationStats("allocation/metadata"), | ||
247 | System: r.readAllocationStats("allocation/system"), | ||
248 | }, | ||
249 | } | ||
250 | return | ||
251 | } | ||
diff --git a/vendor/modules.txt b/vendor/modules.txt index ae4fb57..9b77b1a 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt | |||
@@ -62,6 +62,7 @@ github.com/prometheus/common/version | |||
62 | # github.com/prometheus/procfs v0.0.10 | 62 | # github.com/prometheus/procfs v0.0.10 |
63 | github.com/prometheus/procfs | 63 | github.com/prometheus/procfs |
64 | github.com/prometheus/procfs/bcache | 64 | github.com/prometheus/procfs/bcache |
65 | github.com/prometheus/procfs/btrfs | ||
65 | github.com/prometheus/procfs/internal/fs | 66 | github.com/prometheus/procfs/internal/fs |
66 | github.com/prometheus/procfs/internal/util | 67 | github.com/prometheus/procfs/internal/util |
67 | github.com/prometheus/procfs/nfs | 68 | github.com/prometheus/procfs/nfs |