Listing Subscriptions with the Command Line

As with the three tabs in the UI, there are three different ways to use the list command to display different areas of the subscriptions and products on the system.

Table 14.5. subscription-manager list Options

Option Description
--installed (or nothing) Lists all of the installed and subscribed product on the system. If no option is given with list, it is the same as using the --installed argument.
--consumed Lists all of the subscriptions allocated to the system.
--available [--all] Using --available alone lists all of the compatible, active subscriptions for the system. Using --available --all lists all options, even ones not compatible with the system or with no more available quantities.
--ondate=YYYY-MM-DD Shows subscriptions which are active and available on the specified date. This is only used with the --available option. If this is not used, then the command uses the current date.
--installed Lists all of the products that are installed on the system (and whether they have a subscription) and it lists all of the product subscriptions which are assigned to the system (and whether those products are installed).

The list command shows all of the subscriptions that are currently allocated to the system by using the --consumed option.

[root@server1 ~]# subscription-manager list --consumed
+-------------------------------------------+
    Consumed Product Subscriptions
+-------------------------------------------+
ProductName:         Red Hat Enterprise Linux Server
ContractNumber:      1458961
SerialNumber:        171286550006020205
Active:              True
Begins:              2009-01-01
Expires:             2011-12-31

The list command shows all of the subscriptions that are compatible with and available to the system using the --available option. To include every subscription the organization has - both the ones that are compatible with the system and others for other platforms - use the --all option with the --available. The --ondate option shows only subscriptions which are active on that date, based on their activation and expiry dates.

[root@server1 ~]# subscription-manager list --available --all
+-------------------------------------------+
    Available Subscriptions
+-------------------------------------------+
ProductName:            RHEL for Physical Servers
ProductId:              MKT-rhel-server
PoolId:                 ff8080812bc382e3012bc3845ca000cb
Quantity:               10
Expires:                2011-09-20
ProductName:            RHEL Workstation
ProductId:              MKT-rhel-workstation-mkt
PoolId:                 5e09a31f95885cc4
Quantity:               10
Expires:                2011-09-20
[snip]

The --installed option correlates the products that are actually installed on the system (and their subscription status) and the products which could be installed on the system based on the assigned subscriptions (and whether those products are installed).

[root@server1 ~]# subscription-manager list --installed
+-------------------------------------------+
    Installed Product Status
+-------------------------------------------+
ProductName:         Red Hat Enterprise Linux
Status:              Not Subscribed
Expires:
Subscription:
ContractNumber:
AccountNumber:
ProductName:         Awesome OS Server
Status:              Not Installed
Expires:             2012-02-20
Subscription:        54129829316535230
ContractNumber:      39
AccountNumber:       12331131231