H
huisky
Say I have following log file, which records the code usage.
I want to read this file and do the summarize how much total CPU time
consumed for each user.
Is Python able to do so or say easy to achieve this?, anybody can give
me some hints, appricate very much!
Example log file.
**************************************************************************************
LSTC license server version 224 started at Sun Dec 6 18:56:48 2009
using configuration file /usr/local/lstc/server_data
xyz (e-mail address removed) LS-DYNA_971 NCPU=1 started Sun Dec 6
18:57:40
(e-mail address removed) completed Sun Dec 6 19:42:55
xyz (e-mail address removed) LS-DYNA_971 NCPU=2 started Sun Dec 6
20:17:02
(e-mail address removed) completed Sun Dec 6 20:26:03
xyz (e-mail address removed) LS-DYNA_971 NCPU=1 started Sun Dec 6
21:01:17
(e-mail address removed) completed Sun Dec 6 21:01:28
tanhoi (e-mail address removed) LS-DYNA_971 NCPU=1 started Mon
Dec 7 09:31:00
(e-mail address removed) presumed dead Mon Dec 7 10:36:48
sabril (e-mail address removed) LS-DYNA_971 NCPU=2 started Mon
Dec 7 13:14:47
(e-mail address removed) completed Mon Dec 7 13:24:07
sabril (e-mail address removed) LS-DYNA_971 NCPU=2 started Mon
Dec 7 14:21:34
sabril (e-mail address removed) LS-DYNA_971 NCPU=2 started Mon
Dec 7 14:28:42
(e-mail address removed) killed Mon Dec 7 14:31:48
(e-mail address removed) killed Mon Dec 7 14:32:06
I want to read this file and do the summarize how much total CPU time
consumed for each user.
Is Python able to do so or say easy to achieve this?, anybody can give
me some hints, appricate very much!
Example log file.
**************************************************************************************
LSTC license server version 224 started at Sun Dec 6 18:56:48 2009
using configuration file /usr/local/lstc/server_data
xyz (e-mail address removed) LS-DYNA_971 NCPU=1 started Sun Dec 6
18:57:40
(e-mail address removed) completed Sun Dec 6 19:42:55
xyz (e-mail address removed) LS-DYNA_971 NCPU=2 started Sun Dec 6
20:17:02
(e-mail address removed) completed Sun Dec 6 20:26:03
xyz (e-mail address removed) LS-DYNA_971 NCPU=1 started Sun Dec 6
21:01:17
(e-mail address removed) completed Sun Dec 6 21:01:28
tanhoi (e-mail address removed) LS-DYNA_971 NCPU=1 started Mon
Dec 7 09:31:00
(e-mail address removed) presumed dead Mon Dec 7 10:36:48
sabril (e-mail address removed) LS-DYNA_971 NCPU=2 started Mon
Dec 7 13:14:47
(e-mail address removed) completed Mon Dec 7 13:24:07
sabril (e-mail address removed) LS-DYNA_971 NCPU=2 started Mon
Dec 7 14:21:34
sabril (e-mail address removed) LS-DYNA_971 NCPU=2 started Mon
Dec 7 14:28:42
(e-mail address removed) killed Mon Dec 7 14:31:48
(e-mail address removed) killed Mon Dec 7 14:32:06