Skip to main content

License Query

Overview

fsched supports real-time queries of cluster license usage status and user license allocations.

warning
  • A large number of concurrent queries may impact system performance. Since user license allocations are updated every 30 seconds, periodic queries should be at least 30 seconds apart.
  • list-user-lic-allocs consumes significant memory when there are many users and license types. Unfiltered queries can consume a large amount of memory in large clusters. Ensure the fsched server has enough memory, and reserve at least 2x memory for large-scale query operations. Memory usage reference by cluster size:
    • 1,000 users × 300 licenses = 300,000 records → about 121MB memory (recommend reserving 242MB)
    • 1,000 users × 500 licenses = 500,000 records → about 167MB memory (recommend reserving 334MB)
    • 1,000 users × 1,000 licenses = 1,000,000 records → about 335MB memory (recommend reserving 670MB)
    • 2,000 users × 1,000 licenses = 2,000,000 records → about 669MB memory (recommend reserving 1.3GB)
tip
  • All query commands support --help for detailed usage.
  • License names are normalized to lowercase in fsched.
  • Query results are based on real-time job data and the SLURM native API to ensure accuracy.
  • Data from different servers for the same license type is automatically aggregated.

User License Allocation Query

Function Description

The list-user-lic-allocs command queries user license allocation summaries and shows license requests for each user's running jobs. This feature is computed from real-time job data and reflects the current distribution of license usage among users in the cluster.

Key features:

  • Real-time calculation: based on currently running job data
  • Automatic aggregation: usage from different servers for the same license type is aggregated
  • Active filter: only records with license_count > 0 are shown
  • Cross-server aggregation: no client-side data merging needed

Query All User License Allocations

Query license allocations for all users in the current cluster:

./stateclient list-user-lic-allocs

Sample output:

Sending requests to server localhost:20051
User License Allocations (4):
========================================
User: alice
License: matlab
Count: 8
----------------------------------------
User: alice
License: ansys
Count: 3
----------------------------------------
User: bob
License: matlab
Count: 2
----------------------------------------
User: charlie
License: nastran
Count: 5
----------------------------------------

Parameters:

  • --user: filter by a specific username
  • --license: filter by a specific license type name

Cluster License Summary Query

Function Description

The list-cluster-lic-summaries command queries cluster license resource summary statistics and shows allocation summaries for each license type at the cluster level. This feature is based on SLURM's fsched_list_licenses API and provides authoritative license statistics.

Key features:

  • Authoritative data: obtained from the SLURM native API
  • Automatic aggregation: statistics from different servers for the same license type are aggregated
  • Global view: provides a complete view of license usage inside and outside the cluster
  • Resource monitoring: supports monitoring license quotas and actual usage

Query All License Summaries

Query summary statistics for all license types in the current cluster:

./stateclient list-cluster-lic-summaries

Sample output:

Sending requests to server localhost:20051
Cluster License Summaries (3):
========================================
License: matlab
Used: 125
Allowed: 180
Total Consumed: 770
----------------------------------------
License: ansys
Used: 30
Allowed: 50
Total Consumed: 45
----------------------------------------
License: nastran
Used: 15
Allowed: 100
Total Consumed: 85
----------------------------------------

Parameters:

  • --license: filter by a specific license type name

Field Descriptions

Used (Current Cluster Usage):

  • The number of licenses allocated to running jobs within the current cluster
  • Reflects actual license usage within the cluster

Allowed (Cluster Quota):

  • Total license quota allocated to the current cluster
  • Upper limit of licenses that cluster jobs can use

Total Consumed (Global Consumption):

  • Total actual license consumption including the current cluster and outside the cluster
  • Reflects actual usage on the license server