hc
2024-12-19 9370bb92b2d16684ee45cf24e879c93c509162da
kernel/tools/vm/slabinfo-gnuplot.sh
....@@ -1,16 +1,9 @@
11 #!/bin/bash
2
+# SPDX-License-Identifier: GPL-2.0-only
23
34 # Sergey Senozhatsky, 2015
45 # sergey.senozhatsky.work@gmail.com
56 #
6
-# This software is licensed under the terms of the GNU General Public
7
-# License version 2, as published by the Free Software Foundation, and
8
-# may be copied, distributed, and modified under those terms.
9
-#
10
-# This program is distributed in the hope that it will be useful,
11
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
12
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
-# GNU General Public License for more details.
147
158
169 # This program is intended to plot a `slabinfo -X' stats, collected,
....@@ -157,7 +150,7 @@
157150 let lines=3
158151 out=`basename "$in"`"-slabs-by-loss"
159152 `cat "$in" | grep -A "$lines" 'Slabs sorted by loss' |\
160
- egrep -iv '\-\-|Name|Slabs'\
153
+ grep -E -iv '\-\-|Name|Slabs'\
161154 | awk '{print $1" "$4+$2*$3" "$4}' > "$out"`
162155 if [ $? -eq 0 ]; then
163156 do_slabs_plotting "$out"
....@@ -166,7 +159,7 @@
166159 let lines=3
167160 out=`basename "$in"`"-slabs-by-size"
168161 `cat "$in" | grep -A "$lines" 'Slabs sorted by size' |\
169
- egrep -iv '\-\-|Name|Slabs'\
162
+ grep -E -iv '\-\-|Name|Slabs'\
170163 | awk '{print $1" "$4" "$4-$2*$3}' > "$out"`
171164 if [ $? -eq 0 ]; then
172165 do_slabs_plotting "$out"