The usual problem with scoping the mains supply safely is the risk of a significant potential difference between Neutral and Ground, possibly caused by a fault outside your control and maybe even not on your property, and the risk of dangerous high voltage transients on the incoming supply.
In a single dwelling, entirely off-grid situation neither of those apply, (unless your panels are struck by lightning, which will probably blow up the whole system and all connected loads etc.) and provided you test Line with respect to Ground, not Neutral, do so near to the system's Neutral to Ground bond, and use an appropriately rated x100 HV probe (CAT III or better), it should even be safe to power the scope from the supply you are testing, so you can do some long-term data logging.
However I would *NOT* like to attempt such a measurement with a budget USB or other software controlled scope, as its input coupling capacitor is almost certainly not rated for mains across it, and to safely attenuate a voltage exceeeding the max. input rating, the probe *REQUIRES* that the scope input *ALWAYS* presents a 1Meg DC resistance to ground, which many do not do when AC coupled. You are therefore one click or software glitch away from blowing the scope input. Due to the x100 probe's very high series resistance, you'll *probably* get away with it on a purely AC source, and if you do blow the scope, its unlikely to damage anything else. If your scope is rated for 100V or higher input voltage, connecting the probe via a BNC T, and wiring a NE2 neon bulb directly across the other arm of the T will provide extra protection for its input when using a x10 or x100 probe, as a NE2 neon typically strikes at under 100V, without affecting low frequency measurements. If like many cheap USB scopes, its only rated for +/- 30V or 50V you are out of luck - one mistake and it will let out the holy smoke and join the choir invisible.
However brand-name* CAT III rated x100 probes don't come particularly cheap, and you'd probably be better off splashing the cash on a low end (limited bandwidth) isolated differential HV probe, which will guarantee there are no hazardous voltages on the scope side of it.
* When a fake or faulty probe could be lethal, buying an off-brand probe or one from EBAY etc. wolld be rather unwise.