Show online by user role

Hi.

Is it possible to show the online users by role on the homepage. We have users and service providers and we want to show the online service providers.

Thanks.