Is it necessary to cut off PV from grid before measuring its power output?
This is just wrong, as if you disconnect the system from the grid, it won't be able to send out any current, and thus any power. So your reading would be 0Wh for the day.

To measure the power output, if it is before the inverter, you need to have DC current clamp using hall sensor to measure the currant, need to probe the voltage and have a device that will accumulate the power. Those are available on the market as DC power meter.

After the inverter, the principle is the same but you can use less expensive current clamps. If you have 3 phase you just need a power meter that can measure the three phases.



Note that the inverter is responsible to keep the system at it's maximum operating point "MPP" through a tracking algorithm "MPPT", some inverter are better than others, some might reduce power output because of heat or because of the grid feed-in conditions. 

The point being is that if you measure the power output before the inverter, you still have the influence of how well the inverter is doing it's MPPT and isn't purely the panels "potential" output.

Also note that you are dealing with voltage that can be up to 1'500V on a solar system, with high current, you should do so only if you have electrical background, or ask an electrician to do it.

Most inverter have digital data connection to which you could wire up a raspberry like device to gather data.