I have cacti with a lot of graphs (interface statistics) and I need show the difference between two of them. Something like traffic=traffic1-traffic2 where traffic1 and traffic2 are interfaces on two separate switches.
Is it possible?
Yes, its possible. For a good example of a similar, but not exactly the same, howto read the following thread and examples:
Yes. You need to create a custom cdef.
Assuming the DEFs are as such Total = a Used = b The cdef=a,b,- should do. It is position dependant; that's bad. But the cure, a COMPUTE data source, will not be introduced until cacti 088 Reinhard
Go to Graph Management->CDEFs
Take a look at
Total All Data Sources
x Negate CDEF