#pmieconf-rules 1
# --- DO NOT MODIFY THIS FILE --- see pmieconf(5)
#

rule	per_cpu.context_switch
	summary	= "$rule$"
	enumerate = "hosts"
	predicate =
"some_host (
    some_inst (
	kernel.percpu.pswitch $hosts$ > $threshold$ count/sec
    )
    && hinv.ncpu $hosts$ > 1
)"
	enabled	= yes
	version	= 1
	help	=
"The number of context switches per second for at least one CPU
exceeded $threshold$ over the past sample interval.

This rule only applies to multi-processor systems, for
single-processor systems refer to the cpu.context_switch rule.";

string	rule
	default	= "High per CPU context switch rate"
	modify	= no
	display	= no;

double	threshold
	default	= 5000
	help	=
"The threshold number of context switches per second per CPU.";

string	action_expand
	default	= %vctxsw/s[%i]@%h
	display	= no
	modify	= no;

string	email_expand
	default	= "host: %h CPU: %i context switches: %v/sec"
	display	= no
	modify	= no;

#
# --- DO NOT MODIFY THIS FILE --- see pmieconf(5)
