The point of this script is to run a port based report for multiple servers against a Profiler.  The output is displayed in columns showing the server, port, average, and total bytes.

p webusage.py -u admin -p admin --timeFilter 'last 1 hour' --dataResolution '1min' -w 'cascade-build,cam-redfin57' -o '80,443,41017,137'
Reporting on: last 1 hour
Reporting on the hosts: cascade-build,cam-redfin57
Using ports: 80,443,41017,137
Data resolution is: 1min
Host            Port  Avg Bytes       Total Bytes   
cascade-build   80    1407093.15      4981109760    
cascade-build   137   2.00            7110          
cascade-build   443   782126.86       2768729088    
cam-redfin57    41017 2520.54         8922731       
cam-redfin57    443   13355.40        47278127


The script connects to the Profiler specified using the username and password specified (-u and -p options).  The time frame defaults to the last 5 minutes unless overridden with the '--timeFilter' option (as seen above).  By default the data resolution is automatic unless overridden (as seen above) with the '--dataResolution' option.  The -w option allows you to specify the servers you are interested in; this is a comma delimited list of either IP's or DNS names.  The -o option allows you to specify the ports you are interested in, also a comma delimited list - all ports are assumed to be TCP.


The output shows the host name or IP, port #, average, and total bytes for each port on each host that returned data (i.e. if there is no data for a specific server host/port combo no row is returned).