GeniDesktop/Manual/gdfeatures/CLI: gdcli_win.bat

File gdcli_win.bat, 1.2 KB (added by Hussamuddin Nasir, 5 years ago)
Line 
1@echo off
2
3if -%1-==-- echo "USAGE: gdcli_gec23.bat <ProjectName> <SliceName>" & exit /b
4if -%2-==-- echo "USAGE: gdcli_gec23.bat <ProjectName> <SliceName>" & exit /b
5
6set SLICENAME=%2
7set PROJECTNAME=%1
8
9echo Change to GDCLI Directory
10cd \GDCLI
11echo Performing GDCLI operation ^for SLICE=%SLICENAME% PROJECT=%PROJECTNAME%
12
13echo Running List nodes command
14gdcli listnodes -s %SLICENAME% -r %PROJECTNAME%
15
16echo Installing iperf on all nodes
17gdcli run -s %SLICENAME% -r %PROJECTNAME% -n "node-0,node-1" -c "sudo apt-get -y update;sudo apt-get -y install iperf"
18
19echo Starting iperf server in daemon ^mode on node-0
20gdcli run -s %SLICENAME% -r %PROJECTNAME% -n "node-0" -c "iperf -s -D> /dev/null 2>&1"
21
22echo Starting iperf client on node-1
23echo Connecting to node-0 blasting traffic ^at 10Gb/s ^for 30 seconds
24gdcli run -s %SLICENAME% -r %PROJECTNAME% -n "node-1" -c "iperf -t 30 -c node-0 -b 10000M"
25
26echo Fetch graph ^for data collected on link ^at interface on node-0
27gdcli getpng -s %SLICENAME% -r %PROJECTNAME%  -g linkbytes -l link-0 -n node-0 -o %userprofile%\Desktop\mygraphs
28
29echo Opening Folder to view graphs just downloaded
30cd %userprofile%\Desktop\mygraphs
31explorer .