Usage: lpmp [options] argv...
(sudo )lpmp --memcache=10.2.226.133:11011,10.2.226.133:11012 --log_level=0 --mode=XQPUSH
LPMP optins useage:
-p, --port=PORT lpmp server requires a port number.
default port=6789
--mode [MODE] PULL : (default) lpmp server will request data from lpm server when a request coming.
This mode require a high performance lpmp server,it's used to be a daemon.
BGPULL : This mode will run some background process at lpmp server.
It needs memcaches.see --memcache=[LIST,LIST]
XQPUSH : This mode will get data from memcache when a request come from client.
This mode is the heighest performance of the three.
It also needs memcaches.see --memcache=[LIST,LIST]
default --mode=PULL.
-m, --memcache=LIST,LIST memcache list,such as : --memcache=10.2.226.38:11211,10.2.226.37:11211
memcache server(s) must be alive.
-l, --log=LogPath default --log=/var/log/lpmp.log
--log_level=LogLevel 1 => DEBUG
2 => INFO
3 => WARN
4 => ERROR
5 => FATAL
default --log_level=3
-t=60 Make sure the LPMP server's datatime is same as LPM server,
or the difference is little than timeout,else the memcache data will not available for LPMP
(sudo )ntpdate 10.2.228.8(your date server ip)
default -t=60
common options:
--help show this message
--version show version
LPM optins useage:
-p, --port=PORT lpm rest server requires a port number.
default port=9876
-P, --[no-]push if push is given, the --memcache must be set,
and a job will push server performance data to memcache server.
default --push=false.
-t, --timer=Second periodic timer to push cache
default --timer=10(second).
-m, --memcache=[LIST,LIST] memcache list,such as : --memcache=10.2.226.38:11211,10.2.226.37:11211
memcache server(s) must be alive.
-l, --log=LogPath default --log=/var/log/lpm.log
--log_level=LogLevel 1 => DEBUG
2 => INFO
3 => WARN
4 => ERROR
5 => FATAL
default --log_level=3
--pids=[PID,PID] pids list,such as : --pids=1234,2134,4321
common options:
--help show this message
--version show version
It provides current performance of a linux host,and the command 'lpm' is a web server supported by sinatra,you could type in 'lpm' in command shell,then access the http://localhost:9876/,some information will be show.
If you want get some help,plz check out the test/.rb.
Benchmark.bm do |x|
x.report("CPU"){pp LPM:roc.cpu}
x.report("CPU(5)"){pp LPM:roc.cpu(5)}
x.report("CPU(10)"){pp LPM:roc.cpu(10)}
x.report("CPU(15)"){pp LPM:roc.cpu(15)}
end
# => below test is for LPM:roc
pp "LPM:roc.loadavg => #{LPM:roc.loadavg}"
pp "LPM:roc.uptime => #{LPM:roc.uptime}"
pp "LPM::Proc.meminfo => #{LPM::Proc.meminfo}"
pp "LPM::Proc.cpuinfo => #{LPM::Proc.cpuinfo}"
# below are some test cases for LPM::Process
require "lpm" require "Benchmark" require "pp"
# => below test is for LPM::Utils
pp "LPM::Utils.ulimit => #{LPM::Utils.ulimit}"
pp "LPM::Utils.locale => #{LPM::Utils.locale}"
pp "LPM::Utils.sysctl => #{LPM::Utils.sysctl}"
# => LPM::Utils can also be used as
pp "LPM::Proc.ulimit => #{LPM::Proc.ulimit}"
pp "LPM::Proc.locale => #{LPM::Proc.locale}"
pp "LPM::Proc.sysctl => #{LPM::Proc.sysctl}"