My new manager wants me to learn perl and start with understanding logs files from 50 plus servers. I hope I have sent this message to the correct perl form. I have a sample of the logs below that need to be fixed using perl. Any ideas or suggestion will be helpful.
============= Start of log sample ============= 1. REMOVE ALL WHITE SPACE GREATER THEN ONE. 2002/10/14 09:44:13 +05 401d8bb0: reader_thread: received data: session=ab7e, type=27, len=42 2002/10/14 09:44:14 +05: rewriting /var/tmp//states/MDist2.bdb for 1327749463.358+1012661479.33182.508+ 2002/10/14 09:44:14 +05: rewriting /var/tmp//states/MDist2.bdb for active_distributions 2002/10/14 09:44:15 +05: rewriting /var/tmp//states/MDist2.bdb for 1327749463.358+1012661479.33182.508+ 2002/10/14 09:44:15 +05 401d8d38: mdist: failed to update db for flushed results, msg = [FRWTE0004E Mon Oct 14 09:44:15 2002 (4): resource `1012661479.78.0' not found] 2002/10/14 09:44:15 +05: rewriting /var/tmp//states/MDist2.bdb for active_distributions 2002/10/14 09:44:15 +05 401d61c8: reconnect_thread: connection from 148.152.168.177+1150 =========================================================================== 2. ENSURE EACH LINE IN THE LOG START WITH A DATE AND TIME REMOVE THE CARRIAGE RETURN AND LINE FEED INSERT ONE WHITE SPACE 2002/10/14 09:35:01 +05 401d8bb0: reader_thread: calling ipc_timed_recv with 300 as timeout. 2002/10/14 09:35:01 +05 401d8bb0: reader_thread: received data: session=8604, type=27, len=42 2002/10/14 09:35:02 +05 401cd340: recv_session_internal: exception: decrypt_data: HMAC does not match encrypted data! 2002/10/14 09:35:02 +05 401cd340: destroying session 6366ed5 2002/10/14 09:35:04 +05 401d61c8: reconnect_thread: connection from 148.152.239.162+1075 2002/10/14 09:35:04 +05 401d61c8: tcp server: waiting for connection on 0.0.0.0+9494... 2002/10/14 18:06:40 +05 402db288: reader_thread: calling ipc_timed_recv with 300 as timeout. 2002/10/14 18:06:40 +05 402db288: reader_thread: received data: session=0, type=13, len=578 2002/10/14 18:06:41 +05 40050810: JOB THREAD EXCEPTION: The endpoint 1977093746.141202 is not serviced by gateway 1977093746.143242.23#TMF_Gateway::Gateway#. 2002/10/14 18:06:41 +05 40050820: JOB THREAD EXCEPTION: The endpoint 1977093746.142259 is not serviced by gateway 1977093746.143242.23#TMF_Gateway::Gateway#. 2002/10/14 18:06:41 +05 40050d88: JOB THREAD EXCEPTION: The endpoint 1977093746.139647 is not serviced by gateway 1977093746.143242.23#TMF_Gateway::Gateway#. 2002/10/14 18:06:41 +05 402daee8: reconnect_thread: connection from 10.4.44.247+1059 2002/10/14 18:06:41 +05 402daee8: tcp server: waiting for connection on 0.0.0.0+9494... 2002/10/16 11:50:15 +05: writing /var/tmp//states/MDist2.bdb for 1327749463.390+1977093746.139387.508+ 2002/10/16 11:50:16 +05 40894cc0: JOB THREAD EXCEPTION: The message was not sent. ipc_timed_send: peer=10.22.116.184+1600, error=FRWOG0047E IPC shutdown (67). 2002/10/16 11:50:16 +05: writing /var/tmp//states/MDist2.bdb for 1327749463.390+1977093746.139675.508+ 2002/10/15 08:42:42 +05 4046f1f0: JOB THREAD EXCEPTION: FRWTE0004E Tue Oct 15 08:42:42 2002 (4): resource `' not found 2002/10/15 08:45:01 +05 4046f1f0: process_node_login: unwrap_login_info (migrate) failed. Aborting login for dispatcher 142252 Exception message is: FRWTE0004E Tue Oct 15 08:45:01 2002 (4): resource `' not found 2002/10/15 08:47:01 +05 4046f1f0: process_node_login: unwrap_login_info (migrate) failed. Aborting login for dispatcher 142252 Exception message is: FRWTE0004E Tue Oct 15 08:47:01 2002 (4): resource `' not found 2002/10/15 08:58:02 +05 4046f1f0: JOB THREAD EXCEPTION: FRWTE0004E Tue Oct 15 08:58:01 2002 (4): resource `' not found 2002/10/15 09:03:02 +05 4046f1f0: JOB THREAD EXCEPTION: FRWTE0004E Tue Oct 15 09:03:02 2002 (4): resource `' not found =========================================================================== 3. ENSURE EACH LINE IN THE LOG START WITH A DATE AND TIME REMOVE THE CARRIAGE RETURN AND LINE FEED INSERT ONE WHITE SPACE REMOVE ALL BLANK LINES FROM LOGS 2002/10/14 18:05:00 +05 4009fe58: reader_thread: calling ipc_timed_recv with 300 as timeout. 2002/10/14 18:05:00 +05 4009fe58: reader_thread: received data: session=0, type=13, len=626 2002/10/14 18:05:00 +05 401ad118: failure during login for 10.8.5.147+2843 (pc200205151,w32-ix86,72J1WXB0Y0Y269TP6MBV00000547,reg=1977093746,od=143043) : FRWSL0005E A communications failure occurred: FRWOG0014E destination dispatcher unavailable Please refer to the TME 10 Framework Planning and Installation Guide, "TME Maintenance and Troubleshooting" for details on diagnosing communication errors or contact your Tivoli support provider. 2002/10/14 18:05:00 +05 40126148: failure during login for 10.22.109.211+2447 (pc200207786,win95,FZJ1B26MHH96XR+YDZHM00000572,reg=1977093746,od=139332): FRWSL0005E A communications failure occurred: FRWOG0014E destination dispatcher unavailable Please refer to the TME 10 Framework Planning and Installation Guide, "TME Maintenance and Troubleshooting" for details on diagnosing communication errors or contact your Tivoli support provider. 2002/10/14 18:05:00 +05 400f6428: failure during login for 10.22.109.152+1072 (pc200222741,w32-ix86,Q1FJZSFK+SW4B+T2H00Y0000054D,reg=1977093746,od=139107) : FRWSL0005E A communications failure occurred: FRWOG0014E destination dispatcher unavailable Please refer to the TME 10 Framework Planning and Installation Guide, "TME Maintenance and Troubleshooting" for details on diagnosing communication errors or contact your Tivoli support provider. 2002/10/14 18:05:00 +05 4014b650: failure during login for 10.22.109.234+1045 (pc200222622,w32-ix86,2QV50LPHK+3K3FRRY68B0000053C,reg=1977093746,od=139057) : FRWSL0005E A communications failure occurred: FRWOG0014E destination dispatcher unavailable Please refer to the TME 10 Framework Planning and Installation Guide, "TME Maintenance and Troubleshooting" for details on diagnosing communication errors or contact your Tivoli support provider. 2002/10/14 18:05:16 +05 40014038: gateway boot: started booting. 2002/10/14 18:05:16 +05 40014038: gateway boot: BDT service not started. ============= End of log sample ============= Thanks Tim Martin