This content has been machine translated dynamically.
Dieser Inhalt ist eine maschinelle Übersetzung, die dynamisch erstellt wurde. (Haftungsausschluss)
Cet article a été traduit automatiquement de manière dynamique. (Clause de non responsabilité)
Este artículo lo ha traducido una máquina de forma dinámica. (Aviso legal)
此内容已经过机器动态翻译。 放弃
このコンテンツは動的に機械翻訳されています。免責事項
이 콘텐츠는 동적으로 기계 번역되었습니다. 책임 부인
Este texto foi traduzido automaticamente. (Aviso legal)
Questo contenuto è stato tradotto dinamicamente con traduzione automatica.(Esclusione di responsabilità))
This article has been machine translated.
Dieser Artikel wurde maschinell übersetzt. (Haftungsausschluss)
Ce article a été traduit automatiquement. (Clause de non responsabilité)
Este artículo ha sido traducido automáticamente. (Aviso legal)
この記事は機械翻訳されています.免責事項
이 기사는 기계 번역되었습니다.책임 부인
Este artigo foi traduzido automaticamente.(Aviso legal)
这篇文章已经过机器翻译.放弃
Questo articolo è stato tradotto automaticamente.(Esclusione di responsabilità))
Translation failed!
cmp-policy
The following operations can be performed on “cmp-policy”:
add | set | show | rename | rm | stat |
add cmp policy
Creates a HTTP compression policy. When the policy matches an HTTP request or response, the action specified in the policy is performed on the transaction. The policy can be bound globally or to an entity. For the policy to have an effect, compression must be enabled on the service.
Synopsis
add cmp policy
Arguments
name Name of the HTTP compression policy. Must begin with an ASCII alphabetic or underscore (_) character, and must contain only ASCII alphanumeric, underscore, hash (#), period (.), space, colon (:), at (@), equals (=), and hyphen (-) characters. Can be changed after the policy is created.
The following requirement applies only to the Citrix ADC CLI: If the name includes one or more spaces, enclose the name in double or single quotation marks (for example, “my cmp policy” or ‘my cmp policy’).
rule Expression that determines which HTTP requests or responses match the compression policy.
The following requirements apply only to the Citrix ADC CLI:
- If the expression includes one or more spaces, enclose the entire expression in double quotation marks.
- If the expression itself includes double quotation marks, escape the quotations by using the \ character.
- Alternatively, you can use single quotation marks to enclose the rule, in which case you do not have to escape the double quotation marks.
resAction The built-in or user-defined compression action to apply to the response when the policy matches a request or response.
Example
Example 1:
add cmp policy pdf_cmp -rule “HTTP.RES.HEADER("Content-Type").CONTAINS("application/pdf")” -resAction COMPRESS
After creating the above compression policy, you must activate it by binding it globally: bind cmp global pdf_cmp -priority 100
The Citrix ADC system will use the configured pdf_cmp compression policy to perform compression of pdf files.
Example 2:
The following command disables compression for all the access from the specific subnet. add cmp policy local_sub_nocmp -rule “CLIENT.IP.SRC.IN_SUBNET(10.1.1.0/24)” -resAction NOCOMPRESS bind cmp global local_sub_nocmp -priority 200
set cmp policy
Modifies the specified parameters of an HTTP compression policy. Note: Use the show cmp policy command to view all configured HTTP compression policies.
Synopsis
set cmp policy
Arguments
name Name of the HTTP compression policy to be modified.
rule New rule to be associated with the HTTP compression policy. You can modify the existing rule or create a new rule.
resAction The built-in or user-defined compression action to be associated with the policy.
Example
Example 1:
add cmp policy pdf_cmp -rule “HTTP.RES.HEADER("Content-Type").CONTAINS("application/pdf")” -resAction COMPRESS
After creating the above compression policy, you must activate it by binding it globally: bind cmp global pdf_cmp -priority 100
The Citrix ADC system will use the configured pdf_cmp compression policy to perform compression for pdf files.
To disable pdf compression for Internet Explorer, you can change the above compression policy by issuing the following command:
set cmp policy pdf_cmp -rule “HTTP.RES.HEADER("Content-Type").CONTAINS("application/pdf") && HTTP.RES.HEADER("User-Agent").CONTAINS("MSIE").NOT”
To view the changed cmp policy, enter the following command:
show cmp policy pdf_cmp Name: pdf_cmp Rule: (“HTTP.RES.HEADER("Content-Type").CONTAINS("application/pdf") && HTTP.RES.HEADER("User-Agent").CONTAINS("MSIE").NOT) Response action: COMPRESS Hits: 2 Bytes In:…609284 Bytes Out:… 443998 Bandwidth saving…27.13% Ratio 1.37:1 Done
show cmp policy
Displays details of all HTTP compression policies.
Synopsis
show cmp policy [
Arguments
name Name of the HTTP compression policy for which to display details.
Output
stateflag rule The request/response rule that will trigger the specified compression action.
reqAction The compression action to be performed on requests.
resAction The compression action to be performed on responses.
hits Number of hits.
txbytes Number of bytes transferred.
rxbytes Number of bytes received.
clientTTLB Total client TTLB value.
clientTransactions Number of client transactions.
serverTTLB Total server TTLB value.
serverTransactions Number of server transactions.
boundTo The name of the entity to which the policy is bound.
activePolicy priority gotoPriorityExpression Expression specifying the priority of the next policy which will get evaluated if the current policy rule evaluates to TRUE.
labelType Type of policy label invocation.
labelName Name of the label to invoke if the current policy rule evaluates to TRUE.
description Description of the policy
vserverType builtin Flag to determine if compression policy is builtin or not
feature The feature to be checked while applying this config
type isDefault A value of true is returned if it is a default policy
devno count
Example
show cmp policy 4 Compression policies: 1) Name: ns_adv_cmp_content_type Rule: HTTP.RES.HEADER(“Content-Type”).CONTAINS(“text”) Response action: COMPRESS Hits: 1 Bytes In:…4325 Bytes Out:… 1530 Bandwidth saving…64.62% Ratio 2.83:1 2) Name: ns_adv_cmp_mscss Rule: (ns_msie_adv && HTTP.RES.HEADER(“Content-Type”).CONTAINS(“text/css”)) Response action: COMPRESS Hits: 0 3) Name: ns_adv_nocmp_mozilla_47 Rule: (HTTP.REQ.HEADER(“User-Agent”).CONTAINS(“Mozilla/4.7”) && HTTP.RES.HEADER(“Content-Type”).CONTAINS(“text/css”)) Response action: NOCOMPRESS Hits: 0 Done
You can also view an individual cmp policy by giving the cmp policy name as an argument:
show cmp policy ns_adv_cmp_content_type Name: ns_adv_cmp_content_type Rule: HTTP.RES.HEADER(“Content-Type”).CONTAINS(“text”) Response action: COMPRESS Hits: 7 Bytes In:…796160 Bytes Out:… 197730 Bandwidth saving…75.16% Ratio 4.03:1 Done
rename cmp policy
Renames a compression policy.
Synopsis
rename cmp policy
Arguments
name Existing name of the policy.
newName New name for the compression policy. Must begin with an ASCII alphabetic or underscore (_) character, and must contain only ASCII alphanumeric, underscore, hash (#), period (.), space, colon (:), at (@), equals (=), and hyphen (-) characters. Choose a name that reflects the function that the policy performs.
The following requirement applies only to the Citrix ADC CLI: If the name includes one or more spaces, enclose the name in double or single quotation marks (for example, “my cmp policy” or ‘my cmp policy’).
Example
rename cmp policy oldname newname
rm cmp policy
Removes a user-defined HTTP compression policy.
Synopsis
rm cmp policy
Arguments
name Name of the HTTP compression policy to be removed.
Example
rm cmp policy cmp_policy_name The “show cmp policy” command shows all currently defined HTTP compression policies.
stat cmp policy
Displays compression statistics for all compression policies, or for only the specified policy.
Synopsis
stat cmp policy [
Arguments
name Name of the compression policy for which to display statistics. If no name is specified, statistics for all compression polices are shown.
detail Specifies detailed output (including more statistics). The output can be quite voluminous. Without this argument, the output will show only a summary.
fullValues Specifies that numbers and strings should be displayed in their full form. Without this option, long strings are shortened and large numbers are abbreviated
ntimes The number of times, in intervals of seven seconds, the statistics should be displayed. Default value: 1 Minimum value: 0
logFile The name of the log file to be used as input.
clearstats Clear the statsistics / counters
Possible values: basic, full
Output
count devno stateflag
Counters
Policy hits (Hits) Number of hits on the policy
Policy undef hits (Undefhits) Number of undef hits on the policy
Example
stat cmp policy
Related Commands
Share
Share
This Preview product documentation is Citrix Confidential.
You agree to hold this documentation confidential pursuant to the terms of your Citrix Beta/Tech Preview Agreement.
The development, release and timing of any features or functionality described in the Preview documentation remains at our sole discretion and are subject to change without notice or consultation.
The documentation is for informational purposes only and is not a commitment, promise or legal obligation to deliver any material, code or functionality and should not be relied upon in making Citrix product purchase decisions.
If you do not agree, select I DO NOT AGREE to exit.