p4lang / tutorials

P4 language tutorials
Apache License 2.0
1.33k stars 878 forks source link

Way to disable the functionality to write the switch logging into a file? #533

Closed fengkeyleaf closed 10 months ago

fengkeyleaf commented 10 months ago

Good day,

I am testing my program with the Bmv2 model but the switch outputs the logging to a local log file, like s1.log, which will grow very large, like 8 ~ 9 GB, which would make the VM crash. So I wonder there is a way to turn off the logging? Or any recommended suggestions?

Also, there are two logging files as far as I know, one located at /tmp/p4s.s1.log, another located at /logs/s1.log. I could let the switch not output the logging into the second file by editing run_exercise.py , but I don't know how to deal with the first one.

Thanks,

jafingerhut commented 10 months ago

See a possible answer to your question here: https://forum.p4.org/t/running-p4lang-tutorials-with-no-logs-and-no-pcaps-generated/1022