You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# mac address "s/\([0-9a-fA-F]\{2,2\}\:\)\{5,5\}[0-9a-fA-F]\{2,2\}/m.m.m.m/g"
8
8
9
+
alias filter="sed -e 's/\([0-9a-fA-F]\{1,4\}:\)\{7,7\}[0-9a-fA-F]\{1,4\}/y.y.y.y.y.y.y.y/g' | sed -e 's/[0-9a-fA-F]\{1,4\}:\(:[0-9a-fA-F]\{1,4\}\)\{1,4\}/y::y.y.y.y/g' | sed -e 's/\([0-9]\{1,3\}\.\)\{3,3\}[0-9]\{1,3\}/x.x.x.x/g' | sed -e 's/\([0-9a-fA-F]\{2,2\}\:\)\{5,5\}[0-9a-fA-F]\{2,2\}/m.m.m.m/g'"
9
10
10
11
display_info_drm() {
11
12
# kmsprint is more useful, but not always installed
@@ -168,20 +169,6 @@ audio_info() {
168
169
}
169
170
170
171
network_info() {
171
-
ifconfig | sed -e "s/\([0-9a-fA-F]\{1,4\}:\)\{7,7\}[0-9a-fA-F]\{1,4\}/y.y.y.y.y.y.y.y/g"| sed -e "s/[0-9a-fA-F]\{1,4\}:\(:[0-9a-fA-F]\{1,4\}\)\{1,4\}/y::y.y.y.y/g"| sed -e "s/\([0-9]\{1,3\}\.\)\{3,3\}[0-9]\{1,3\}/x.x.x.x/g"| sed -e "s/\([0-9a-fA-F]\{2,2\}\:\)\{5,5\}[0-9a-fA-F]\{2,2\}/m.m.m.m/g"
172
-
echo
173
-
ifcommand -v ethtool > /dev/null;then
174
-
ethtool eth0
175
-
echo
176
-
ethtool --show-eee eth0
177
-
echo
178
-
ethtool -S eth0
179
-
else
180
-
echo"ethtool not installed"
181
-
fi
182
-
}
183
-
184
-
wifi_info() {
185
172
cat /proc/net/wireless 2>/dev/null ||echo"/proc/net/wireless not available"
186
173
echo
187
174
ifcommand -v rfkill >/dev/null;then
@@ -190,8 +177,28 @@ wifi_info() {
190
177
echo"rfkill not installed"
191
178
fi
192
179
echo
180
+
193
181
ifcommand -v ethtool >/dev/null;then
194
-
ethtool -i wlan0
182
+
# Using sysfs to identify physical interfaces
183
+
forifacein /sys/class/net/*;do
184
+
iface_name=$(basename "$iface")
185
+
# Check if device directory exists (indicates physical interface)
186
+
if [ -d"$iface/device" ];then
187
+
ifconfig $iface_name| filter
188
+
if [ -d"$iface/phy80211" ];then
189
+
ethtool -i $iface_name
190
+
else
191
+
sudo ethtool $iface_name
192
+
echo
193
+
ethtool --show-eee $iface_name
194
+
echo
195
+
ethtool -S $iface_name
196
+
fi
197
+
echo
198
+
fi
199
+
done
200
+
else
201
+
echo"ethtool not installed"
195
202
fi
196
203
}
197
204
@@ -246,6 +253,7 @@ vcgencmd mem_reloc_stats
246
253
echo
247
254
echo"Filesystem information"
248
255
echo"----------------------"
256
+
echo
249
257
250
258
df
251
259
echo
@@ -254,6 +262,7 @@ cat /proc/swaps
254
262
echo
255
263
echo"Package version information"
256
264
echo"---------------------------"
265
+
echo
257
266
258
267
apt-cache policy raspberrypi-ui-mods | head -2
259
268
apt-cache policy raspberrypi-sys-mods | head -2
@@ -269,8 +278,6 @@ echo
269
278
270
279
network_info
271
280
echo
272
-
wifi_info
273
-
echo
274
281
275
282
echo"USB Information"
276
283
echo"---------------"
@@ -305,6 +312,7 @@ vcgencmd get_config str
305
312
echo
306
313
echo"cmdline.txt"
307
314
echo"-----------"
315
+
echo
308
316
309
317
cat /proc/cmdline
310
318
@@ -339,8 +347,7 @@ echo "dmesg log"
339
347
echo"---------"
340
348
echo
341
349
342
-
sudo dmesg | sed -e "s/\([0-9a-fA-F]\{1,4\}:\)\{7,7\}[0-9a-fA-F]\{1,4\}/y.y.y.y.y.y.y.y/g"| sed -e "s/[0-9a-fA-F]\{1,4\}:\(:[0-9a-fA-F]\{1,4\}\)\{1,4\}/y::y.y.y.y/g"| sed -e "s/\([0-9a-fA-F]\{2,2\}\:\)\{5,5\}[0-9a-fA-F]\{2,2\}/m.m.m.m/g"
343
-
350
+
sudo dmesg | filter
344
351
345
352
if grep -q "^Revision\s*:\s*[ 123][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F]1[13457][0-9a-fA-F]$" /proc/cpuinfo
0 commit comments