Query License Allocation
Fsched provides complete license query capabilities, supporting real-time monitoring of license usage from both user allocation and cluster summary perspectives. This helps administrators and users fully understand license resource status.
Notes
Important performance reminder
Query frequency limits:
- License allocation data is updated every 30 seconds; the recommended query interval is no less than 30 seconds
- Frequent queries may impact system performance; query as needed
Memory consumption warning:
The list-user-lic-allocs command may consume significant memory when there are many users and license types. Ensure sufficient memory is reserved:
| Cluster Size | Record Count | Estimated Memory | Recommended Reserved Memory |
|---|---|---|---|
| Small/Medium | 1,000 users × 300 licenses | ~121MB | 242MB |
| Medium | 1,000 users × 500 licenses | ~167MB | 334MB |
| Large | 1,000 users × 1,000 licenses | ~335MB | 670MB |
| Extra Large | 2,000 users × 1,000 licenses | ~669MB | 1.3GB |
Usage tips
- All commands support
--helpfor detailed instructions - Use filters to reduce data volume
- In production, set up query monitoring and alerts
Prerequisites
- License resources have been configured. See Configure License Scheduling
User License Allocation Query
Function Description
Command: list-user-lic-allocs
Core value:
- 📊 Real-time monitoring: dynamically calculated from running job data
- 🔄 Automatic aggregation: same license types across servers are automatically aggregated
- 🎯 Precise filtering: only shows licenses actually in use
- 💻 Simplified processing: no client-side data merging required
Data sources:
- Real-time job runtime data
- Active license allocations in the current cluster
- Automatic filtering of zero-usage records
Query All User Allocations
Basic command:
./stateclient list-user-lic-allocs
Sample output and analysis:
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
----------------------------------------
Interpretation:
- User alice: 8 MATLAB licenses + 3 ANSYS licenses
- User bob: 2 MATLAB licenses
- User charlie: 5 NASTRAN licenses
- Total: 4 active allocation records
Filtered Queries
Filter by user:
# Query license allocations for a specific user
./stateclient list-user-lic-allocs --user alice
Sample output:
User: alice
License: matlab
Count: 8
----------------------------------------
User: alice
License: ansys
Count: 3
----------------------------------------
Filter by license type:
# Query usage for a specific license type
./stateclient list-user-lic-allocs --license matlab
Sample output:
User: alice
License: matlab
Count: 8
----------------------------------------
User: bob
License: matlab
Count: 2
----------------------------------------
Combined filters:
# Query a specific license used by a specific user
./stateclient list-user-lic-allocs --user alice --license ansys
Cluster License Summary Query
Function Description
Command: list-cluster-lic-summaries
Core value:
- 🏛️ Authoritative data: based on SLURM native
fsched_list_licensesAPI - 🌐 Global view: provides complete license usage inside and outside the cluster
- 📈 Resource monitoring: supports quota and utilization monitoring
- 🔗 Automatic aggregation: license data across servers is automatically merged
Data sources:
- SLURM core license management API
- Real-time license server status
- Usage statistics inside and outside the cluster
Query Cluster Summary
Basic command:
./stateclient list-cluster-lic-summaries
Sample output and deep analysis:
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
----------------------------------------
Field Details
Used (Current Cluster Usage)
- Definition: number of licenses allocated to running jobs within the current cluster
- Calculation: ∑ (licenses requested by all running jobs)
- Monitoring focus: actual usage inside the cluster
- Example: MATLAB has 125 licenses in use by cluster jobs
Allowed (Cluster Quota)
- Definition: total license quota allocated to the current cluster
- Configuration source: License Allocation management settings
- Business meaning: maximum number of licenses cluster jobs can use
- Example: MATLAB quota is 180; ANSYS quota is 50
Total Consumed (Global Consumption)
- Definition: total actual license consumption including the current cluster and outside the cluster
- Data source: real-time monitoring of license servers
- Business meaning: reflects true pressure on license resources
- Example: MATLAB total consumption is 770, meaning external systems used 645
Filtered Queries
Filter by license type:
# Query summary information for a specific license type
./stateclient list-cluster-lic-summaries --license matlab
Sample output:
License: matlab
Used: 125
Allowed: 180
Total Consumed: 770
----------------------------------------
Use Cases and Best Practices
Daily Monitoring
Resource utilization monitoring:
# Daily resource usage check
./stateclient list-cluster-lic-summaries
# Calculate utilization: Used / Allowed × 100%
# MATLAB: 125/180 = 69.4% utilization
# ANSYS: 30/50 = 60% utilization
User behavior analysis:
# Monitor high-consumption users
./stateclient list-user-lic-allocs | sort -k6 -nr
Capacity Planning
Quota adjustment decisions:
# Analyze quota usage
./stateclient list-cluster-lic-summaries --license ansys
Decision basis:
- Sustained utilization >80% → consider increasing quota
- Total Consumed close to total licenses → consider purchasing more licenses
Troubleshooting
Resource contention analysis:
# Check which users are consuming many resources
./stateclient list-user-lic-allocs --license matlab
# Verify cluster quota settings
./stateclient list-cluster-lic-summaries --license matlab