|
|
请使用QQ关联注册PLM之家,学习更多关于内容,更多精彩原创视频供你学习!
您需要 登录 才可以下载或查看,没有账号?注册
x
117. 如何查看我的 NX 许可证服务器上的许可证使用情况? 8 P9 E! t& z- J& h7 t
问题/症状
( v: B! ?2 C+ v% e0 _如何查看 NX 许可证服务器上的许可证使用情况?我目前的 NX 版本是 NX9 及以上版本. . @* ~9 E& A' ^! k O% ~: N ?
解决方法 $ W0 a$ L; c: [6 S; C. ?
您把下面的文字做成一个批处理文件, 然后双击运行就能看到您的 NX 许可证服务器上的
+ l9 }) p: G' x: s# K/ jNX 许可证的使用情况.
: N8 A2 s8 l% V5 @5 P2 U) [这个程序也可以在客户端运行,运行的时候, 我们假设您的下面 2 个环境变量已经在您的
1 Y: }3 o! ^1 Q8 Q) `7 x, A0 S系统环境变量中设定好: 5 d3 g9 m7 t8 P" A* L
UGII_BASE_DIR
9 \6 X1 c9 \: lSPLM_LICENSE_SERVER
9 T( ~* y; I% a- y/ z* N. J@echo off
; j8 T& _+ t) p ] zrem ========================================================================= . {* B, D& N2 c% U: S) ~
rem
8 ^0 a) c) E0 nrem Copyright (c) 1996-2015 Siemens PLM Software. . C5 }* M, T. u' `8 w
rem Unpublished - All rights reserved
2 y/ W8 [% |7 r: _) @+ {rem /sar GTAC
5 y. N& I }2 a9 y" \: |rem ========================================================================= , T$ w1 N* |+ G2 n
rem
, ?( I$ Z: u2 @4 F% l* k* Orem File Name: LICENSECHECKV9.BAT
. F; Y$ ^2 s, o5 f) ]7 m$ hrem
9 X0 i. p: l/ a4 Z8 Irem =========================================================================
3 l6 }9 i% x5 rrem " i; J3 ]/ q- |5 J2 P( h' E) k
rem This script will check what NX licenses are in use.
- {; n+ q) C; `4 [# v* c Lrem / U* ?1 t: r4 F
rem NOTE: % U. A: F6 O% T$ I$ ]
rem : w" s: A$ Z; R
rem This script assumes that UGII_BASE_DIR and SPLM_LICENSE_SERVER / U( T- ^; ~! a
rem are properly defined 4 O/ i3 m8 l; e7 D' E
rem
! }! |, r& @+ V2 M u. X$ ?
( L, h% d' j( G, OREM To avoid double double quotes later, remove any quotes that " e% i8 D s' K8 d$ n
REM are part of the environment variable now " {9 q7 B2 N8 l: G
/ r# a( v: ^0 M. D! x+ ^: G
set UGII_BASE_DIR=%UGII_BASE_DIR:"=% , F4 W3 N. b$ c | R5 t
set SPLM_LICENSE_SERVER=%SPLM_LICENSE_SERVER:"=%
1 |6 R) `8 g! y: H4 _8 S ZREM
$ q- f$ g- `* C7 H IREM Check if UGII_BASE_DIR is defined. ) {" b( O/ H+ H/ z! ~. h- |
REM ; K( i2 j' Q! b0 B* U% @9 F l
7 G, O2 {6 @' w* I9 b) c) nif not defined UGII_BASE_DIR (
; j% x0 V; B. Y% Q echo NX path could not be established. UGII_BASE_DIR not set. - `6 i5 \* @1 S. [& C% h
goto ERROR_EXIT 6 l" W, Z# s9 \2 r/ y
) ELSE ( 3 G# r S4 c5 y& B0 e3 `# A
echo NX path established. UGII_BASE_DIR=%UGII_BASE_DIR% 3 \0 p, |" M, b8 R
echo Checking for IN-USE NX Licenses... " o- L# Y: j$ I4 h# P4 a* M
echo.
8 C! a* A! h i) c echo.
8 D# j8 V+ ^# K/ m7 ]9 y) h% g1 E3 e
REM + B8 ]) t9 x& t4 C
REM Check if UGII_BASE_DIR really points to a valid directory.
- P" W: c! N+ G7 C5 N: H6 j& BREM ; Q& L" O/ }, @! S0 @$ Y1 t
/ r( n- j! p' X: X( \ if EXIST "%UGII_BASE_DIR%\ugii" ( - F X0 X8 Z: {- S1 A. K
set UGII_ROOT_DIR=%UGII_BASE_DIR%\ugii 4 L' o1 N5 a6 r5 e. C2 D H
) ELSE (
. R# D6 w7 q5 c$ p: P echo UGII_BASE_DIR set to invalid NX install. 3 E$ u3 |" j2 W
goto ERROR_EXIT
- m; c, J$ O6 Y0 s& W ) ! ]# v, \" ?7 O8 o0 o- t/ `5 p4 ^! m; Z
) 9 U+ N' K1 c' F
/ F, |7 _9 ^, ?) M/ W$ T: Q
REM , E: S/ A, n3 T5 P, c& z
REM Check for NX license server b2 q/ D# Y9 A( G: |$ t( y
REM 8 Y' H* W+ K H% \. p
! e L" v% m$ g: P
if not defined SPLM_LICENSE_SERVER ( & b5 t! U- @/ @1 ~; N
echo ERROR: SPLM_LICENSE_SERVER is not defined. ( f4 H& x: [* }' }
echo Current Setting: %SPLM_LICENSE_SERVER% 1 H6 b" W) [- x; t
echo Check: SPLM_LICENSE_SERVER=28000@<server>.
& X( o. ]9 o6 w4 m. j- D- T goto ERROR_EXIT
6 w f2 f% K4 [" U o+ x)
, x" C* b: x" O3 b) n& o) o0 ~" G; S
"%UGII_BASE_DIR%\ugflexlm\lmutil" lmstat -c %SPLM_LICENSE_SERVER% -A
2 F. V& ~! }1 H; t& r0 ^8 }! n: Z# `2 Q; z1 Y% J# X
pause
+ n4 V! R; P$ `* Dgoto end 0 F$ b- P" u8 p/ P, o" ^
:ERROR_EXIT 4 p; i4 I2 }* _7 b, b% {% q% j3 u
echo.
! N9 K3 g0 O; M. p5 techo ERROR: Unable to check licenses. . m$ b/ c6 G4 T, F$ W5 H. J
echo. % Q I) n: R0 r' {0 ^: @
pause
+ }3 W4 @/ d7 Q# s% W4 X8 u# q. w:end
C; g1 r) m! k+ O6 }: Z- W, y
* S h3 C7 J6 x; Q |
|