Block ids and SM ids

Is there any mechanism to get the ids of the currently activate SMs and possibly the ids of the blocks that are resident on a particular SM?

Thanks