How do I figure out which subscriptions have been consumed by clients registered under Red Hat Subscription Manager?

Solution Verified - Updated

Environment

  • Red Hat Subscription Manager
  • Red Hat Customer Portal

Issue

  • How do I figure out which subscriptions have been consumed by clients registered under Red Hat Subscription Manager via command line?
  • One of the subscriptions is missing from the available subscription pool, how do I figure out which client has consumed it?

Resolution

  • There is no command line option for fetching a list of all clients and the subscriptions consumed by them, but there is a python script which can be executed to list all the clients registered against which subscription under the Red Hat Subscription Manager.
    -Download the rhsmShowConsumerSubs.py script attached to this article on a client registered under Red Hat Subscription Manager and run it:
  # python rhsmShowConsumerSubs.py -l <Your Customer portal login_ID> 

Example output :

$./rhsmShowConsumerSubs.py -l rh_user_account
Attempting to connect: https://subscription.rhn.redhat.com/subscription/users/rh_user_account/owners/
Attempting to connect: https://subscription.rhn.redhat.com/subscription/owners/1234567/consumers/
Name, Consumer Type, Contract Number, Product Name, Start Date, End Date, Quantity, Last Checkin, Username
My_Satellite_App,satellite,12345678,Red Hat Enterprise Linux Server, Premium (Physical or Virtual Nodes),2014-10-08T04:00:00.000+0000,2015-10-08T03:59:59.000+0000,13,2015-08-02T10:42:24.000+0000,admin_user
My_Satellite_App,satellite,12345678,Red Hat Enterprise Linux Server, Standard (Physical or Virtual Nodes),2014-10-08T04:00:00.000+0000,2015-10-08T03:59:59.000+0000,24,2015-08-02T10:42:24.000+0000,admin_user
My_Satellite_App,satellite,12345678,High Availability,2014-10-08T04:00:00.000+0000,2015-10-08T03:59:59.000+0000,10,2015-08-02T10:42:24.000+0000,admin_user
system1.example.org,system,12345678,Red Hat Satellite,2014-10-08T04:00:00.000+0000,2015-10-08T03:59:59.000+0000,10,2015-08-02T10:42:24.000+0000,admin_user
system2.example.net,system,12345678,Red Hat Satellite,2014-10-08T04:00:00.000+0000,2015-10-08T03:59:59.000+0000,10,2015-08-02T10:42:24.000+0000,admin_user
  • After execution, the script will list the system profiles and the subscriptions which are consumed by them. Once you find the name of the profile which is consuming the missing subscription, you may log in to the This content is not included.Red Hat Subscription Manager to search the name of the profile, check the profile details for the system, and remove the subscription from it.
  • Once the subscription is removed you can run the following command to list the available subscriptions to confirm whether the subscription is available:
 # subscription-manager list --available --all
SBR

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.