[Valkyrie网络测试仪-软件使用技巧] - Scheduler动作录制,定制打流过程(中途启停/调整带宽/使能部分流量)
在UI界面下将脚本的事情就做完了! -- ValkyrieManager Scheduler
在网络测试打流过程中,我们经常会遇到要对比在不同报文长度下,端口的转发性能是否有影响,改变报文长度,对转发系统的延迟处理会带来多大的影响,需要实施动态的流量压力测试,并根据实际的场景,可能需要规划模拟某些流量进行定时定次的发送等场景,传统的解决方法是直接拿API进行脚本调取进行二次开发,学习起来比较费事,ValkyrieManager的Scheduler功能可以很好的解决以上痛点。
Xena Scheduler可以在打流过程中进行动态的参数调整,实现动态流量模型,如变更发包的报文长度Packet length,发包的带宽Rate/PPS,动态的启停某些流量等
适用硬件型号及软件版本
以下分享,适用于以下机箱及测试板卡
- ValkyrieBay,ValkyrieCompact
- Odin-1G-3S-6P,Odin-1G-3S-6P-T1-RJ45,Odin-1G-3S-6P-E-TSN
- Odin-10G-5S-6P-CU,Odin-10G-1S-6P,Odin-10G-4S-6P
- Loki-100G-5S-2P,Loki-100G-5S-4P
- Thor-400G-7S-1P,Thor-400G-4S-2P,Thor-400G-4S-4P
- Freya-800G-4S-1P-QDD,Freya-800G-4S-1P-OSFP,Freya-800G-4S-E
软件版本,ValkyrieManager版本Release40及后续版本
Scheduler界面设定
默认该页面在最下面折叠了,方便查看,可以将它先右上角固定住,再拖动到与其他常用界面齐平
Scheduler支持设定的动作
- Set parameter value改变流数据参数(指定来了的PPS/Rate%数据)
- Wait period插入等待时间
- Start traffic开启端口发包
- Stop traffic停止端口发包
- Clear Statistics统计数据清零
- Enable Stream使能流量
- Disable Stream禁用流量
- Suspend暂停流量
- Custom Port/ Stream Command自定义命令行数据(端口级别/流级别)
范例1,动态调整发包带宽-改变Rate/PPS
测试过程中调整带宽,用于观察带宽增加或降低速率时,接受端口的Rx数据,Rx Latency等数据变化
模型设计如下
实施效果
底层逻辑实现
(不重要)
{
"Operations": [
{
"OperType": "StopTraffic",
"ParamType": 0,
"OperValue": null,
"PortTargetList": [
{
"ChassisId": "d1af7b63-48a1-493a-a3fb-0a3313c41a89",
"ModuleIndex": 1,
"PortIndex": 4
}
],
"StreamTargetList": [],
"AllTargetsSelected": false,
"FullInfo": "Stop Traffic",
"Operations": [],
"ItemId": "b165a6b3-4749-4fb5-bd83-0392d4a4b4e1",
"ParentId": ""
},
{
"OperType": "SetParamValue",
"ParamType": "PS_RATEFRACTION",
"OperValue": 10.0,
"PortTargetList": [],
"StreamTargetList": [],
"AllTargetsSelected": true,
"FullInfo": "Set Parameter Value",
"Operations": [],
"ItemId": "105e9b4f-5b67-48e8-a252-a3a6e3f241fe",
"ParentId": ""
},
{
"OperType": "StartTraffic",
"ParamType": 0,
"OperValue": null,
"PortTargetList": [
{
"ChassisId": "d1af7b63-48a1-493a-a3fb-0a3313c41a89",
"ModuleIndex": 1,
"PortIndex": 4
}
],
"StreamTargetList": [],
"AllTargetsSelected": false,
"FullInfo": "Start Traffic",
"Operations": [],
"ItemId": "b641191c-5095-472a-9c72-026c4006c3f3",
"ParentId": ""
},
{
"OperType": "Wait",
"ParamType": 0,
"OperValue": 10.0,
"PortTargetList": [],
"StreamTargetList": [],
"AllTargetsSelected": true,
"FullInfo": "Wait Period",
"Operations": [],
"ItemId": "eff4459b-71c6-47b1-9b8e-76908d20c175",
"ParentId": ""
},
{
"OperType": "StopTraffic",
"ParamType": 0,
"OperValue": null,
"PortTargetList": [
{
"ChassisId": "d1af7b63-48a1-493a-a3fb-0a3313c41a89",
"ModuleIndex": 1,
"PortIndex": 4
}
],
"StreamTargetList": [],
"AllTargetsSelected": false,
"FullInfo": "Stop Traffic",
"Operations": [],
"ItemId": "59afa5f4-eaf5-447d-873a-f07417a9831c",
"ParentId": ""
},
{
"OperType": "SetParamValue",
"ParamType": "PS_RATEFRACTION",
"OperValue": 1.0,
"PortTargetList": [
{
"StreamId": 0,
"ChassisId": "d1af7b63-48a1-493a-a3fb-0a3313c41a89",
"ModuleIndex": 1,
"PortIndex": 4
},
{
"StreamId": 1,
"ChassisId": "d1af7b63-48a1-493a-a3fb-0a3313c41a89",
"ModuleIndex": 1,
"PortIndex": 4
},
{
"StreamId": 2,
"ChassisId": "d1af7b63-48a1-493a-a3fb-0a3313c41a89",
"ModuleIndex": 1,
"PortIndex": 4
}
],
"StreamTargetList": [
{
"StreamId": 0,
"ChassisId": "d1af7b63-48a1-493a-a3fb-0a3313c41a89",
"ModuleIndex": 1,
"PortIndex": 4
},
{
"StreamId": 1,
"ChassisId": "d1af7b63-48a1-493a-a3fb-0a3313c41a89",
"ModuleIndex": 1,
"PortIndex": 4
},
{
"StreamId": 2,
"ChassisId": "d1af7b63-48a1-493a-a3fb-0a3313c41a89",
"ModuleIndex": 1,
"PortIndex": 4
}
],
"AllTargetsSelected": false,
"FullInfo": "Set Parameter Value",
"Operations": [],
"ItemId": "61c840e3-287b-4c17-bb54-99d6e2b7efed",
"ParentId": ""
},
{
"OperType": "SetParamValue",
"ParamType": "PS_RATEFRACTION",
"OperValue": 20.0,
"PortTargetList": [
{
"StreamId": 3,
"ChassisId": "d1af7b63-48a1-493a-a3fb-0a3313c41a89",
"ModuleIndex": 1,
"PortIndex": 4
},
{
"StreamId": 4,
"ChassisId": "d1af7b63-48a1-493a-a3fb-0a3313c41a89",
"ModuleIndex": 1,
"PortIndex": 4
}
],
"StreamTargetList": [
{
"StreamId": 3,
"ChassisId": "d1af7b63-48a1-493a-a3fb-0a3313c41a89",
"ModuleIndex": 1,
"PortIndex": 4
},
{
"StreamId": 4,
"ChassisId": "d1af7b63-48a1-493a-a3fb-0a3313c41a89",
"ModuleIndex": 1,
"PortIndex": 4
}
],
"AllTargetsSelected": false,
"FullInfo": "Set Parameter Value",
"Operations": [],
"ItemId": "036b3749-57b0-4830-a521-380cc88de4f7",
"ParentId": ""
},
{
"OperType": "StartTraffic",
"ParamType": 0,
"OperValue": null,
"PortTargetList": [
{
"ChassisId": "d1af7b63-48a1-493a-a3fb-0a3313c41a89",
"ModuleIndex": 1,
"PortIndex": 4
}
],
"StreamTargetList": [],
"AllTargetsSelected": false,
"FullInfo": "Start Traffic",
"Operations": [],
"ItemId": "db72a383-79ad-40f9-b3eb-7e7c722d3928",
"ParentId": ""
}
],
"ItemId": "c61dd725-211f-4098-b850-285faecb3c52",
"ParentId": "",
"FullInfo": "New Schedule 3"
}
范例2,动态调整发包带宽-Multi-Streams多流之间调度
Suspend暂停<-->Enable启用,状态之间切换
Stream有3种状态,Enable启用/Disable禁用/Suspend暂停
在端口发包的时候,Stream状态可以在Suspend/Enable之间切换
Suspend的Stream会占用该端口下的流设定带宽,但发包的时候不会发送
实施效果
底层实现代码展现
(不重要)
{
"Operations": [
{
"OperType": "StopTraffic",
"ParamType": 0,
"OperValue": null,
"PortTargetList": [
{
"ChassisId": "d1af7b63-48a1-493a-a3fb-0a3313c41a89",
"ModuleIndex": 1,
"PortIndex": 4
}
],
"StreamTargetList": [],
"AllTargetsSelected": false,
"FullInfo": "Stop Traffic",
"Operations": [],
"ItemId": "58f4e426-79b5-4be3-8744-84554c04cc05",
"ParentId": ""
},
{
"OperType": "SetParamValue",
"ParamType": "PS_RATEFRACTION",
"OperValue": 20.0,
"PortTargetList": [
{
"StreamId": 0,
"ChassisId": "d1af7b63-48a1-493a-a3fb-0a3313c41a89",
"ModuleIndex": 1,
"PortIndex": 4
},
{
"StreamId": 1,
"ChassisId": "d1af7b63-48a1-493a-a3fb-0a3313c41a89",
"ModuleIndex": 1,
"PortIndex": 4
},
{
"StreamId": 2,
"ChassisId": "d1af7b63-48a1-493a-a3fb-0a3313c41a89",
"ModuleIndex": 1,
"PortIndex": 4
},
{
"StreamId": 3,
"ChassisId": "d1af7b63-48a1-493a-a3fb-0a3313c41a89",
"ModuleIndex": 1,
"PortIndex": 4
},
{
"StreamId": 4,
"ChassisId": "d1af7b63-48a1-493a-a3fb-0a3313c41a89",
"ModuleIndex": 1,
"PortIndex": 4
}
],
"StreamTargetList": [
{
"StreamId": 0,
"ChassisId": "d1af7b63-48a1-493a-a3fb-0a3313c41a89",
"ModuleIndex": 1,
"PortIndex": 4
},
{
"StreamId": 1,
"ChassisId": "d1af7b63-48a1-493a-a3fb-0a3313c41a89",
"ModuleIndex": 1,
"PortIndex": 4
},
{
"StreamId": 2,
"ChassisId": "d1af7b63-48a1-493a-a3fb-0a3313c41a89",
"ModuleIndex": 1,
"PortIndex": 4
},
{
"StreamId": 3,
"ChassisId": "d1af7b63-48a1-493a-a3fb-0a3313c41a89",
"ModuleIndex": 1,
"PortIndex": 4
},
{
"StreamId": 4,
"ChassisId": "d1af7b63-48a1-493a-a3fb-0a3313c41a89",
"ModuleIndex": 1,
"PortIndex": 4
}
],
"AllTargetsSelected": false,
"FullInfo": "Set Parameter Value",
"Operations": [],
"ItemId": "fe083ec2-a572-457f-9228-b2757d08c288",
"ParentId": ""
},
{
"OperType": "StartTraffic",
"ParamType": 0,
"OperValue": null,
"PortTargetList": [
{
"ChassisId": "d1af7b63-48a1-493a-a3fb-0a3313c41a89",
"ModuleIndex": 1,
"PortIndex": 4
}
],
"StreamTargetList": [],
"AllTargetsSelected": false,
"FullInfo": "Start Traffic",
"Operations": [],
"ItemId": "d99797fb-b7b8-4730-8192-d7a970063c7e",
"ParentId": ""
},
{
"OperType": "Wait",
"ParamType": 0,
"OperValue": 10.0,
"PortTargetList": [],
"StreamTargetList": [],
"AllTargetsSelected": true,
"FullInfo": "Wait Period",
"Operations": [],
"ItemId": "be43e4b9-3c3a-49b7-9c1d-842fea62b6cf",
"ParentId": ""
},
{
"OperType": "SuspendStream",
"ParamType": 0,
"OperValue": null,
"PortTargetList": [
{
"StreamId": 1,
"ChassisId": "d1af7b63-48a1-493a-a3fb-0a3313c41a89",
"ModuleIndex": 1,
"PortIndex": 4
},
{
"StreamId": 2,
"ChassisId": "d1af7b63-48a1-493a-a3fb-0a3313c41a89",
"ModuleIndex": 1,
"PortIndex": 4
},
{
"StreamId": 3,
"ChassisId": "d1af7b63-48a1-493a-a3fb-0a3313c41a89",
"ModuleIndex": 1,
"PortIndex": 4
},
{
"StreamId": 4,
"ChassisId": "d1af7b63-48a1-493a-a3fb-0a3313c41a89",
"ModuleIndex": 1,
"PortIndex": 4
}
],
"StreamTargetList": [
{
"StreamId": 1,
"ChassisId": "d1af7b63-48a1-493a-a3fb-0a3313c41a89",
"ModuleIndex": 1,
"PortIndex": 4
},
{
"StreamId": 2,
"ChassisId": "d1af7b63-48a1-493a-a3fb-0a3313c41a89",
"ModuleIndex": 1,
"PortIndex": 4
},
{
"StreamId": 3,
"ChassisId": "d1af7b63-48a1-493a-a3fb-0a3313c41a89",
"ModuleIndex": 1,
"PortIndex": 4
},
{
"StreamId": 4,
"ChassisId": "d1af7b63-48a1-493a-a3fb-0a3313c41a89",
"ModuleIndex": 1,
"PortIndex": 4
}
],
"AllTargetsSelected": false,
"FullInfo": "Suspend Stream",
"Operations": [],
"ItemId": "0d738010-2e51-4fe0-aeca-c34ad7df4f08",
"ParentId": ""
},
{
"OperType": "Wait",
"ParamType": 0,
"OperValue": 10.0,
"PortTargetList": [],
"StreamTargetList": [],
"AllTargetsSelected": true,
"FullInfo": "Wait Period",
"Operations": [],
"ItemId": "1328f903-477d-4899-a901-d83af4eff5fc",
"ParentId": ""
},
{
"OperType": "EnableStream",
"ParamType": 0,
"OperValue": null,
"PortTargetList": [
{
"StreamId": 1,
"ChassisId": "d1af7b63-48a1-493a-a3fb-0a3313c41a89",
"ModuleIndex": 1,
"PortIndex": 4
}
],
"StreamTargetList": [
{
"StreamId": 1,
"ChassisId": "d1af7b63-48a1-493a-a3fb-0a3313c41a89",
"ModuleIndex": 1,
"PortIndex": 4
}
],
"AllTargetsSelected": false,
"FullInfo": "Enable Stream",
"Operations": [],
"ItemId": "6d832bd5-5421-4ba9-8dfe-c819086492d3",
"ParentId": ""
},
{
"OperType": "Wait",
"ParamType": 0,
"OperValue": 10.0,
"PortTargetList": [],
"StreamTargetList": [],
"AllTargetsSelected": true,
"FullInfo": "Wait Period",
"Operations": [],
"ItemId": "0543fd21-97a9-40b4-ab8d-6de2e8d6c651",
"ParentId": ""
},
{
"OperType": "EnableStream",
"ParamType": 0,
"OperValue": null,
"PortTargetList": [
{
"StreamId": 2,
"ChassisId": "d1af7b63-48a1-493a-a3fb-0a3313c41a89",
"ModuleIndex": 1,
"PortIndex": 4
}
],
"StreamTargetList": [
{
"StreamId": 2,
"ChassisId": "d1af7b63-48a1-493a-a3fb-0a3313c41a89",
"ModuleIndex": 1,
"PortIndex": 4
}
],
"AllTargetsSelected": false,
"FullInfo": "Enable Stream",
"Operations": [],
"ItemId": "58aa8fb1-8827-4a9c-8dfa-b025e09002fe",
"ParentId": ""
},
{
"OperType": "Wait",
"ParamType": 0,
"OperValue": 10.0,
"PortTargetList": [],
"StreamTargetList": [],
"AllTargetsSelected": true,
"FullInfo": "Wait Period",
"Operations": [],
"ItemId": "58ed510b-6122-4295-b759-7396916d5317",
"ParentId": ""
},
{
"OperType": "EnableStream",
"ParamType": 0,
"OperValue": null,
"PortTargetList": [
{
"StreamId": 0,
"ChassisId": "d1af7b63-48a1-493a-a3fb-0a3313c41a89",
"ModuleIndex": 1,
"PortIndex": 4
},
{
"StreamId": 1,
"ChassisId": "d1af7b63-48a1-493a-a3fb-0a3313c41a89",
"ModuleIndex": 1,
"PortIndex": 4
},
{
"StreamId": 2,
"ChassisId": "d1af7b63-48a1-493a-a3fb-0a3313c41a89",
"ModuleIndex": 1,
"PortIndex": 4
},
{
"StreamId": 3,
"ChassisId": "d1af7b63-48a1-493a-a3fb-0a3313c41a89",
"ModuleIndex": 1,
"PortIndex": 4
},
{
"StreamId": 4,
"ChassisId": "d1af7b63-48a1-493a-a3fb-0a3313c41a89",
"ModuleIndex": 1,
"PortIndex": 4
}
],
"StreamTargetList": [
{
"StreamId": 0,
"ChassisId": "d1af7b63-48a1-493a-a3fb-0a3313c41a89",
"ModuleIndex": 1,
"PortIndex": 4
},
{
"StreamId": 1,
"ChassisId": "d1af7b63-48a1-493a-a3fb-0a3313c41a89",
"ModuleIndex": 1,
"PortIndex": 4
},
{
"StreamId": 2,
"ChassisId": "d1af7b63-48a1-493a-a3fb-0a3313c41a89",
"ModuleIndex": 1,
"PortIndex": 4
},
{
"StreamId": 3,
"ChassisId": "d1af7b63-48a1-493a-a3fb-0a3313c41a89",
"ModuleIndex": 1,
"PortIndex": 4
},
{
"StreamId": 4,
"ChassisId": "d1af7b63-48a1-493a-a3fb-0a3313c41a89",
"ModuleIndex": 1,
"PortIndex": 4
}
],
"AllTargetsSelected": false,
"FullInfo": "Enable Stream",
"Operations": [],
"ItemId": "6d56fa25-eed3-4f4c-abbd-1cf2e2403dc3",
"ParentId": ""
},
{
"OperType": "SuspendStream",
"ParamType": 0,
"OperValue": null,
"PortTargetList": [
{
"StreamId": 1,
"ChassisId": "d1af7b63-48a1-493a-a3fb-0a3313c41a89",
"ModuleIndex": 1,
"PortIndex": 4
},
{
"StreamId": 2,
"ChassisId": "d1af7b63-48a1-493a-a3fb-0a3313c41a89",
"ModuleIndex": 1,
"PortIndex": 4
},
{
"StreamId": 4,
"ChassisId": "d1af7b63-48a1-493a-a3fb-0a3313c41a89",
"ModuleIndex": 1,
"PortIndex": 4
}
],
"StreamTargetList": [
{
"StreamId": 1,
"ChassisId": "d1af7b63-48a1-493a-a3fb-0a3313c41a89",
"ModuleIndex": 1,
"PortIndex": 4
},
{
"StreamId": 2,
"ChassisId": "d1af7b63-48a1-493a-a3fb-0a3313c41a89",
"ModuleIndex": 1,
"PortIndex": 4
},
{
"StreamId": 4,
"ChassisId": "d1af7b63-48a1-493a-a3fb-0a3313c41a89",
"ModuleIndex": 1,
"PortIndex": 4
}
],
"AllTargetsSelected": false,
"FullInfo": "Suspend Stream",
"Operations": [],
"ItemId": "0f42335b-b714-4e5e-9b8b-cf08077e7222",
"ParentId": ""
},
{
"OperType": "Wait",
"ParamType": 0,
"OperValue": 10.0,
"PortTargetList": [],
"StreamTargetList": [],
"AllTargetsSelected": true,
"FullInfo": "Wait Period",
"Operations": [],
"ItemId": "8a7d181a-4b54-44b6-b299-fab062a65cfa",
"ParentId": ""
},
{
"OperType": "StopTraffic",
"ParamType": 0,
"OperValue": null,
"PortTargetList": [
{
"ChassisId": "d1af7b63-48a1-493a-a3fb-0a3313c41a89",
"ModuleIndex": 1,
"PortIndex": 4
}
],
"StreamTargetList": [],
"AllTargetsSelected": false,
"FullInfo": "Stop Traffic",
"Operations": [],
"ItemId": "52ade31d-50b7-4f8b-a456-23d7dd3e73da",
"ParentId": ""
}
],
"ItemId": "66c608ed-98ab-4160-bf60-b3de90f6dfae",
"ParentId": "",
"FullInfo": "New Schedule 1"
}
专注有线以太网测试100年!(还差87年)
--Xena Networks.