ある特定の時点でどのくらいのライセンスが使用されているかを知るには、下記のコマンドをライセンスサーバ上で使用します。
lmutil lmstat -a -c ポート番号@ライセンスサーバ名またはIPアドレス
ライセンスサーバのログファイルは、ライセンスの使用量を報告する為のものではないことにご注意下さい。
lmstat の出力は、次のようになります。
C:Flexlm>lmutil lmstat -a lmutil - Copyright (c) 1989-2003 by Macrovision Corporation. All rights reserved. Flexible License Manager status on Thu 1/1/2005 13:50 [Detecting lmgrd processes...] License server status: 8224@myserver License file(s) on myserver C:Licensesmylicensefile.txt: myserver: license server UP (MASTER) v9.2 Vendor daemon status (on mysever): armlmd: UP v9.2 Feature usage info: Users of rvd_arm: (Total of 10 licenses issued; Total of 1 license in use) "rvd_arm" v1.8, vendor: armlmd floating license ngnere clientpc CLIENTPC (v1.8) (myserver/8224 301), start Thu 1/1 14:01 Users of rvd_rtos: (Total of 10 licenses issued; Total of 0 licenses in use) Users of rvd_trace: (Total of 10 licenses issued; Total of 0 licenses in use) <etc>
たとえば、このコマンドを実行した時点では、全部で 10 個の"rvd_arm"ライセンスがインストールされていて、そのうちの一つが使われています。
このライセンスを使用しているのは、クライアントPC "clientpc" 上の "ngnere" というユーザです。
適切なスクリプトを作成することで、"lmutil lmstat -a" コマンドを定期的に実行し、その結果をテキストパーサで解析することも出来ます。
たとえば、ある一定期間にどのくらいのユーザがどのライセンスを使用したかを知ることも出来ます。
そのとき、ライセンスの使用状況を取得する頻度は、CPUの負荷を考慮に入れ決定しなければなりません。