Sort by blocks for temp_usage script