|
请使用QQ关联注册PLM之家,学习更多关于内容,更多精彩原创视频供你学习!
您需要 登录 才可以下载或查看,没有账号?注册
x
117. 如何查看我的 NX 许可证服务器上的许可证使用情况? ( c' L! S9 j0 h( C3 U7 Q
问题/症状
) ^4 |" X) o! H: e如何查看 NX 许可证服务器上的许可证使用情况?我目前的 NX 版本是 NX9 及以上版本. ' |; v: y3 V# w9 F0 v( }; Y' U
解决方法
% u7 ]' j2 M7 s4 J$ x! N+ S您把下面的文字做成一个批处理文件, 然后双击运行就能看到您的 NX 许可证服务器上的
4 V) |6 ?6 r/ M6 _( T0 pNX 许可证的使用情况.
. ?: }+ {1 Z3 y# ]这个程序也可以在客户端运行,运行的时候, 我们假设您的下面 2 个环境变量已经在您的/ l; t2 \( x2 h4 z( ]) ^. ?
系统环境变量中设定好:
2 T( @0 O5 ^2 Q" M: C! IUGII_BASE_DIR 9 [/ I) }/ w4 n5 g
SPLM_LICENSE_SERVER # Q4 b1 U \$ g+ k& l
@echo off 4 |9 I* r% P+ g& D
rem ========================================================================= % L% s/ ] s0 {2 w9 S5 h1 m
rem % ~" C( U& x4 l% L5 ^
rem Copyright (c) 1996-2015 Siemens PLM Software.
: j; ?5 F. L7 V/ v: |& grem Unpublished - All rights reserved " L3 C; U2 m$ q$ M
rem /sar GTAC v2 m: I p. N' r( ~
rem =========================================================================
1 h1 L( s$ ?/ F6 a/ crem , m( G- Q1 V1 q' ?. Z b8 S8 P
rem File Name: LICENSECHECKV9.BAT 1 }! Z M1 q \) }! Z4 ~0 n9 p
rem 4 Q4 `2 j7 [% n/ g. `! E
rem =========================================================================
0 q+ g' E M( o, \rem $ d# l* Z# q b7 b: e8 ^& Y
rem This script will check what NX licenses are in use.
/ H9 n* e3 q' v& y5 P3 h9 A9 b# M! irem
7 a, q5 l& x: D' W4 X% m& orem NOTE:
2 `) B0 H) }7 o# f7 o; erem ; S8 ]" {$ L2 Q" W# Q% Z+ R- s5 B
rem This script assumes that UGII_BASE_DIR and SPLM_LICENSE_SERVER
2 W# d, }+ d; t4 E$ i# `. Grem are properly defined " b8 A7 h$ J# H( p# }) \+ i( `9 ^
rem
! [1 y7 h8 w. m% u, I/ b% Y8 i' f5 C' O* i; Y: G
REM To avoid double double quotes later, remove any quotes that 2 v+ V6 Z0 X9 E& v. f% n& Q/ T8 i' }" r
REM are part of the environment variable now
4 T6 }) i/ O3 j i" N5 x; D2 M- F2 b; ]
set UGII_BASE_DIR=%UGII_BASE_DIR:"=% 2 `* b- p5 m/ W$ ~4 j, d
set SPLM_LICENSE_SERVER=%SPLM_LICENSE_SERVER:"=%
$ k# |* l; Q7 WREM - x$ M9 Y5 Q, w4 {
REM Check if UGII_BASE_DIR is defined.
' L+ }( `" p4 c7 b4 G. T% M8 N( `REM
) Y: m, Y, K. @
1 ^! G; A6 c* A% `. _if not defined UGII_BASE_DIR ( 6 |7 e& U! l4 X5 H( B
echo NX path could not be established. UGII_BASE_DIR not set. 8 U1 z# [# |9 L) i
goto ERROR_EXIT
5 m4 o4 ]. C* W( T) ELSE (
! W& @; n7 E" g+ ~. F2 C& f echo NX path established. UGII_BASE_DIR=%UGII_BASE_DIR%
5 E+ `; m" q: c8 k echo Checking for IN-USE NX Licenses... " z1 Q, [4 X- _- m
echo.
" _% Y- G! q+ U2 h/ e echo. 4 B- J0 V, P4 j* \0 a* |6 F5 X
* E' B k9 q: Z2 r5 p$ ^8 T# UREM $ k1 x$ [. h* g9 O5 E5 {' C3 m
REM Check if UGII_BASE_DIR really points to a valid directory.
5 O, j& k0 J4 O$ ^9 {( aREM 6 Z; i' ]+ G+ v7 b% _. l) @& ?0 \# d4 A
3 m) B3 J; [) X' ?- M# O, n
if EXIST "%UGII_BASE_DIR%\ugii" (
, O6 l8 y0 u$ w* N7 s set UGII_ROOT_DIR=%UGII_BASE_DIR%\ugii
0 W' T2 v& \* O; Q5 z* I& q ) ELSE (
) O# J0 S6 L8 [' N: ~. F echo UGII_BASE_DIR set to invalid NX install. . n: U4 _" o4 K L; b; n
goto ERROR_EXIT . G4 u" y$ T$ W' Y, T7 |2 A3 o, _& d
)
P0 D2 \2 |( ^9 X! Z6 \$ R) , t8 f* U' O( F0 D6 q! Q0 P5 {, |
: t, w' O' o, f3 GREM 7 r7 @7 D- G" N% C4 V8 D) w! d
REM Check for NX license server
. m" {9 k* y0 d, |: lREM 9 W; }. p& c# L. ~4 u
8 E# c4 d! S1 J9 x# @3 b5 Fif not defined SPLM_LICENSE_SERVER (
3 g7 m# m/ w5 G6 G* s echo ERROR: SPLM_LICENSE_SERVER is not defined.
- ^# H% q; e; L$ G/ u- ^ echo Current Setting: %SPLM_LICENSE_SERVER% 8 w# k0 A U! b+ E2 l! I8 B9 ?' G( F
echo Check: SPLM_LICENSE_SERVER=28000@<server>.
: |7 r2 |0 O% I1 i goto ERROR_EXIT
% t% D$ [# B2 x6 l9 @6 |)
3 A9 _+ J j8 o' j
: k$ m) d- M; f"%UGII_BASE_DIR%\ugflexlm\lmutil" lmstat -c %SPLM_LICENSE_SERVER% -A 3 h! W: o) y0 T o; u
) I* e. k$ x( p. p) k+ ^0 {; q4 c
pause . s. q5 [ M7 K1 w/ B
goto end 6 M o& I) a) @- L" L$ C
:ERROR_EXIT i+ c% B. u8 P# w
echo.
. ?- r& }& Q9 Q7 y( B) k; eecho ERROR: Unable to check licenses.
1 \/ p: X3 g7 `( N/ y# J6 R4 S1 yecho.
: c M" B' ~- z7 A5 b6 t, ?pause
! Q% m. a' g/ ~" B9 N:end 0 i) n4 t, l- h4 _% ?
: l" L# n( g( ~! u6 B, T& u2 { |
|