diff --git a/kernel/Cargo.lock b/kernel/Cargo.lock index 6761aa42..53679e5c 100644 --- a/kernel/Cargo.lock +++ b/kernel/Cargo.lock @@ -196,7 +196,7 @@ dependencies = [ [[package]] name = "isomorphic_drivers" version = "0.1.0" -source = "git+https://github.com/rcore-os/isomorphic_drivers#4a6546922bc5b1255631840f63d6b8b595b39de9" +source = "git+https://github.com/rcore-os/isomorphic_drivers#642e139b4c4a06a75d9530e9d60a33c514aea060" dependencies = [ "bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", "spin 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", diff --git a/tools/pkttop.sh b/tools/pkttop.sh new file mode 100755 index 00000000..92060982 --- /dev/null +++ b/tools/pkttop.sh @@ -0,0 +1,17 @@ +#!/bin/bash +# https://www.unixteacher.org/blog/linux/display-packets-per-second-on-linux/ + +time="1" # one second +int="enp3s0f0" # network interface + +while true +do + txpkts_old="`cat /sys/class/net/$int/statistics/tx_packets`" # sent packets + rxpkts_old="`cat /sys/class/net/$int/statistics/tx_packets`" # recv packets + sleep $time + txpkts_new="`cat /sys/class/net/$int/statistics/tx_packets`" # sent packets + rxpkts_new="`cat /sys/class/net/$int/statistics/tx_packets`" # recv packets + txpkts="`expr $txpkts_new - $txpkts_old`" # evaluate expressions for sent packets + rxpkts="`expr $rxpkts_new - $rxpkts_old`" # evaluate expressions for recv packets + echo "tx $txpkts pkts/s - rx $rxpkts pkts/ on interface $int" +done diff --git a/user b/user index fae914b1..4bcc820a 160000 --- a/user +++ b/user @@ -1 +1 @@ -Subproject commit fae914b11b8de423d3b11f7259db03cf6cdf3d21 +Subproject commit 4bcc820a8b316c177cc5d82ee5edbbe0ac551814