Comments (7)
Are you using the p4lang/tutorials Github repo code to run BMv2?
Are you running simple_switch_grpc command yourself, supplying all command line options?
Something else?
from p4-guide.
Are you using the p4lang/tutorials Github repo code to run BMv2?
Are you running simple_switch_grpc command yourself, supplying all command line options?
Something else?
Oh, sorry about not mentioning this.
I am using the tutorials Github repo code to run BMv2.
from p4-guide.
I do not know how to do this off the top of my head. The tutorials repository has a fair amount of Python code that is executed when you do make run
in the tutorials/utils directory, which uses a Python library provided by the Mininet package for creating the simulated networks of multiple switches and hosts. I am not familiar enough with that Mininet Python library and what options it provides to know what should be changed to avoid logging to file, but this line of code looks like it is related: https://github.com/p4lang/tutorials/blob/master/utils/run_exercise.py#L94
I did a quick experiment by locally editing the tutorials/utils/run_exercise.py file as shown in the diff output below, and when I did make run
the next time it did not create any log files with names like logs/s1.log
:
diff --git a/utils/run_exercise.py b/utils/run_exercise.py
index 44c8ff6..780131d 100755
--- a/utils/run_exercise.py
+++ b/utils/run_exercise.py
@@ -91,7 +91,7 @@ class ExerciseTopo(Topo):
else:
# add default switch
switchClass = None
- self.addSwitch(sw, log_file="%s/%s.log" %(log_dir, sw), cls=switchClass)
+ self.addSwitch(sw, cls=switchClass)
for link in host_links:
host_name = link['node1']
from p4-guide.
I do not know how to do this off the top of my head. The tutorials repository has a fair amount of Python code that is executed when you do
make run
in the tutorials/utils directory, which uses a Python library provided by the Mininet package for creating the simulated networks of multiple switches and hosts. I am not familiar enough with that Mininet Python library and what options it provides to know what should be changed to avoid logging to file, but this line of code looks like it is related: https://github.com/p4lang/tutorials/blob/master/utils/run_exercise.py#L94I did a quick experiment by locally editing the tutorials/utils/run_exercise.py file as shown in the diff output below, and when I did
make run
the next time it did not create any log files with names likelogs/s1.log
:diff --git a/utils/run_exercise.py b/utils/run_exercise.py index 44c8ff6..780131d 100755 --- a/utils/run_exercise.py +++ b/utils/run_exercise.py @@ -91,7 +91,7 @@ class ExerciseTopo(Topo): else: # add default switch switchClass = None - self.addSwitch(sw, log_file="%s/%s.log" %(log_dir, sw), cls=switchClass) + self.addSwitch(sw, cls=switchClass) for link in host_links: host_name = link['node1']
Thanks , I will give a try to see if it works or not.
from p4-guide.
I do not know how to do this off the top of my head. The tutorials repository has a fair amount of Python code that is executed when you do
make run
in the tutorials/utils directory, which uses a Python library provided by the Mininet package for creating the simulated networks of multiple switches and hosts. I am not familiar enough with that Mininet Python library and what options it provides to know what should be changed to avoid logging to file, but this line of code looks like it is related: https://github.com/p4lang/tutorials/blob/master/utils/run_exercise.py#L94I did a quick experiment by locally editing the tutorials/utils/run_exercise.py file as shown in the diff output below, and when I did
make run
the next time it did not create any log files with names likelogs/s1.log
:diff --git a/utils/run_exercise.py b/utils/run_exercise.py index 44c8ff6..780131d 100755 --- a/utils/run_exercise.py +++ b/utils/run_exercise.py @@ -91,7 +91,7 @@ class ExerciseTopo(Topo): else: # add default switch switchClass = None - self.addSwitch(sw, log_file="%s/%s.log" %(log_dir, sw), cls=switchClass) + self.addSwitch(sw, cls=switchClass) for link in host_links: host_name = link['node1']
It seems that the switch outputs the logging into another file named p4s.s1.log, which is located in /tmp. I think it's very difficult to turn the logging off at this point.
from p4-guide.
If you avoid using mininet, and run simple_switch_grpc
directly, you have complete control of the logging on or off, and whether it goes (a) nowhere, (b) to a file, or (c) to the console.
I am less familiar with mininet and all of its options and how to control them. You should consider asking people more familiar with mininet, and/or try asking your question on https://forum.p4.org, to see if someone there knows how to do what you wish.
from p4-guide.
If you avoid using mininet, and run
simple_switch_grpc
directly, you have complete control of the logging on or off, and whether it goes (a) nowhere, (b) to a file, or (c) to the console.I am less familiar with mininet and all of its options and how to control them. You should consider asking people more familiar with mininet, and/or try asking your question on https://forum.p4.org, to see if someone there knows how to do what you wish.
Thanks for your suggestions.
from p4-guide.
Related Issues (20)
- make run error creating error interface HOT 2
- ImportError cannot import name 'cygrpc' when running runptf.sh in demo1 HOT 3
- Can not complied with the optimization flags
- py3localpath.py prints incomplete output HOT 4
- how can i solve this problem HOT 3
- how can i solve this problem? HOT 4
- After I run the install script,I can't cd p4c/build and make HOT 4
- [Question]A question about lpm HOT 2
- Error running rundemo.sh & rundemo_TAP_IO.sh for IPDK_Native HOT 5
- What are the differences between the P4-DPDK Target and BMv2? HOT 2
- Is it possible to create two p4-DPDK-targets at the same time in the Docker? HOT 3
- Hunk failed while installing HOT 2
- how can i solve this problem HOT 2
- V7 Install script fails. Thrift headers not found HOT 5
- buffer usage measurement in PSA HOT 1
- Test whether these operations work in P4 DPDK HOT 1
- [Question] Build error (potentially) due to version format in version file and Makefile processing HOT 6
- Build error running packetinout ptf test HOT 10
- Add note in README-install ... docs that install scripts should be run on VM-local file system, not in directory shared with host OS HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from p4-guide.