- -- Remote --
- alias bwd {
- write -c firstbw.txt
- write -c secondbw.txt
- run -n first.bat
- .timer 1 3 run -n second.bat
- .timer 1 4 bwfile
- }
- alias bwfile {
- %bytes1 = $read(firstbw.txt, 5)
- %d1 = $gettok(%bytes1, 2, 32)
- %u1 = $gettok(%bytes1, 3, 32)
- %bytes2 = $read(secondbw.txt, 5)
- %d2 = $gettok(%bytes2, 2, 32)
- %u2 = $gettok(%bytes2, 3, 32)
- %dspeed = $calc(%d2 - %d1)
- %dspeed = $calc(%dspeed / 1024)
- %dspeed = $calc(%dspeed / 8)
- %uspeed = $calc(%u2 - %u1)
- %uspeed = $calc(%uspeed / 1024)
- %uspeed = $calc(%uspeed / 8)
- msg $active Down: $round(%dspeed,2) KB/sec - Up: $round(%uspeed,2) KB/sec (3 seconds metered)
- }
- -- first.bat --
- netstat -e > firstbw.txt
- -- second.bat --
- netstat -e > secondbw.txt
Lil bandwidth meter script.
By: Arie | Date: Dec 30 2006 21:17 | Format: None | Expires: never | Size: 768 B | Hits: 1345
Latest pastes
2 days ago
2 days ago
5 days ago
6 days ago
6 days ago