Under certain scenarios EX series devices may report /var partition high utilization when using mxoc_agentd.py configuration on Mist
After checking, around 106% utilization under /var is being reported
-We found some files consuming a huge amount of storage, all the main logging in that file comes from the following configuration:
set system extensions extension-service application file mxoc_agentd.py traceoptions file mxoc_agentd.log
set system extensions extension-service application file mxoc_agentd.py traceoptions flag all
You can trace files over /var using the following commands:
root@jtac-EX> start shell user root
root@jtac-EX:RE:0% cd /var
root@jtac-EX:RE:0% find . -type f -size +1024 -exec ls -al {} \;
root@jtac-EX:RE:0% cd /var/xxxxxx
root@jtac-EX:RE:0% ls -lash
-Those commands specify the extension service application called mxoc_agentd.py that Junos runs and mxoc_agentd.log is simply the file where the trace logs are being written to. Why is the file growing quick? Because the extension service application mxoc_agentd.py is very active and thus, producing a high volume of trace logs by flagging all.
-To prevent the file from growing that large, you can delete it as we did or modify it’s config. E.g capture only important events:
{master:0}[edit]
root@jtac-EX# set system extensions extension-service application file mxoc_agentd.py traceoptions flag ?
Possible completions:
all Trace all operations
events Trace important events
input Trace script input data
offline Generate data for offline development
output Trace script output data
rpc Trace script RPCs
xslt Trace the XSLT library
- Alternatively flag all still, but set a max size and amount of files:
set system extensions extension-service application file mxoc_agentd.py traceoptions file size 1m
set system extensions extension-service application file mxoc_agentd.py traceoptions file files 5