Summary
Below is an example of the code that can be added to get the below details:
- Checked out date and time
- User who made the checkout
- Number of licenses checked out
- Name of the feature
- Count of available license
- Count of used license
- Type of the feature
(void)lc_set_attr(lm_job, LM_A_LICENSE_DEFAULT, (LM_A_VAL_TYPE)LICPATH);
for (feats = lc_feat_list(lm_job, LM_FLIST_ALL_FILES | LM_FILTERLIST_ALL_FILES, NULL); feats && *feats; feats++)
{
confi = lc_get_config(lm_job, *feats);
if(confi->idptr && confi->idptr->id.data)
printf(" This feature is node-locked \n\n");
else
printf(" The feature is floating \n\n");
if (confi->users)
{
c = (CONFIG *)0;
for (conf = lc_next_conf(lm_job, *feats, &c); conf; conf=lc_next_conf(lm_job, *feats, &c))
{
fi.feat = conf;
if (lc_get_attr(lm_job, LM_A_VD_FEATURE_INFO, (short *)&fi))
{
lc_perror(lm_job, "LM_A_VD_FEATURE_INFO");
}
else
{
total_lic = fi.num_lic;
used_lic = fi.tot_lic_in_use;
aval_lic = total_lic - used_lic;
printf("Total number of licenses are %s = %d \n",feature, total_lic);
printf("Available Count of licenses are %s = %d \n",feature, aval_lic);
}
}
}
else
printf(" This feature is uncounted \n");
printf("##############################\n");
printf ("List of Users for Feature: %s\n",*feats);
printf("##############################\n");
LM_USERS * pUserList = lc_userlist(lm_job, *feats);
while (pUserList)
{
time_t currTime, difftime;
char *sTime = malloc(50 * sizeof(char));
struct tm *localtime(), *currt, *t;
if (strlen(pUserList->name) > 0)
{
int day = 0, hour = 0, minute = 0, second = 0;
currTime = time(0);
printf("User: %s Node: %s Licenses: %d \r\n", pUserList->name, pUserList->node, pUserList->nlic);
t = localtime(&pUserList->time);
printf("Checkout Done At - %02d/%02d %2d:%02d:%02d\n",
t->tm_mon + 1, t->tm_mday, t->tm_hour, t->tm_min,
t->tm_sec);
difftime = (currTime - (pUserList->time));
printf("Checked out from last - %02d days", ((difftime / 86400)));
difftime %= 86400;
printf("% 02d hours", (difftime / 3600));
difftime %= 3600;
printf("% 02d minutes", (difftime / 60));
difftime %= 60;
printf("% 02d seconds\n\n", difftime);
}
pUserList = pUserList->next;
if (pUserList && (!pUserList->name || strlen(pUserList->name) == 0))
pUserList = NULL;
}
}
printf("##############################\n");
printf("press return to exit...");
Was this helpful?
Related Articles
Sample Code/API To Get Content Of License File Which The License Server (lmgrd/ansyslmd) Is Using 8Number of Views An Extra License is Checked Out When a Client Machine Reconnects to Network. 16Number of Views How Can a Client Program Determine That a Feature Was Checked Out From a FlexID Dongle? 7Number of Views Ensuring Every Component Is Checked Out from Same Package 12Number of Views Sample code to allow checkout based on license file and trusted storage model 7Number of Views
Revenera Assistant
Online
Hi, I am Reva - Ask me anything.
Updates
No new updates
Chat
Home
Updates
/**/
Thanks for the feedback!
Your feedback has been saved.Rate this response:
1
2
3
4
5
Add Additional feedback ( Optional )
0/240
English
English
Language changed successfully
Something went wrong
Email sent successfully
Something went wrong
Case create successfully
Are you sure you want to cancel
the case creation?
Please select a product to submit the case.
Please select a product version to submit the case.
0/255
Upload Attachment
File Upload
Maximum file
size allowed is 3 MB.
File type
not supported.
Supported file types:
Documents (.txt, .doc, .docx, .pdf), Images (.jpg, .png), Comma Separated Files
(.csv) Speadsheets (.xlsx, .xls)
Are you sure you want to cancel the case creation?
Case closed successfully
File Upload
Maximum file size allowed is 3 MB.
File type not supported.
Supported file types:
Documents (.txt, .doc, .docx, .pdf), Images (.jpg, .png), Comma Separated Files
(.csv) Speadsheets (.xlsx, .xls)
Are you sure you want to close this case
| Products | Region | Phone Numbers |
|---|---|---|
| FlexNet Operations FlexNet Embedded FlexNet Publisher FlexNet Connect FlexNet Code Insight InstallAnywhere InstallShield |
North America * |
+1 630-332-2513 (toll) +1 877-279-2853 (toll-free in North America) |
| Europe * |
+44 1925 944367 (toll) +44 800 047 8642 (toll-free in Europe) |
|
| Japan * | +81 3-4540-5335 (select option 2) | |
| Australia * |
+61 3 9895 2177 +61 1800 560 603 (toll-free in Australia) |
|
|
Usage Intelligence (formerly
Revulytics) Compliance Intelligence |
Please use the Case Portal to submit your support ticket or reach out to your Revenera contact. | |
File Upload
Maximum file
size allowed is 3 MB.
File type
not supported.
Supported file types:
Documents (.txt, .doc, .docx, .pdf), Images (.jpg, .png), Comma Separated Files
(.csv) Speadsheets (.xlsx, .xls)
© 2026 Flexera Software. All Rights Reserved.
Case id: 00001065
Activity: Status change: 2 hours ago