Hello everybody,
I have a file containing some statistics regarding CPU usage. The file has this syntax :
HTML Code:
Fri Jul 16 14:27:16 EEST 2010
Cpu(s): 15.2%us, 1.4%sy, 0.0%ni, 82.3%id, 0.1%wa, 0.0%hi, 0.9%si, 0.0%st
Fri Jul 16 15:02:17 EEST 2010
Cpu(s): 15.3%us, 1.4%sy, 0.0%ni, 82.3%id, 0.1%wa, 0.0%hi, 0.9%si, 0.0%st
Fri Jul 16 15:21:02 EEST 2010
Cpu(s): 15.3%us, 1.4%sy, 0.0%ni, 82.3%id, 0.1%wa, 0.0%hi, 0.9%si, 0.0%st
Fri Jul 16 15:54:43 EEST 2010
Cpu(s): 15.3%us, 1.4%sy, 0.0%ni, 82.3%id, 0.1%wa, 0.0%hi, 0.9%si, 0.0%st
Fri Jul 16 16:20:15 EEST 2010
Cpu(s): 15.3%us, 1.4%sy, 0.0%ni, 82.3%id, 0.1%wa, 0.0%hi, 0.9%si, 0.0%st
Fri Jul 16 16:40:18 EEST 2010
Cpu(s): 15.3%us, 1.4%sy, 0.1%ni, 82.3%id, 0.1%wa, 0.0%hi, 0.9%si, 0.0%st
Fri Jul 16 17:00:19 EEST 2010
Cpu(s): 15.3%us, 1.4%sy, 0.0%ni, 82.3%id, 0.1%wa, 0.0%hi, 0.9%si, 0.0%st
Fri Jul 16 17:20:22 EEST 2010
Cpu(s): 15.3%us, 1.4%sy, 0.0%ni, 82.3%id, 0.1%wa, 0.0%hi, 0.9%si, 0.0%st
meaning a line representing the date, followed after by a line with CPU stats, and so one.
What I intend to do is to format this file in another one, which will contain only 2 columns :
HTML Code:
Col A Col B
Hour CPU(user)
like this :
HTML Code:
14:27:16 15.2%
15:02:17 15.3%
Does anyone know a solution to this ?
Thanx,
Adrian