Reserving licensesYou can customize out-of-the-box licensing to make sure that certain people always have access to a user license, or that a particular server always has access to a build license. You can reserve licenses, both fixed and individual, to set up a combination that best suits your needs. A "fixed" license is one that has a long linger time, generally two weeks (1,209,600 seconds). A individual license has a shorter linger time, generally a 7 day (604,800 second) linger. "Linger" is the amount of time after the last use of a license before it is free for another user to check out. Note that these linger times start at the end of the inactivity time-outs that some Klocwork components have. For information about inactivity timeouts, see How licensing works. In the rest of this article, build and user licenses are used in examples, but if you are licensed for Klocwork Code Review, you may also want to reserve the code review feature. What are your needs?The following are some licensing scenarios to help you think about what kind of licensing combination you need. The scenarios assume a deployment large enough that there is a separation between the roles of the Klocwork administrator and the Klocwork user. Scenario 1: Fixed build license, individual user licensesYour circumstances You know how many Klocwork build engineers (or build servers) need to have fixed build licenses and you know who (or which ones) they are. You probably have a large number of Klocwork users who will use Klocwork at various times. The setup The setup is a combination of fixed build licenses, reserving build licenses for the Klocwork build tools, and individual user licenses for users. You can reserve either fixed or individual licenses for:
Results
Scenario 2: Fixed for everybodyYour circumstances You know how many build engineers (or build servers) need to have reserved build licenses, and you know who they are. You know how many users need to have reserved user licenses, and you know who they are. It is a relatively small, stable group. The setup Your options file will reserve fixed licenses for each user or machine. You may set them up, particularly the build engineers, as groups in your options file. Results
What you need to doTo reserve licenses to suit your needs, you need to:
Note: You can find more information about options files and FlexNet Publisher in general in the FlexNet Publisher documentation.
Sample license fileThe format for parts of the INCREMENT section relevant to the options file is:
INCREMENT <feature name> klocwork <version> <expiration> <number of licenses VENDOR_STRING=<vendor string value>where
The following are three sample INCREMENT sections from a Klocwork license file: five fixed build licenses:
INCREMENT fixserver2017 klocwork 18.1 permanent 5 \
VENDOR_STRING=KW-1151-004;-1;1209600;opt;ha BORROW SUPERSEDE \
DUP_GROUP=H SUITE_DUP_GROUP=H ISSUER=sjasmann \
ISSUED=14-Jan-2017 START=14-Jan-2017 SIGN="1035 87AB 3150 5376 \
A945 26BA FEAA B215 CD2F 1966 A008 72CA FAAC F516 2F1B 16AD \
AA3E 9AA8 9462 D2A4 B6D4 8E77 75D9 3A77 3470 A7FD 5B38 A58B \
A92E EB0E"
100 individual user licenses:
INCREMENT client klocwork 18.1 permanent 100 \
VENDOR_STRING=KW-1151-004;-1;600;opt;ha BORROW SUPERSEDE \
DUP_GROUP=U SUITE_DUP_GROUP=U ISSUER=sjasmann \
ISSUED=14-Jan-2017 START=14-Jan-2017 SIGN="12D1 EA99 37CA ED93 \
CF05 26DE B2E7 95E5 8BD7 680B CB55 1099 4CA0 DB8F 107E 0975 \
2741 E186 13EB 6A09 9970 C771 C429 E474 60FA DE62 97AC B544 \
4C2F 9376"
Klocwork Static Code Analysis license:
INCREMENT review10 klocwork 18.1 22-Jan-2017 100 \
VENDOR_STRING=klocwork;-1;604800;opt;ha BORROW DUP_GROUP=U \
ISSUER=tadebayo ISSUED=22-Jan-2017 START=22-Jan-2017 \
SIGN="0972 9ACC A759 D36D C8E3 1EE4 5510 A3F5 07A5 E384 0921 \
65AE B418 F4EB CE58 1484 D369 4FF5 89E7 CEC0 2438 A436 5016 \
F029 7D54 21B0 2537 03E3 6A20 D2C7"
Back up your license fileIt is easy to accidentally corrupt the Klocwork license file. Before you begin, make a copy of your license file as a backup and put it in a safe place. If the copy of the license file you are working on becomes corrupt, restore the backup license file and restart the license server. Create an options fileCreate a blank text file called klocwork.opt in the following directory:
<projects_root>/licensesThis file must be in the same directory as your Klocwork license. Copy, paste, and replaceTo reserve licenses, you can copy a template line of text into your options file and change it to suit your situation. The Template table below gives you lines to choose from. You can either enter text into the options file or you can copy and paste text into it. If you want to cut and paste the vendor string from your Klocwork license, use the working copy you made. Important:
The following examples show you how to choose a line and make the changes. Note: The label used for the license type may differ in your license file. The examples here use "fixserver2017", "server", "fixclient2017" and "client". Your license file may use other labels. It is important that your options file uses the same license type label as your license file.
Reserving one licenseTo reserve one build license:
Note:
Reserving multiple licensesYou can reserve more than one license for the user, machine or group specified in the RESERVE line. To reserve more than one license:
Setting up a group of users or machinesIf you don't want to add all users line-by-line, define a group and refer to the group instead. You can do this by copying lines of text from the Template table (below) or by entering text as follows: To define a group of people, add the following line to your options file:
GROUP <group_name> <user_list>where
GROUP BuildTeam amichaels fyassin jlee jsmith mwashingtonTo reserve a number of build licenses for a group:
GROUP BuildTeam amichaels fyassin jlee jsmith mwashington RESERVE 5 fixserver2017:VENDOR_STRING=KW-005-001;-1;1209600;opt;ha GROUP BuildTeam Groups of machinesYou can also define a group of machines by using the HOST_GROUP keyword instead of the GROUP keyword, followed by a list of host names separated by spaces. For example:
HOST_GROUP BuildHosts 192.168.0.101 buildmachine06 192.168.0.102 northserver Multiple groupsYou can set up multiple groups, each with its own RESERVE line. For example:
RESERVE 5 fixserver2017:VENDOR_STRING=KW-005-001;-1;1209600;opt;ha GROUP BuildTeam RESERVE 5 client:VENDOR_STRING=KW-006-001;-1;600;opt;ha GROUP DevGroup RESERVE 10 client:VENDOR_STRING=KW-006-001;-1;600;opt;ha HOST_GROUP RemoteGroupIn this example:
Template tableYou can copy one or more lines from the following table and paste them into your options file. Replace the vendor string with your own vendor string, and make any other changes that you need. To reserve fixed licenses, use your vendor string that has the large number. To reserve individual licenses, use your vendor string that has the small number. To reserve more than one license, change the number after the RESERVE keyword (or replace <number of licenses>). Note: The label used for the license type may differ in your license file. The example here use "fixserver2017", "server", "fixclient2017", and "client". Your license file may use other labels. It is important that your options file uses the same license type label as your license file.
Additional FlexNet Publisher keywords for further customizationTo customize your license in other ways, you may want to use some of the following FlexNet Publisher keywords. For more information, see the FlexNet Publisher 2016 (11.14.1) License Administration Guide, available from Klocwork Customer Support or from Flexera Software.
Add the path to the options file to your license fileYou must add the path to the options file to your license file so that the License Server can find it. You change the original Klocwork license in the projects_root. To enter a path to the options file into your Klocwork license:
Note: The Klocwork license is sensitive to the end-of-line character sequence. If you restart Klocwork and see the message "Invalid license", try a different text editor. If trying a different text editor doesn't solve the problem, contact Klocwork Customer Support.
Start or re-start the Klocwork serversAfter you create or modify an options file, you must start or restart the Klocwork servers for the changes to take effect. For instructions, see Managing the Klocwork Servers. Check the License Manager log file to test your options fileTo make sure that the reservation is successful, check <projects_root>/logs/license.log for the RESERVING message. On success, the log file says:
RESERVING 1 <featurename>/<signature> license for <type> <val>On failure, the log file indicates any errors in the options file. Important: If the RESERVE line does not match any licenses through the vendor string, the License Server does not report an error and does not reserve a license.
Example output 9:58:22 (klocwork) FlexNet Publisher 2016 version 11.14.1 9:58:22 (klocwork) Using options file: "C:\Program Files\Klocwork_12.x.x.x\projects_root\licenses\options.opt" 9:58:23 (klocwork) Server started on jlee03 for: server 9:58:23 (klocwork) RESERVING 1 fixserver2017/162E 9578 7E98 1481 license for HOST jlee01 9:58:23 (klocwork) OUT: "fixserver2017" jlee@lee01 9:58:54 (klocwork) OUT: "fixserver2017" jlee@jlee01 9:59:34 (klocwork) IN: "fixserver2017" jlee@jlee01 10:05:34 (klocwork) IN: "fixserver2017" jlee@jlee01 |