|
请使用QQ关联注册PLM之家,学习更多关于内容,更多精彩原创视频供你学习!
您需要 登录 才可以下载或查看,没有账号?注册
x
117. 如何查看我的 NX 许可证服务器上的许可证使用情况?
/ B! ~1 a* H( t5 l" I+ R9 T& ?问题/症状
K5 c# E# N/ r6 W如何查看 NX 许可证服务器上的许可证使用情况?我目前的 NX 版本是 NX9 及以上版本. ' f( L0 S+ ^' I* ~ n- d
解决方法 & L: p' R) R9 ~7 r. R: j& D5 L* T$ i
您把下面的文字做成一个批处理文件, 然后双击运行就能看到您的 NX 许可证服务器上的
- I3 W C% h2 D6 ?3 VNX 许可证的使用情况.
( K' K/ M) _8 I# L这个程序也可以在客户端运行,运行的时候, 我们假设您的下面 2 个环境变量已经在您的: F( a5 T8 p; G) J, w2 s
系统环境变量中设定好:
5 n$ j" x$ }. o, OUGII_BASE_DIR ; g, E3 ~+ [0 R3 @4 s& A$ O* `
SPLM_LICENSE_SERVER 5 e( V; N/ r! r( n, t% ~- Y9 ~# n
@echo off 4 F( u+ O Q% i$ P
rem ========================================================================= " E( r" ]; F' X( U; \8 F
rem
$ U4 r6 l+ I7 p/ T* Arem Copyright (c) 1996-2015 Siemens PLM Software. ! E" L8 b0 @( W
rem Unpublished - All rights reserved 0 c0 t7 [+ m* I4 A2 h
rem /sar GTAC
* Q6 |' `9 o' ~9 x" frem ========================================================================= ( J, U: J8 D4 y& I/ _: P& d. V
rem . R5 m" o2 {0 T9 B2 Y V
rem File Name: LICENSECHECKV9.BAT ) X0 t" m" |1 e# O
rem
: B7 _9 h) j1 `& X w* orem =========================================================================
! |5 E0 E/ w% M7 Lrem : I3 I& `& j0 }3 @
rem This script will check what NX licenses are in use.
! K4 k. T9 A* y" Urem
5 b. G1 m0 R! s/ [. J0 [% L. b6 Prem NOTE:
1 S9 n, e" G: v Brem
; U. W" j: R3 q* t5 h9 Crem This script assumes that UGII_BASE_DIR and SPLM_LICENSE_SERVER
* f( N8 J' D" o6 L0 E$ Z2 ^8 Yrem are properly defined
+ K h# X, ]+ [rem ; t1 i/ L( A, @' o
1 [6 h+ y8 ]) w5 I2 v" ~! wREM To avoid double double quotes later, remove any quotes that 8 U/ h! _4 g ]2 B/ y
REM are part of the environment variable now
9 X: E8 R( v8 X7 y8 Z6 `4 }( [/ L4 B# Q' ~- q/ d3 B
set UGII_BASE_DIR=%UGII_BASE_DIR:"=%
( P7 h. i3 g2 Q7 D8 Oset SPLM_LICENSE_SERVER=%SPLM_LICENSE_SERVER:"=% $ n/ ` W; T% c9 s# M3 P: ]
REM + g4 F- ~8 h8 x; Y6 `
REM Check if UGII_BASE_DIR is defined.
( S. ?6 B" l- t' X' S9 ~3 YREM
* J$ A% g- b& ?7 j1 A
+ u( C0 z# s9 D8 b `, T. M. tif not defined UGII_BASE_DIR (
& N V# Y6 g/ e echo NX path could not be established. UGII_BASE_DIR not set.
7 |* p5 X9 w6 B) q9 ^ goto ERROR_EXIT ; f; b& Z5 c9 q
) ELSE (
' D& v2 m" V* w9 J echo NX path established. UGII_BASE_DIR=%UGII_BASE_DIR%
9 e a+ z/ G: M# p! L echo Checking for IN-USE NX Licenses...
# M8 s5 Q7 h( v5 {" N6 i echo.
5 z& T; [4 i$ z echo. 5 |$ {3 C4 i6 e1 t* I
: r4 g4 E/ N0 t( s- u9 E9 }
REM
0 p& e. ?. W% z) A" jREM Check if UGII_BASE_DIR really points to a valid directory. - ]: {7 x/ @ F$ @2 a/ K
REM 3 X2 C9 [& p# p$ s
" p. O% T$ u7 Q- L+ p
if EXIST "%UGII_BASE_DIR%\ugii" ( 1 Z0 X5 b* I# G
set UGII_ROOT_DIR=%UGII_BASE_DIR%\ugii
F {4 Q$ T6 M ) ELSE ( ; |1 b; y- k9 D: i6 n
echo UGII_BASE_DIR set to invalid NX install.
c4 l! W3 C* @- I, S! w goto ERROR_EXIT ) o9 H6 N) w2 b0 ^* g8 r0 V+ v
) # P4 |8 E2 d; W3 x1 [1 z* f
)
4 ~* a5 l* a9 A. x8 Z* m5 B
* u3 r6 ~9 y3 K1 JREM - b7 i0 }" y) F/ F8 v3 I6 d
REM Check for NX license server
% o4 K3 X( K% {0 u3 QREM $ ^3 K8 k: g" q' |4 W# f7 f
) b: u( m! B4 Y1 r, }- _$ e' D! w
if not defined SPLM_LICENSE_SERVER ( 0 V' N; q4 P0 O& s( X+ a
echo ERROR: SPLM_LICENSE_SERVER is not defined.
$ ?0 N. b$ ` o, Q4 \. M& y- e# P echo Current Setting: %SPLM_LICENSE_SERVER% # _3 i) l( e" X7 h
echo Check: SPLM_LICENSE_SERVER=28000@<server>.
C4 @- l- _4 u' j6 X goto ERROR_EXIT
* ?- `% e. C \* [; b3 y- Z' v)
3 A5 m( y# d, N! S* e7 T$ n
% F$ O8 u3 F/ i" ?- o"%UGII_BASE_DIR%\ugflexlm\lmutil" lmstat -c %SPLM_LICENSE_SERVER% -A & l# z1 z# T* _ N' \) K0 b$ A% o) _
% Q; Y7 q0 w, spause 8 ?( P& [0 ]# h6 X7 F. p! y1 m
goto end % {: S- Z. M+ k( W: |
:ERROR_EXIT
' Y0 d- I7 a) S0 v( X" ]! zecho. $ |7 c0 G4 {3 L0 L5 [
echo ERROR: Unable to check licenses.
) Q9 P5 P% A/ M* ^8 k* Pecho. ( j8 E/ Z9 `% L, y9 Y
pause
) L# P4 W8 F$ H* H3 J% J:end
) i6 k% r! C3 I3 ]& d/ z
' e, f d) k- S( n |
|