-
Notifications
You must be signed in to change notification settings - Fork 9
Policy
aglitke edited this page Dec 29, 2010
·
25 revisions
MOM is designed to enable dynamic tuning of a KVM host in response to statistics that are continuously collected from the host and its running guests.
This tuning policy is described using a LISP-like mini-language as described here.
Comments are expressed with the ‘#’ symbol. When ‘#’ is encountered, it and all remaining characters on the line are ignored.
Example:
# This is a full line comment
(+ 1 1) # This is a partial-line comment
2
h3. Strings
Strings are created by placing text between double-quotes. Variables can be assigned string values. Sting concatenation and repetition can be performed by using the ‘+’ and ‘*’ operators.
Example:
"foo" "bar"
# Operators on strings have the same effect as for Python
(+ "Hello " "World!")
(+ (* 3 "Hey ") "!")
# Multi-line string
"multi-
line"
foo
bar
Hello World!
Hey Hey Hey !
multi-
line
Remember to state that the result of a compound statement is the last value in the block.
Prop, Stat, StatAvg, SetVar, GetVar
Control()
- (abs x): Return the absolute value of ‘x’