Customer would like to calculate Cacheflow Bandwidth Saving number from Accesslog
Some customers may need to generate their own report.
Bandwidth Saving Formula
BWS% = (1 - Remote Bytes to Server / Client Bytes Server to Client)) * 100
Note: Use Accesslog for calculation.
"Remote Bytes to Server": is "rs-bytes" for ALL "s-action"
"Client Bytes Server to Client": is "sc-bytes" for ALL "s-action"
Please follow below steps to calculate BWS%
1. Identify the domain that would like to calculate. For example "apple.com" and "microsoft.com"
2. Process raw Accesslog
C:\sgrep>grep "apple.com" "CF_main_.log" >apple.com.txt
C:\sgrep>grep "microsoft.com" "CF_main_.log" >microsoft.com.txt
3. After log is processed by domains, then added in first line as below column, this will be used later as a "column name" for Excel file.
localtime c-ip time-taken sc-status sc-bytes cs-bytes rs-bytes sr-bytes s-action cs-method cs-uri-scheme cs-host cs-uri-port cs-uri-path cs-uri-query cs-uri-extension cs(User-Agent) cs-ip cs-categories c-uri x-exception-id rs(Content-Type)
(*Above columns are just example for normal Accesslog, if you have changed the format, please use your format)
4. Open the text file in Excel, use "delimited" with "space".
5. You will get Excel file. Please see example "CF_Accesslog.xls" (included apple.com and microsoft.com in different excel sheet)
- First, calculate "Client Bytes Server to Client", by sum all number in "sc-bytes"
- Second, calculate "Remote Bytes to Server", by sum all number in "sc-bytes"
6. Put value in the formula