[lnst] README: add Jiri Prochazka and fix Radek's email
by Jiří Pírko
commit 041b75147b246d53ba84da92b69f8292d662f584
Author: Jiri Pirko <jiri(a)resnulli.us>
Date: Wed Aug 20 14:27:28 2014 +0200
README: add Jiri Prochazka and fix Radek's email
Signed-off-by: Jiri Pirko <jiri(a)resnulli.us>
README.md | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/README.md b/README.md
index 3c10f72..a929e2f 100644
--- a/README.md
+++ b/README.md
@@ -21,8 +21,9 @@ su
* Jiri Pirko <jpirko(a)redhat.com>
* Jiri Zupka <jzupka(a)redhat.com>
* Jan Tluka <jtluka(a)redhat.com>
-* Radek Pazdera <rpazdera(a)redhat.com>
+* Radek Pazdera <radek(a)pazdera.co.uk>
* Ondrej Lichtner <olichtne(a)redhat.com>
+* Jiri Prochazka <jprochaz(a)redhat.com>
## Internet Resources
9 years, 7 months
[lnst] Added netperf test module
by Jiří Pírko
commit 38f79ea3a8f27cc923a134979ec9056e501d51e0
Author: Jiri Prochazka <jprochaz(a)redhat.com>
Date: Wed Aug 20 14:00:28 2014 +0200
Added netperf test module
This module brings netperf tool support. Netperf serves to measuring network
throughput. It is required to have at least 2 machines in the pool, one for
server, rest for clients. If you insert threshold option in recipe, test will
determine, whether the throughput is higher or lower than the threshold, if no
threshold value is inserted, test will just measure throughput.
Signed-off-by: Jiri Prochazka <jprochaz(a)redhat.com>
Signed-off-by: Jiri Pirko <jiri(a)resnulli.us>
test_modules/Netperf.py | 154 +++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 154 insertions(+), 0 deletions(-)
---
diff --git a/test_modules/Netperf.py b/test_modules/Netperf.py
new file mode 100644
index 0000000..85be600
--- /dev/null
+++ b/test_modules/Netperf.py
@@ -0,0 +1,154 @@
+"""
+Netperf test module
+"""
+
+__author__ = """
+jprochaz(a)redhat.com (Jiri Prochazka)
+"""
+
+import logging
+import errno
+import re
+from lnst.Common.TestsCommon import TestGeneric
+from lnst.Common.ShellProcess import ShellProcess
+
+class Netperf(TestGeneric):
+
+ def _compose_cmd(self, role):
+ """
+ composes commands for netperf and netserver based on xml recipe
+ """
+ netperf_opts = self.get_opt("netperf_opts")
+ if role == "client":
+ netperf_server = self.get_mopt("netperf_server", opt_type="addr")
+ duration = self.get_opt("duration")
+ port = self.get_opt("port")
+ cmd = "netperf -H %s" % netperf_server
+ if port is not None:
+ """
+ client connects on this port
+ """
+ cmd += " -p %s" % port
+ if duration is not None:
+ """
+ test will last this duration
+ """
+ cmd += " -l %s" % duration
+ if netperf_opts is not None:
+ """
+ custom options for netperf
+ """
+ cmd += " %s" % netperf_opts
+ elif role == "server":
+ bind = self.get_opt("bind", opt_type="addr")
+ port = self.get_opt("port")
+ family = self.get_opt("family")
+ cmd = "netserver -D"
+ if bind is not None:
+ """
+ server is bound to this address
+ """
+ cmd += " -L %s" % bind
+ if port is not None:
+ """
+ server listens on this port
+ """
+ cmd += " -p %s" % port
+ if netperf_opts is not None:
+ """
+ custom options for netperf
+ """
+ cmd += " %s" % netperf_opts
+ return cmd
+
+ def _parse_output(self, threshold, output):
+ # pattern for throughput output
+ pattern2 = "\d+\s+\d+\s+\d+\s+\d+\.\d+\s+(\d+(\.\d+){0,1})"
+ r2 = re.search(pattern2, output.lower())
+ if r2 is None:
+ """
+ throughput was not found, end test with failure
+ """
+ logging.info("Could not get performance throughput! Are you sure "\
+ "netperf is installed on both machines and machines "\
+ "are mutually accessible?")
+ return (False, "Could not get performance throughput! Are you "\
+ "sure netperf is installed on both machines and "\
+ "machines are mutually accessible?")
+ if threshold is not None:
+ # pattern for threshold
+ # group(1) ... threshold value
+ # group(3) ... threshold units
+ # group(4) ... bytes/bits
+ pattern1 = "(\d*(\.\d*){0,1})\s*([ kmgt])(bits|bytes)\/sec"
+ r1 = re.search(pattern1, threshold.lower())
+ threshold_rate = float(r1.group(1))
+ threshold_unit_size = r1.group(3)
+ threshold_unit_type = r1.group(4)
+ throughput_rate = float(r2.group(1))
+ """
+ this part converts threshold and throughput rates to same format
+ user will get output in format specified in threshold option
+ if no threshold option is put in, default format is Mbits
+ """
+ if threshold_unit_size == 'k':
+ throughput_rate *= 1000
+ elif threshold_unit_size == 'g':
+ throughput_rate /= 1000
+ elif threshold_unit_size == 't':
+ throughput_rate /= 1000 * 1000
+ if threshold_unit_type == "bytes":
+ throughput_rate /= 8
+ if threshold_rate > throughput_rate:
+ return (False, "Measured rate (%s %s%s) is below threshold "\
+ "(%s %s%s)!" % (throughput_rate,
+ threshold_unit_size.upper(),
+ threshold_unit_type,
+ threshold_rate,
+ threshold_unit_size.upper(),
+ threshold_unit_type))
+ else:
+ return (True, "Measured rate (%s %s%s) is over threshold "\
+ "(%s %s%s)." % (throughput_rate,
+ threshold_unit_size.upper(),
+ threshold_unit_type,
+ threshold_rate,
+ threshold_unit_size.upper(),
+ threshold_unit_type))
+ else:
+ return (True, "Measured rate: %s Mbits" % r2.group(1))
+
+
+
+ def _run_server(self, cmd):
+ logging.debug("running as server...")
+ server = ShellProcess(cmd)
+ try:
+ server.wait()
+ except OSError as e:
+ if e.errno == errno.EINTR:
+ server.kill()
+
+ def _run_client(self, cmd):
+ logging.debug("running as client...")
+ client = ShellProcess(cmd)
+ try:
+ client.wait()
+ except OSError as e:
+ if e.errno == errno.EINTR:
+ client.kill()
+ output = client.read_nonblocking()
+ return self._parse_output(self.get_opt("threshold"), output)
+
+ def run(self):
+ self.role = self.get_mopt("role")
+ cmd = self._compose_cmd(self.role)
+ logging.debug("compiled command: %s" % cmd)
+ if self.role == "client":
+ (rv, message) = self._run_client(cmd)
+ res_data = {"msg" : message}
+ if rv == False:
+ return self.set_fail(res_data)
+ return self.set_pass(res_data)
+ elif self.role == "server":
+ self._run_server(cmd)
9 years, 7 months
百业兴旺
by 越祥平
lnst-developers:您好!!
《战略性绩效管理实战训练班》
2014年8月20日上海
【授课对象】 企业董事长、总经理;分管、负责人力资源工作的副总、总监、经理、主管;绩效管理负责人;各部门经理及以上人员。
【学习费用】 特惠价980元/人(含发票、午餐、教材、茶点)
【报名热线】021-31216519(上海) 010-56592100(北京) 0755-3302.6118(深圳)
课程背景:
绩效管理流于形式,作为管理者的您是否遇到如下困惑:
• 面对全球低迷的宏观经济形势,企业该做什么样的抉择?
• 为什么公司连续几年徘徊不前,企业经营举步维艰?
• 为什么战略制定得很清晰,但是总是得不到真正执行?
• 为什么员工绩效很好,但是公司的业绩却远远没有达成?
• 我们也制定了年度目标,年底也进行了考核,但是目标达成却总是相差一大截?
• 为什么我们设定了目标,也有了明确的激励机制,但是结果却不一定好呢?
• 如何才能提高目标达成的确定性?
• 绩效考核分数算出来了,有时我不敢面对员工,告诉他们哪些方方面做得很好,还有哪些方面存在不足。
• 如何让员工的绩效持续提升?
• 发奖金成了很痛苦的事情,如何公平、公开地发奖金,同时又能调动员工积极性?
• 不同层级、不同类别的人员如何激励?
课程风格
真实、实战、超值、趣味
管理游戏、现场模拟演练、小组PK——生动有趣
十多年来亲手制定并成功推行的绩效管理方案与表单——务实,具有很强的操作性
咨询案例研讨——激烈的脑力激荡与充分的交流与分享
就您企业问题进行咨询式辅导——一听就懂,一学就会
16次沙盘演练,25个实用工具,课程满意度100%
导师简介 >【张国量】
【教育背景】
清华大学、浙江大学、上海交通大学、四川大学客座教授
中国人力资源开发研究会理事
苏州市企业管理咨询协会秘书长
曾先后担任全球吸尘器第一名江苏金莱克集团人力资源总监、苏州开元集团(产值118亿)副总裁
著有管理畅销书《驾驭力》、《卓越经营模式——企业十倍速增长策略》等;
研究领域:商业模式、战略规划、目标管控、组织运作、流程再造、股权激励、企业文化
课程大纲
第一单元 全面认识绩效管理
1、揭露企业管理的本质
2、员工绩效三维度
3、绩效矩阵图的剖析
4、哈佛商学院经典绩效案例研讨
5、绩效管理八大循环
6、企业中层高层在绩效管理过程中的角色定位
案例研讨与练习---哈佛商学院经典绩效案例研讨
工具:
《绩效矩阵图》
《绩效管理八大循环图》
第二单元 绩效考核三大内容
1、绩效考核的三大内容
2、目标的两种表现形式
3、什么是KPI、什么是GS、什么是KCI
4、GS三大来源
5、360度绩效评估是怎么回事
实战演练:
1、KPI绩效考核的目标值、权重、评分标准的科学设计
2、就您自己正在执行的GS现场模拟
3、KCI360度绩效评估
工具:
《KPI绩效考核表》
《GS绩效考核表》
《KCI素质评估表》
第三单元 目标设计与分解
1、KPI的两大来源
2、根据彼得德鲁克七大业务领域提炼公司级KPI
3、制定达成公司级KPI的策略
4、公司级目标系统图的绘制
5、目标承诺书的签订
6、KPI指标的提炼第二个方法——岗位职责提炼法
实战演练:
1、公司级KPI的提炼
2、公司级KPI价值树策略研讨
3、岗位职责提炼法
4、指标筛选
工具:
《彼得德鲁克七大业务领域》
《价值树策略分解法》
《公司级目标系统图》
《目标承诺书的签订》
《岗位职责提炼法》
《部门级目标系统图》
《指标筛选532法则》
第四单元 过程管控与薪酬激励
1、绩效计划表的制定
2、日清表的导入
3、绩效烧烤大会召开
4、薪酬激励与发展
5、研发团队如何考核与激励
练习:
1、绩效计划表的制定
案例分享
2、某上市公司66人研发团队如何考核与激励
工具:
《月度绩效计划表》
《日清表》
《月度经营分析会》
《人力资源管理的3P模型》
《人力资源九宫图》
21:57:49
9 years, 7 months
[PATCH] SlavePool: make machines available when pool checking is disabled
by Jan Tluka
If pool checking is disabled with -o option the 'available' variable is
not set and referenced before assignment.
Signed-off-by: Jan Tluka <jtluka(a)redhat.com>
---
lnst/Controller/SlavePool.py | 2 ++
1 file changed, 2 insertions(+)
diff --git a/lnst/Controller/SlavePool.py b/lnst/Controller/SlavePool.py
index baca1e7..22c4379 100644
--- a/lnst/Controller/SlavePool.py
+++ b/lnst/Controller/SlavePool.py
@@ -124,6 +124,8 @@ class SlavePool:
logging.debug("libvirtd not running. Removing "\
"libvirt_domain from machine '%s'" % m_id)
del machine_spec['params']['libvirt_domain']
+ else:
+ available = True
if available:
self._pool[m_id] = machine_spec
--
1.8.3.1
9 years, 7 months