|
|
请使用QQ关联注册PLM之家,学习更多关于内容,更多精彩原创视频供你学习!
您需要 登录 才可以下载或查看,没有账号?注册
x
117. 如何查看我的 NX 许可证服务器上的许可证使用情况?
- k s X2 Q# d2 i) o, z% U+ Y问题/症状
$ O! `5 m, V* N7 j7 q如何查看 NX 许可证服务器上的许可证使用情况?我目前的 NX 版本是 NX9 及以上版本. , Q# J3 c& F b9 P+ v1 c' b
解决方法
" c8 }2 x" l$ r; c您把下面的文字做成一个批处理文件, 然后双击运行就能看到您的 NX 许可证服务器上的% O( b3 t# P/ h+ p5 V U# r
NX 许可证的使用情况.
/ {+ j1 d/ j' S这个程序也可以在客户端运行,运行的时候, 我们假设您的下面 2 个环境变量已经在您的* x) ^# ^5 _* g
系统环境变量中设定好: . T F9 ^) |" _: e. z
UGII_BASE_DIR 0 u% ?* y5 P2 {8 D0 W! }1 r0 W
SPLM_LICENSE_SERVER 4 n1 W% x4 s, F$ Q
@echo off
0 `0 ~6 X" q" s9 _/ `3 krem ========================================================================= 1 l r+ O$ M+ M) {, N% s
rem ' X t0 o& N! _7 ~" z1 _
rem Copyright (c) 1996-2015 Siemens PLM Software. 9 a* u+ f. i2 N, m+ Y
rem Unpublished - All rights reserved
) L z! C6 \2 R3 f7 h2 e) arem /sar GTAC $ y) F4 R+ i& v5 a+ `
rem ========================================================================= ( c: z: s" P/ s% F" r; O
rem 0 a, D& t2 B/ A& x( A9 K" Z
rem File Name: LICENSECHECKV9.BAT
; l! e1 z0 [0 Qrem
) N; L6 I' t* `( q5 rrem =========================================================================
" g3 @- c- m$ Mrem ' _! M& g0 @3 ~, G: S1 L
rem This script will check what NX licenses are in use. # o7 M' t1 S: @8 n+ `; R8 }
rem * t" K, A9 C' C4 ^! I) u
rem NOTE: - m+ U5 `* E. c- R7 j* C7 _
rem ! \: f% o" v, ?+ h! k8 S% G) `: L
rem This script assumes that UGII_BASE_DIR and SPLM_LICENSE_SERVER ' d8 A0 y0 G8 T9 P! B
rem are properly defined
k2 Z% z1 p' C/ D2 j9 orem & k3 C2 D. w% X) n$ l- j4 K
* u# ?7 i0 _0 A* `* g3 z
REM To avoid double double quotes later, remove any quotes that
6 i7 m, L$ f! X8 z! HREM are part of the environment variable now
4 V) J2 q! ^! D
# q e( F" a L1 Nset UGII_BASE_DIR=%UGII_BASE_DIR:"=%
; R! E* W6 H5 F" z" H: @) W. oset SPLM_LICENSE_SERVER=%SPLM_LICENSE_SERVER:"=%
: s% O) f# E# g1 _REM # M% l v5 F6 Z
REM Check if UGII_BASE_DIR is defined. 2 w9 |( N2 E) _5 c4 _9 p# E
REM # \) _+ i f0 X# {
& R# c+ E; O; q% N9 }- Jif not defined UGII_BASE_DIR (
$ t1 M, i5 W' F! [. X6 }% }- z: p echo NX path could not be established. UGII_BASE_DIR not set.
- V: }. c8 M- Q& X0 S6 k! P goto ERROR_EXIT
. y3 y6 ?! p+ T0 j) ELSE (
, K- z! k4 V |3 s+ L# G" x echo NX path established. UGII_BASE_DIR=%UGII_BASE_DIR% , g$ m% L, _ K8 S: D a( R2 ]
echo Checking for IN-USE NX Licenses... : R& n+ E2 I- ~# y
echo. + R0 ~( L3 o: e& f9 f6 M$ e4 f/ X
echo. 6 {2 m! e9 B1 L% C0 q2 F( r: n
]6 N0 Y6 p- Y" t# Y6 DREM
. [" B4 y' Q8 B* A( C( t, G! lREM Check if UGII_BASE_DIR really points to a valid directory. . d- E7 F5 O4 K
REM / l0 y# O4 o3 B& k2 O
P" ~8 e- A x5 s7 z
if EXIST "%UGII_BASE_DIR%\ugii" ( 7 Q% H7 M6 O0 ~( |3 a; q6 i3 F
set UGII_ROOT_DIR=%UGII_BASE_DIR%\ugii
: f9 S4 n1 Q6 m ) ELSE ( 1 y; ]$ G5 R2 g: q" ~ n+ ?+ Y
echo UGII_BASE_DIR set to invalid NX install.
+ Q g# {, {! e# w( `: I goto ERROR_EXIT
8 F+ i' o; \. b6 J- u )
+ T6 ~! _: n' P) 3 G1 a! f) j8 e) d! [- d" f
8 t7 g; s" l: T, ^1 bREM ' t) I5 E- n% e; d
REM Check for NX license server ; k1 b* B9 P2 m2 e, [* x# K
REM
& ?# v1 Y; t- G V0 R2 s) @0 b& m/ L% a4 N
if not defined SPLM_LICENSE_SERVER ( 4 A2 ^ |" _6 `7 [6 J
echo ERROR: SPLM_LICENSE_SERVER is not defined. * V4 p& i) z O2 {5 N
echo Current Setting: %SPLM_LICENSE_SERVER%
; x$ k0 x8 Y: ?8 u# f! |- y echo Check: SPLM_LICENSE_SERVER=28000@<server>.
- i0 r: T6 k" i& r1 a! I goto ERROR_EXIT
a+ z# X6 k+ ?2 e5 ?; W5 J)
7 _' e5 r! E5 _2 \/ a. G
5 f, F1 Y6 ]2 S0 n6 L6 @"%UGII_BASE_DIR%\ugflexlm\lmutil" lmstat -c %SPLM_LICENSE_SERVER% -A 9 ~( {: i& o- w' Q4 ~
% i: ?4 s/ p, v5 h. e$ W3 gpause
' _( e" s* j7 j/ pgoto end 9 K. m: m! A5 V
:ERROR_EXIT
( |" H0 r5 ^5 Z- n1 o* Q1 Yecho.
6 C) ?# {+ W0 uecho ERROR: Unable to check licenses.
. U, z& ~6 [8 v& M! v" u! T' Secho.
' f8 u/ v8 G" O: e- D/ V1 g Epause / Q! D- F8 ]1 Q1 j z* ^
:end
# h8 C- {8 J6 C8 R; E6 ~5 ~$ ]4 b6 c" V: a2 n7 U+ m6 X
|
|