Installation guide

www.vmware.com
430
VMware ESX Server Administration Guide
Reading from a file reports status information for the filter instance in a class-defined
format. Writing to a file issues a command to the filter instance using a class-defined
syntax.
Note: The current release allows only a single network packet filter to be attached to
each virtual machine. Receive filters are not implemented in this release.
Traffic Shaping with nfshaper
As described in the preceding sections, you can manage network bandwidth
allocation on a server from the VMware Management Interface or from the procfs
interface on the service console.
The shaper implements a two-bucket composite traffic shaping algorithm. A first
token bucket controls sustained average bandwidth and burstness. A second token
bucket controls peak bandwidth during bursts. Each nfshaper instance can accept
parameters to control average bps, peak bps and burst size.
The procfs interface, described in Using Network Filters on page 428, is used to
attach an nfshaper instance to a virtual machine, detach an nfshaper instance
from a virtual machine, query the status of an nfshaper instance or issue a dynamic
command to an active nfshaper instance.
Service Console Commands
config <bpsAverage> <bpsPeak> <burstSize> [<periodPeak>]
Dynamically reconfigure the shaper to use the specified parameters: average
bandwidth of <bpsAverage> bits per second, peak bandwidth of <bpsPeak>
bits per second, maximum burst size of <burstSize> bytes and an optional peak
bandwidth enforcement period <periodPeak> in milliseconds. Each parameter
may optionally use the suffix k (1k = 1024) or m (1m = 1024k).
maxq <nPackets>
Dynamically set the maximum number of queued packets to <nPackets>.
reset
Dynamically reset shaper statistics.
Examples
Suppose that you want to attach a traffic shaper to limit the transmit bandwidth of
the virtual machine with ID 104. To create and attach a new shaper instance, issue an
xmitpush command as described in Managing Network Bandwidth from the
Service Console on page 429. Note that root privileges are required to attach a filter.
echo "104 nfshaper 1m 2m 160k" > /proc/vmware/filters/
xmitpush