the 'active' count is just this query:
SELECT count(*) as agent_count \
FROM device d \
WHERE d.is_deleted = 0 \
AND d.device_state_id = 50 \
AND d.agent_state_id = 100;
you could add the d.name column and take out the 'count'.
you could also create a similar report in bdssa.
You can include both the license report and the server list. On the server list,if required, you can further run some if loop to find the agent is alive.
blcli_execute Utility agentLicenseUsageReportByRelativeDateRange
SERVER_LIST=`blcli_execute Server listAllServers`
Rather than using an if loop, as Rajeev Gupta suggested, you could also create a Server Smart Group, with a filter of "Agent is alive", then use:
blcli_execute Server listServersInGroup <fully_qualified_group_name>
to generate your list.
Actually, if you have different platforms or different teams responsible for the servers, you might even look at breaking them down either via Smart Groups, or better still using BDSSA, as Bill suggested. Using this option, you could create a "Dashboard" report that shows the total number of licensed servers, with totals per platform / team, then offer a drill-down into each number to show the individual servers.