|
请使用QQ关联注册PLM之家,学习更多关于内容,更多精彩原创视频供你学习!
您需要 登录 才可以下载或查看,没有账号?注册
x
117. 如何查看我的 NX 许可证服务器上的许可证使用情况? 9 \1 {0 s- }% c( G4 O
问题/症状 C) O) a; @, x9 g; q
如何查看 NX 许可证服务器上的许可证使用情况?我目前的 NX 版本是 NX9 及以上版本. 1 b$ `% I! K% i6 x' `: {# A
解决方法 6 p6 A- S! u4 S* q8 o1 m0 y+ g
您把下面的文字做成一个批处理文件, 然后双击运行就能看到您的 NX 许可证服务器上的
# o: b) G9 ?* {9 P3 ~# ?4 m% c8 aNX 许可证的使用情况. + y; Z4 r5 m L! B% r" X
这个程序也可以在客户端运行,运行的时候, 我们假设您的下面 2 个环境变量已经在您的
: X# ^2 P. k3 x/ B9 X4 n+ i系统环境变量中设定好:
3 D& \# c7 @4 MUGII_BASE_DIR - x* N! z9 Q( ~4 h0 }- l& U
SPLM_LICENSE_SERVER
6 y/ ?: J3 V: s t. Y! U@echo off - O* S" Z, z& P) }! ~* ?& T
rem =========================================================================
: Y1 F4 j/ B- ]rem
4 |0 Y/ F6 i% B# [! x6 P0 @rem Copyright (c) 1996-2015 Siemens PLM Software.
) U/ g$ a& ` O6 D$ Vrem Unpublished - All rights reserved 3 ]9 Y6 [" g2 T2 |. `( m" a
rem /sar GTAC + X4 v& B) _6 `$ I4 z# F/ f) ]4 Z
rem =========================================================================
& X8 ~( x# w2 D0 ?9 erem
9 z. [; x: k- q$ o) q: m6 d# |rem File Name: LICENSECHECKV9.BAT
2 `/ j9 s; D8 r9 W- F/ [rem
6 y9 y4 S% S r8 O. J5 Drem ========================================================================= 4 X3 X [& x# d/ B: D
rem
) ~1 t, i- V1 v' Q, ~7 [rem This script will check what NX licenses are in use.
+ ^" ~5 c$ s j: r9 k3 s% \rem ; n* P6 \: u. _8 _8 ~6 @- W0 N. [, f
rem NOTE:
2 J/ Q! I1 @& wrem
# A( b7 Q0 l! n6 p6 i" Xrem This script assumes that UGII_BASE_DIR and SPLM_LICENSE_SERVER ; M$ @$ U, n$ e( O. l5 t3 W# P
rem are properly defined : X9 o. ^9 O+ Y, ^2 n# q% O
rem - F& f& Q; c& Y2 u+ G1 x
4 w( k# G- |5 ?6 C) Q4 r& s
REM To avoid double double quotes later, remove any quotes that " L6 D# S. R& F. K8 f
REM are part of the environment variable now 6 P2 \# U* B0 e+ n" ?
- r8 G/ P0 W) c, a( s/ N- |set UGII_BASE_DIR=%UGII_BASE_DIR:"=%
6 p: E1 s& g/ @, a* p& ^set SPLM_LICENSE_SERVER=%SPLM_LICENSE_SERVER:"=% 4 z$ ~. K6 E" F# x$ P |
REM
6 i3 ?# m! z2 C1 M* c8 D. nREM Check if UGII_BASE_DIR is defined.
6 b- x r+ F, W2 A' Q8 j8 | qREM
4 O1 D3 N3 r% p! k; k
& r- n" K- R8 lif not defined UGII_BASE_DIR ( * S. J, i2 F$ b( t
echo NX path could not be established. UGII_BASE_DIR not set. 2 z& ~8 M% K' b1 P* }& o( a- d( ?9 S
goto ERROR_EXIT ( h, u5 \" P& b$ l
) ELSE ( u5 q: k, a" X( e7 u7 b
echo NX path established. UGII_BASE_DIR=%UGII_BASE_DIR%
4 d0 l3 x* \7 f0 J7 y echo Checking for IN-USE NX Licenses...
$ ~. f! p( G- R$ J+ q echo. + ?9 \9 O4 P) n6 ]& N; n
echo.
7 R+ [7 o1 o% o3 |- F% f: d/ u8 i$ V% L* x# M/ x
REM
0 M+ r$ S- B8 RREM Check if UGII_BASE_DIR really points to a valid directory. ) L% Q! ^4 q0 R, J5 o
REM
1 V" K) ?( Q3 `- l" C) X1 j
1 C# ^, F7 @1 h if EXIST "%UGII_BASE_DIR%\ugii" ( 5 o) k$ A9 j6 ?4 g2 S1 |: r
set UGII_ROOT_DIR=%UGII_BASE_DIR%\ugii
3 _/ U* |6 U# R } ) ELSE ( 1 t8 j/ ]% m( ^* ]2 n. [
echo UGII_BASE_DIR set to invalid NX install.
- E g- w8 i! H5 Q" M% O goto ERROR_EXIT
8 M' _; U& H9 u8 l )
& V; L' ?2 a D) t" v) ; ~1 Q& _' n y @$ ~
p: L! [& Q9 Z1 m) q# O
REM
& `3 L0 [: s' M( z& |+ j x; l: [+ zREM Check for NX license server 6 d9 }7 F$ k) N
REM
W3 @0 \6 f8 [# v0 c9 y: r j, @
if not defined SPLM_LICENSE_SERVER (
- N# B' ?3 S* d echo ERROR: SPLM_LICENSE_SERVER is not defined.
, N. _6 l/ W3 j7 G: N( m: _ echo Current Setting: %SPLM_LICENSE_SERVER%
+ h7 N; a) B9 e/ [: N& D echo Check: SPLM_LICENSE_SERVER=28000@<server>.
" R3 h' B. O4 ]+ `( d3 U4 x8 W goto ERROR_EXIT & F D: o Q% H: S- b. y5 T; j
)
' V$ ^8 v8 c& c3 {& o' B1 Q' h% {0 r+ [. g
"%UGII_BASE_DIR%\ugflexlm\lmutil" lmstat -c %SPLM_LICENSE_SERVER% -A ! l% T9 S. |- f
% e8 i1 }% h9 B7 [, B# epause
* Q2 T; `: H" z- F1 b$ }* v& ?* Zgoto end
8 ?% s$ l% ^% X3 T" g8 }8 f" r:ERROR_EXIT
2 p+ y& J1 K9 ?# M+ becho.
L) j* K* m. M& Becho ERROR: Unable to check licenses. ) R! P$ e. W& k7 U; r7 z0 K. q
echo.
5 `! [; C! \1 J, spause
9 `, R; \; e8 O1 O" Y:end 3 I2 p5 _" Z0 i# F2 m
8 j4 U; R9 K; l$ ^) y |
|