Last active
November 22, 2022 19:21
Revisions
-
Multikas revised this gist
Feb 20, 2015 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -13,8 +13,8 @@ MAXBW=$2 for next in `vmadm get $VM_UUID | grep interface | awk -F\" '{ print $4 }'` do flowadm add-flow -l $next -z $VM_UUID -a transport=tcp -p maxbw=$MAXBW $VM_UUID-$next-tcp flowadm add-flow -l $next -z $VM_UUID -a transport=udp -p maxbw=$MAXBW $VM_UUID-$next-udp done exit 0 -
Multikas revised this gist
Feb 20, 2015 . 1 changed file with 0 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -15,7 +15,6 @@ for next in `vmadm get $VM_UUID | grep interface | awk -F\" '{ print $4 }'` do flowadm add-flow -l $next -z $VM_UUID -a transport=tcp -p maxbw=$MAXBW $VM_UUID-net0-tcp flowadm add-flow -l $next -z $VM_UUID -a transport=udp -p maxbw=$MAXBW $VM_UUID-net0-udp done exit 0 -
Multikas created this gist
Feb 20, 2015 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,21 @@ #!/usr/bin/bash # # Script should be run in GZ. # # example: # ./add-flow-to-vm.sh c480b89f-f8a1-41b1-abd0-45bac4685cb2 15M # # It will add TCP/UDP flows for this particular VM, and limits bandwidth to 15Mbps # VM_UUID=$1 MAXBW=$2 for next in `vmadm get $VM_UUID | grep interface | awk -F\" '{ print $4 }'` do flowadm add-flow -l $next -z $VM_UUID -a transport=tcp -p maxbw=$MAXBW $VM_UUID-net0-tcp flowadm add-flow -l $next -z $VM_UUID -a transport=udp -p maxbw=$MAXBW $VM_UUID-net0-udp echo $next done exit 0