erikng / Cacher

A python script for extracting macOS Caching Server data
Apache License 2.0
134 stars 40 forks source link

Error with device counts #22

Closed calum-github closed 7 years ago

calum-github commented 7 years ago

I think the device counts are calculated incorrectly.

It looks to be counting the device number based upon the get request numbers rather than actual devices.

For example $TOTAL_IOS_NUMBER is just a calculation of of how many requests were made $yesterday that included iOS user agents. A single device might make 20 requests a day.

That doesn't mean 20 devices hit the caching server.

We should look at unique IP addresses and then break down that list and look for iOS (or other) devices based on that. Still an assumption that a device has the same IP address for a 24 hour period. But possibly more accurate.

erikng commented 7 years ago

You're absolutely right and it actually used to be accurate but Apple made logging changes. As always, PR's are gladly accepted. I still have zero time to do any new engineering effort on this.

Ideally it should be moved to Python.

calum-github commented 7 years ago

Cool I'm doing a bit of a re-write to suit our setup here, most of it will be portable. I'll create some PR's for bits that will merge in with yours when i'm done

yeah my python skills are not as good as my bash skills yet so that might have to wait a little bit :P

erikng commented 7 years ago

Please try https://github.com/erikng/Cacher/blob/python-refactor/Cacher

I will be closing this ticket, but you are welcome to re-open if this does not solve your issue.