magento troubleshoot: list all configurable products, whose stock status is wrong according to its associated simple products
This script lists all configurable products, which are "Out of Stock" and where at least one associated simple product is in stock. Additionally it lists configurable products, where the configurable product is set to "in stock" but none of the associated simple products are "in stock". When catalog is setup correctly, this script should return nothing.
<?php
require_once('app/Mage.php'); //Path to Magento