alfsoft
Newbie | Редактировать | Профиль | Сообщение | Цитировать | Сообщить модератору Здравствуйте! Есть log-файл вида: Код: lmstat - Copyright (c) 1989-2007 Macrovision Europe Ltd. and/or Macrovision Corporation. All Rights Reserved. Flexible License Manager status on Mon 8/10/2009 11:26 [Detecting lmgrd processes...] License server status: 744@Tri-server License file(s) on Tri-server: C:\AVEVA\FlexMan4.1\license.lic: Tri-server: license server UP (MASTER) v11.5 Vendor daemon status (on Tri-server): cadcentre: UP v11.5 Feature usage info: Users of PACK-HULL_DESIGN: (Total of 6 licenses issued; Total of 6 licenses in use) "PACK-HULL_DESIGN" v1.00, vendor: cadcentre floating license Tribon 20-13 20-13 (v1.00) (Tri-server/744 7140), start Mon 8/10 10:14 intel VPO-01 VPO-01 (v1.00) (Tri-server/744 3674), start Mon 8/10 10:17 panda 20-23 20-23 (v1.00) (Tri-server/744 3184), start Mon 8/10 10:53 tribon 20-33 20-33 (v1.00) (Tri-server/744 5055), start Mon 8/10 8:24 tribon 20-28 20-28 (v1.00) (Tri-server/744 1948), start Mon 8/10 11:05 tribon 20-21 20-21 (v1.00) (Tri-server/744 9923), start Mon 8/10 8:07 Users of PACK-INITIAL_GEOMETRY: (Total of 1 license issued; Total of 1 license in use) "PACK-INITIAL_GEOMETRY" v1.00, vendor: cadcentre floating license Kazan tribon-02 tribon-02 (v1.00) (Tri-server/744 2558), start Mon 8/10 9:18 Users of PACK-INITIAL_HYDROSTATICS: (Total of 2 licenses issued; Total of 0 licenses in use) Users of CABLE-DESIGN: (Total of 12 licenses issued; Total of 0 licenses in use) Users of DESIGN-PLATFORM: (Total of 45 licenses issued; Total of 24 licenses in use) "DESIGN-PLATFORM" v1.00, vendor: cadcentre floating license Kazan tribon-02 tribon-02 (v1) (Tri-server/744 6070), start Mon 8/10 9:32 TRIBON 41-25 41-25 (v1.0) (Tri-server/744 7723), start Mon 8/10 10:48 TRIBON 30-16 30-16 (v1.0) (Tri-server/744 6246), start Mon 8/10 9:57 Tribon 22-07 22-07 (v1.0) (Tri-server/744 459), start Mon 8/10 7:47 Tribon 20-13 20-13 (v1.0) (Tri-server/744 1564), start Mon 8/10 10:14 intel VPO-01 VPO-01 (v1.0) (Tri-server/744 3252), start Mon 8/10 10:17 panda 20-23 20-23 (v1.0) (Tri-server/744 3355), start Mon 8/10 10:53 tribon AM-01 AM-01 (v1.0) (Tri-server/744 4347), start Mon 8/10 10:49 tribon 20-21 20-21 (v1.0) (Tri-server/744 5129), start Mon 8/10 8:07 tribon 42-21 42-21 (v1.0) (Tri-server/744 4163), start Mon 8/10 10:05 tribon 41-16 41-16 (v1.0) (Tri-server/744 10308), start Mon 8/10 7:42 tribon 20-33 20-33 (v1.0) (Tri-server/744 7051), start Mon 8/10 8:24 tribon 22-22 22-22 (v1.0) (Tri-server/744 5250), start Mon 8/10 8:10 tribon 41-03 41-03 (v1.0) (Tri-server/744 7351), start Mon 8/10 10:49 tribon 22-27 22-27 (v1.0) (Tri-server/744 9125), start Mon 8/10 8:11 tribon AM-02 AM-02 (v1.0) (Tri-server/744 7885), start Mon 8/10 10:49 tribon 41-22 41-22 (v1.0) (Tri-server/744 7643), start Mon 8/10 10:51 tribon 50-27 50-27 (v1.0) (Tri-server/744 538), start Mon 8/10 10:49 tribon 22-14 22-14 (v1.0) (Tri-server/744 2851), start Mon 8/10 11:00 tribon 20-28 20-28 (v1.0) (Tri-server/744 5965), start Mon 8/10 11:05 tribon 22-17 22-17 (v1.0) (Tri-server/744 3847), start Mon 8/10 8:02 tribon 42-18 42-18 (v1.0) (Tri-server/744 2172), start Mon 8/10 7:58 tribon 30-09 30-09 (v1.0) (Tri-server/744 6535), start Mon 8/10 7:52 tribon 22-16 22-16 (v1.0) (Tri-server/744 738), start Mon 8/10 7:46 Users of DGN2REV: (Total of 12 licenses issued; Total of 0 licenses in use) Users of DIAGRAMS: (Total of 12 licenses issued; Total of 0 licenses in use) Users of DWF-EXPORT: (Total of 12 licenses issued; Total of 0 licenses in use) Users of FATC: (Total of 9999 licenses issued; Total of 0 licenses in use) Users of ISODRAW: (Total of 12 licenses issued; Total of 0 licenses in use) Users of IVS2REV: (Total of 12 licenses issued; Total of 0 licenses in use) Users of LINKBR: (Total of 9999 licenses issued; Total of 0 licenses in use) Users of MARINE-DIAGRAMS: (Total of 12 licenses issued; Total of 0 licenses in use) Users of OUTFITTING: (Total of 12 licenses issued; Total of 12 licenses in use) "OUTFITTING" v1.00, vendor: cadcentre floating license TRIBON 30-16 30-16 (v1.0) (Tri-server/744 6344), start Mon 8/10 9:57 TRIBON 41-25 41-25 (v1.0) (Tri-server/744 4761), start Mon 8/10 10:48 tribon 42-18 42-18 (v1.0) (Tri-server/744 373), start Mon 8/10 7:58 tribon 42-21 42-21 (v1.0) (Tri-server/744 1789), start Mon 8/10 10:05 tribon 30-09 30-09 (v1.0) (Tri-server/744 4530), start Mon 8/10 7:52 tribon AM-01 AM-01 (v1.0) (Tri-server/744 8144), start Mon 8/10 10:49 tribon 41-16 41-16 (v1.0) (Tri-server/744 152), start Mon 8/10 7:42 tribon 41-03 41-03 (v1.0) (Tri-server/744 9227), start Mon 8/10 10:49 tribon 50-27 50-27 (v1.0) (Tri-server/744 1454), start Mon 8/10 10:49 tribon AM-02 AM-02 (v1.0) (Tri-server/744 684), start Mon 8/10 10:49 tribon 41-22 41-22 (v1.0) (Tri-server/744 9520), start Mon 8/10 10:51 tribon 22-14 22-14 (v1.0) (Tri-server/744 8639), start Mon 8/10 11:00 Users of PID-INTEGRATOR: (Total of 12 licenses issued; Total of 0 licenses in use) Users of PVS2REV: (Total of 12 licenses issued; Total of 0 licenses in use) Users of REVIEWAPPL: (Total of 12 licenses issued; Total of 0 licenses in use) Users of ROOM-DESIGN: (Total of 12 licenses issued; Total of 0 licenses in use) | Хотелось бы с помощью bat-файла получить пропарсенный текст вида: PACK-HULL_DESIGN: 6/6 Used by: VPO-01, 20-23, 20-33, 20-28, 20-21, 20-21 PACK-INITIAL_GEOMETRY: 1/1 Used by: tribon-02 PACK-INITIAL_HYDROSTATICS: 0/2 CABLE-DESIGN: 0/12 То есть, выдирать названия модулей, используемых в лицензии. И если есть активные пользователи, выводить их в строку через запятую. Если пользователей нет, то просто писать общее количество лицензий/использованное количество. Как видно, все однотипные строки подчиняются одним и тем же правилам. Например, строка с пользователями начинается с четырех символов "пробел" и т.д. Как думаете, реально такое сделать? Спасибо. |