If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > Unix Shell Scripts > Shell Script to Analyze Zimbra sync.log

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 01-08-12, 06:49
aamitrhce aamitrhce is offline
Registered User
 
Join Date: Jan 2012
Posts: 1
Shell Script to Analyze Zimbra sync.log

Hi All,
Need to Analyze Zimbra sync.log file through Shell Script


# Report Output Like that

Total No of Mobile Device Used=..... (Samsung, Lg, Nokia,Htc, etc )
No. of Mobile UserName=........ (Example user1, user2, usre3, )
Types of SMART PHONE used= .......(Example : Android, window 7, iso4, )
DeviceType=......

or something like that..

User Name : ..... Used Device Type :........ and it Device ID is : ...........


Below is Sample of Zimbra sync.logs

2009-12-16 00:00:43,970 INFO [btpool0-12194://webmail.amit.com/Microsoft-Server-ActiveSync?Cmd=Ping&User=rahul%40kke.amit.com&Devi ceId=androidc986729649&DeviceType=Android] [] sync - POST Microsoft-Server-ActiveSync?Cmd=Ping&User=ritesh%40kke.amit.com&Dev iceId=androidc986729649&DeviceType=Android

2009-12-16 00:00:43,971 INFO [btpool0-12194://webmail.amit.com/Microsoft-Server-ActiveSync?Cmd=Ping&User=mohan%40kke.amit.com&Devi ceId=androidc986729649&DeviceType=Android] [] sync - DeviceID=androidc986729649; DeviceType=Android; UA=Android/0.3;
Protocol=12.0; PolicyKey=null

2009-12-16 00:00:43,971 INFO btpool0-12194://webmail.amit.comMicrosoft-Server-ActiveSync?Cmd=Ping&User=rahul%40kke.amit.com&Devi ceId=androidc986729649&DeviceType=Android]
[name=rahul@kke.amit.com;mid=3041;Cmd=Ping;DeviceID =androidc986729649;Version=12.0;] sync - Response size 13 bytes

2009-12-16 00:00:43,971 INFO [btpool0-12194://webmail.amit.com/Microsoft-Server-ActiveSync?Cmd=Ping&User=rahul%40kke.amit.com&Devi ceId=androidc986729649&DeviceType=Android]
[name=rahul@kke.amit.com;mid=3041;Cmd=Ping;DeviceID =androidc986729649;Version=12.0;] sync - HTTP/1.1 200 OK

2009-12-16 00:00:47,278 INFO [btpool0-12161://webmail.amit.com/Microsoft-Server-ActiveSync?Cmd=Ping&User=hotblast%40amit.com&Devic eId=Moxier359496033451946&DeviceType=MoxierAndroid] [] sync - POST Microsoft-Server-ActiveSync?Cmd=Ping&User=hotblast%40amit.com&Devic eId=Moxier359496033451946&DeviceType=MoxierAndroid

Thanks in advance

Amit
Reply With Quote
  #2 (permalink)  
Old 01-08-12, 09:55
kitaman kitaman is offline
Papabi's friend
 
Join Date: Sep 2009
Location: Ontario
Posts: 629
I am not doing all of it, but,
Code:
IFS="?"
while read a b c
do
IFS="&"
echo $b |read cmd user deviceid devicetyp
IFS=" "
echo $devicetyp |read devicetype rest
IFS="&"
echo $c |read cmd1 user1 deviceid1 devicetype2
IFS=" "
echo $cmd $user $deviceid devicetype
echo $cmd1 $user1 $deviceid1 $devicetype2
IFS="?"
done
This should reduce the line to a series of ordered pairs.
Reply With Quote
Reply

Tags
logs, zimbra

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On