|
请使用QQ关联注册PLM之家,学习更多关于内容,更多精彩原创视频供你学习!
您需要 登录 才可以下载或查看,没有账号?注册
x
117. 如何查看我的 NX 许可证服务器上的许可证使用情况?
" q/ W) a; O4 o问题/症状
' v& u/ b9 \0 X/ \4 _5 W3 ~如何查看 NX 许可证服务器上的许可证使用情况?我目前的 NX 版本是 NX9 及以上版本.
% `. i& E) N) [+ ?. ?( u: P2 j/ z解决方法 : v5 m0 A" q; C2 f! T
您把下面的文字做成一个批处理文件, 然后双击运行就能看到您的 NX 许可证服务器上的
V& E) X# |. b. m5 ~NX 许可证的使用情况.
6 g i6 \; F. w7 Y这个程序也可以在客户端运行,运行的时候, 我们假设您的下面 2 个环境变量已经在您的
' U `: `& U2 Z系统环境变量中设定好: ) N6 f( d, L0 E3 Y: I$ v" p
UGII_BASE_DIR * N( h8 N$ O, u9 y) h# R0 Q
SPLM_LICENSE_SERVER
+ R9 |" ~3 O: p* B, Y@echo off 6 m. s6 R" Y+ M5 R0 s. e! r
rem =========================================================================
" S3 b8 K! W& l# l) b5 x( W+ Wrem
! m6 {4 ^. ?3 F0 P: y# trem Copyright (c) 1996-2015 Siemens PLM Software. 0 J$ v u0 Y7 u2 O
rem Unpublished - All rights reserved & {* h2 m& ^' e( \, r; U
rem /sar GTAC ( n" C2 w) E$ o W$ }
rem ========================================================================= 3 F5 L. {8 Q+ c6 W7 ]2 g8 j. z- l
rem 4 w5 ~; `6 N. P% [$ I' ~
rem File Name: LICENSECHECKV9.BAT
1 J$ d4 i% M5 k: v ~* S: |7 f! orem ; `) d2 k' ]7 L' [0 c }
rem ========================================================================= " X- h: s. l- S, ^3 D- i' t: E8 H/ _
rem
1 X. U0 s- Q/ h! G3 W( T7 Arem This script will check what NX licenses are in use.
% R9 E; V$ d$ h- Irem
s; P$ Z3 m& b0 ]6 ^6 l6 E8 Frem NOTE: : h$ l$ s& f1 b3 w: ^ R7 H& H1 k1 }
rem , x: m% `4 |; e( n
rem This script assumes that UGII_BASE_DIR and SPLM_LICENSE_SERVER - F6 F y8 O& [7 g9 m% s
rem are properly defined
/ f- T6 M, v- N9 Hrem
8 Y' w" p$ E" ~: z; @, x Z0 G
0 M8 U4 G( X3 l* f t1 aREM To avoid double double quotes later, remove any quotes that
! r. b5 x# G* @( \8 u2 sREM are part of the environment variable now ' j8 j! f# B% P- F2 d3 M5 T6 h
" W( W+ k' a3 @' ~
set UGII_BASE_DIR=%UGII_BASE_DIR:"=%
) ~$ d' B% ^$ C& q$ L( p z: {set SPLM_LICENSE_SERVER=%SPLM_LICENSE_SERVER:"=%
( D; T" \2 j( I2 \5 s! m8 HREM 8 X7 G) x1 |2 \
REM Check if UGII_BASE_DIR is defined. " u: O: i+ x) w+ F
REM
) K2 N( l& T6 N9 v+ i
2 i8 h; T6 u2 ]if not defined UGII_BASE_DIR ( 1 Y" |; Q$ C8 Q* O
echo NX path could not be established. UGII_BASE_DIR not set. 2 d- U% m5 j% W" u% h2 l
goto ERROR_EXIT
2 b& I( i4 N W. B9 g, Z) ELSE ( - z& R3 A( V! Z
echo NX path established. UGII_BASE_DIR=%UGII_BASE_DIR% 6 z% n' n- T+ w6 M
echo Checking for IN-USE NX Licenses... + x" \) Q9 g8 I
echo.
7 h% K5 t2 H2 [$ z$ ~' ^, [ echo.
( B0 L2 }2 X! n" a& R, k, g: q! R. p3 r6 h/ r! n* R
REM
" M& v) b% }0 o: m3 tREM Check if UGII_BASE_DIR really points to a valid directory.
# L1 X/ |, S7 C( {2 p5 i) |REM
1 x6 L& A8 k2 Y5 W! D' R) U5 U9 K6 f$ } o6 ^0 Q- [- {6 z" z/ m v
if EXIST "%UGII_BASE_DIR%\ugii" (
6 s2 O% m2 Z: V# J6 G8 a* v0 u+ H set UGII_ROOT_DIR=%UGII_BASE_DIR%\ugii ( H9 I5 O, Z. o* ^- |
) ELSE (
) j @" S r& d( t. u echo UGII_BASE_DIR set to invalid NX install. # i, f; m- y. W, K" I. j; p" t$ o
goto ERROR_EXIT 5 O- l2 D* m. g k
)
- Y0 X6 ? ?* l3 _6 t. s1 D( Z)
& a2 }! k, u& |( M" m) `3 C& O' i4 c) O* R6 p
REM ' g* ?2 @& P/ O' M. M5 l+ v0 s9 z, {! o
REM Check for NX license server - H) m6 a7 }, B) [3 X" e! K) V
REM ' E+ n6 V6 j5 ?5 m
9 R7 \, W( `! ?$ e3 vif not defined SPLM_LICENSE_SERVER ( 7 ]+ V) {+ ^8 Y; A7 E6 ^
echo ERROR: SPLM_LICENSE_SERVER is not defined. % C; e3 U9 M) {3 c: G' w
echo Current Setting: %SPLM_LICENSE_SERVER% % G1 N3 S0 j) X. {& C: @: W, e1 U
echo Check: SPLM_LICENSE_SERVER=28000@<server>. 9 l: X( e. z+ _' X1 o; U; h$ |3 @ m" U
goto ERROR_EXIT
- |7 q2 t8 f$ ]* u4 T) : c# p" r! E; E9 A& f
6 R; J/ E; u9 }6 D/ u7 f4 P9 H"%UGII_BASE_DIR%\ugflexlm\lmutil" lmstat -c %SPLM_LICENSE_SERVER% -A
# q, a: @" ~( z" H3 _1 @* R
+ k) i5 g6 C& jpause
# K" a0 w! |7 Y3 Y( o8 bgoto end
7 G! G8 n2 J& q p:ERROR_EXIT / `' y2 o) O; Q0 E% M* r( F1 u
echo. * {" U% G6 U T
echo ERROR: Unable to check licenses. $ L( R- \4 _1 p% t% I" q5 m
echo.
7 M1 W9 }' v9 X) Spause 1 Z9 \1 @% w+ P* C4 k( D
:end
! e$ Q0 C& s* G. D. q, {/ \( ?6 c5 D% J
|
|