10.30.06
Making Analog More Mac-Friendly
As a Macintosh software developer, knowing statistics about what platform my users are using is very important. Do I need to support Panther? How important is an Universal binary?
Unfortunately, the stock analog doesn’t really help much in this regard. So here is a patch that should help things out. Instead of a giant Mac grouping, you can now get the Mac traffic broken down by PPC, Intel, and CFNetwork.
The following patch is applied to analog-6.0/src/tree.c.
902a903,912
902a903,912
> else if ((c = strstr(whole, "PPC Mac OS X")) != NULL)
> *name = "Macintosh:Mac OS X (PPC)";
> else if ((c = strstr(whole, "Intel Mac OS X")) != NULL)
> *name = "Macintosh:Mac OS X (Intel)";
> else if ((c = strstr(whole, "CFNetwork")) != NULL)
> *name = "Macintosh:CFNetwork";
> else if ((c = strstr(whole, "XMLRPCCocoa")) != NULL)
> *name = "Macintosh:Other Macintosh";
> else if ((c = strstr(whole, "MarsEdit")) != NULL)
> *name = "Macintosh:Other Macintosh";
904c914
< *name = "Macintosh";
The one thing that could make this even more useful would be if every Mac application made sure its User-Agent included “PPC Mac OS X” OR “Intel Mac OS X”. For my logs, the top three are all from Ranchero: NetNewsWire, MarsEdit, and XMLRPCCocoa.


