mirror of
https://github.com/rcore-os/rCore.git
synced 2024-11-24 00:46:17 +04:00
Add pkttop.sh, bump user and drivers version
This commit is contained in:
parent
6725ca10ab
commit
f09290442c
2
kernel/Cargo.lock
generated
2
kernel/Cargo.lock
generated
@ -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)",
|
||||
|
17
tools/pkttop.sh
Executable file
17
tools/pkttop.sh
Executable file
@ -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
|
2
user
2
user
@ -1 +1 @@
|
||||
Subproject commit fae914b11b8de423d3b11f7259db03cf6cdf3d21
|
||||
Subproject commit 4bcc820a8b316c177cc5d82ee5edbbe0ac551814
|
Loading…
Reference in New Issue
Block a user