Skip to content
This repository has been archived by the owner on Oct 24, 2018. It is now read-only.

Data not showing in email #1

Closed
ehemmete opened this issue Aug 25, 2015 · 21 comments
Closed

Data not showing in email #1

ehemmete opened this issue Aug 25, 2015 · 21 comments

Comments

@ehemmete
Copy link

I am getting emails correctly each day, but most of the data is missing.

'Daily' Caching Server Data: 2015-08-21 06:15:06 through 2015-08-22 06:15:06
'Daily' Download requests served from cache: 317.44 MBs 
Amount streamed from Apple ( no peer servers detected ): 266.24 MBs 
(Potential) Net bandwidth saved: 51.2 MBs 

The 0 most frequently seen types of devices (of 0 unique devices in total, followed by their count) were: 
[] 
The server was accessed by those devices 0 times, 
IP ranges that devices most frequently accessed this server from were: 
[] 

Of the 0 different OS versions seen across all devices, the 0 most frequent were: 
[]

Any advice on troubleshooting this?
Thanks!

@arubdesu
Copy link
Contributor

Are you sure that caching server actual delivers cached content to devices? The fact that it's only moving a couple 100 MBs would indicate very little usage, but is at least working.
Are you sure you're running Server.app version 4.1+, and you've enabled the verbose logging with sudo serveradmin settings caching:LogClientIdentity = true?

@erikng
Copy link
Member

erikng commented Aug 25, 2015

Have you enabled advanced logging?

sudo serveradmin settings caching:LogClientIdentity

Sent from my iPhone

On Aug 25, 2015, at 9:32 AM, ehemmete notifications@github.com wrote:

I am getting emails correctly each day, but most of the data is missing.

'Daily' Caching Server Data: 2015-08-21 06:15:06 through 2015-08-22 06:15:06
'Daily' Download requests served from cache: 317.44 MBs
Amount streamed from Apple ( no peer servers detected ): 266.24 MBs
(Potential) Net bandwidth saved: 51.2 MBs

The 0 most frequently seen types of devices (of 0 unique devices in total, followed by their count) were:
[]
The server was accessed by those devices 0 times,
IP ranges that devices most frequently accessed this server from were:
[]

Of the 0 different OS versions seen across all devices, the 0 most frequent were:
[]
Any advice on troubleshooting this?

Thanks!


Reply to this email directly or view it on GitHub.

@ehemmete
Copy link
Author

I have enabled the advanced logging. I am running Server 4.1.5 on 10.10.5.
I am attaching the log file from 8/20/15 that shows some clients requesting updates and the daily email about the same day.
This is just a Mac Mini at my house, so there isn’t much traffic, but it is caching and serving some.

Thanks for your help!

Eric Hemmeter

On Aug 25, 2015, at 9:38 AM, Erik Gomez notifications@github.com wrote:

Have you enabled advanced logging?

sudo serveradmin settings caching:LogClientIdentity

Sent from my iPhone

On Aug 25, 2015, at 9:32 AM, ehemmete notifications@github.com wrote:

I am getting emails correctly each day, but most of the data is missing.

'Daily' Caching Server Data: 2015-08-21 06:15:06 through 2015-08-22 06:15:06
'Daily' Download requests served from cache: 317.44 MBs
Amount streamed from Apple ( no peer servers detected ): 266.24 MBs
(Potential) Net bandwidth saved: 51.2 MBs

The 0 most frequently seen types of devices (of 0 unique devices in total, followed by their count) were:
[]
The server was accessed by those devices 0 times,
IP ranges that devices most frequently accessed this server from were:
[]

Of the 0 different OS versions seen across all devices, the 0 most frequent were:
[]
Any advice on troubleshooting this?

Thanks!


Reply to this email directly or view it on GitHub.


Reply to this email directly or view it on GitHub #1 (comment).

@arubdesu
Copy link
Contributor

Your log didn't come through... try https://www.dropbox.com/request/7MxRxC3VDpjeaIl2BOci

@erikng
Copy link
Member

erikng commented Aug 25, 2015

Could you also run Cacher to see what it generates? I'm curious to see what difference in statistics show up as well.

If not, no problem.

Sent from my iPhone

On Aug 25, 2015, at 11:06 AM, Allister Banks notifications@github.com wrote:

Your log didn't come through... try https://www.dropbox.com/request/7MxRxC3VDpjeaIl2BOci


Reply to this email directly or view it on GitHub.

@arubdesu
Copy link
Contributor

You mean I shouldn't hard-code our Wi-Fi subnets first octet into the script? ;)
https://github.com/macadmins/sashay/blob/master/sashay.py#L164
Patch forthcoming.

@ehemmete
Copy link
Author

Nice catch! I tried looking through the script and skipped right over that.

Thanks,
Eric

On Aug 25, 2015, at 11:48 AM, Allister Banks notifications@github.com wrote:

You mean I shouldn't hard-code our Wi-Fi subnets first octet into the script? ;)
https://github.com/macadmins/sashay/blob/master/sashay.py#L164 https://github.com/macadmins/sashay/blob/master/sashay.py#L164
Patch forthcoming.


Reply to this email directly or view it on GitHub #1 (comment).

@erikng
Copy link
Member

erikng commented Aug 26, 2015

Eric,

Can you try the testing branch. I should have fixed your issue with the latest commit.

@ehemmete
Copy link
Author

I moved the old sashay.py out of the way and created a new one with the testing branch content. I then ran it manually and got this output:

mini01:/usr/local/bin serveradmin$ sudo ./sashay.py
This will be a very boring report if you dont run this command:
sudo serveradmin settings caching:LogClientIdentity = true
Daily Download requests served from cache: 204.8 MBs
Amount streamed from Apple ( no peer servers detected ): 122.88 MBs
(Potential) Net bandwidth saved: 81.92 MBs

The 4 most frequently seen types of devices (of 4 unique devices in total, followed by their count) were:
[('iPhone7,2', 4), ('dt:86)]', 2), ('dt:74)]', 2), ('Unknown Mac', 1)]
The server was accessed by those devices 9 times, (Unique devices above do not include some unspecified Macs)
IP ranges that devices most frequently accessed this server from were:
[('10.33.21', 9)]

Of the 3 different OS versions seen across all devices, the 3 most frequent were:
[('iOS/8.4.1', 4), ('iOS/9.0', 4), ('Mac OS 10.10.x', 1)]

3 different iPhone Applications were requested 8 times,
1 different Mac Applications and/or Updates were requested 1 times,

So I am getting data. Where it reports dt:86, that seems to be an iPad2,5 and dt:74 is an iPad2,1.

Since attaching logs didn’t work last time, here are the relevant lines for the dt:86:
2015-08-26 12:05:28.614 #zqcnmWzgco75 Request from 10.33.21.102:52283 [itunesstored/1.0 iOS/9.0 model/iPad2,5 hwp/s5l8942x build/13A4325c (5; dt:86)] for http://a1355.phobos.apple.com/us/r1000/179/Purple69/v4/c0/a6/9d/c0a69d59-3ddf-d042-c414-e2089d243f54/mzps1726572582688936356.ipa
2015-08-26 12:05:29.108 #C7K5MJoZ/DJt Request from 10.33.21.102:52284 [itunesstored/1.0 iOS/9.0 model/iPad2,5 hwp/s5l8942x build/13A4325c (5; dt:86)] for http://a1355.phobos.apple.com/us/r1000/179/Purple69/v4/c0/a6/9d/c0a69d59-3ddf-d042-c414-e2089d243f54/mzps1726572582688936356.ipa http://a1355.phobos.apple.com/us/r1000/179/Purple69/v4/c0/a6/9d/c0a69d59-3ddf-d042-c414-e2089d243f54/mzps1726572582688936356.ipa

and for dt:74:
2015-08-26 08:17:35.475 #b4t0mBWN/0R6 Request from 10.33.21.32:57382 [itunesstored/1.0 iOS/9.0 model/iPad2,1 hwp/s5l8940x build/13A4325c (2; dt:74)] for http://a1921.phobos.apple.com/us/r1000/159/Purple4/v4/71/64/dc/7164dc1e-6b5c-e42d-ba64-ca1751f2e756/mzps5781393570291690704.ipa
2015-08-26 08:17:47.207 #0AzE1geUtkFI Request from 10.33.21.32:57391 [itunesstored/1.0 iOS/9.0 model/iPad2,1 hwp/s5l8940x build/13A4325c (2; dt:74)] for http://a1921.phobos.apple.com/us/r1000/159/Purple4/v4/71/64/dc/7164dc1e-6b5c-e42d-ba64-ca1751f2e756/mzps5781393570291690704.ipa

Thanks for the update and let me know if I can help further!

Eric

On Aug 26, 2015, at 1:01 PM, Erik Gomez notifications@github.com wrote:

Eric,

Can you try the testing branch. I should have fixed your issue with the latest commit.


Reply to this email directly or view it on GitHub #1 (comment).

@arubdesu
Copy link
Contributor

huh, looks like 9.0 has a different longline format, thanks for the sample. This still isn't the fix because it assumes first octet is the same between client and server. Will probably just switch to a regex to catch IPs or figure out why I'm doing that field verification in the first place, I forget now.

@erikng
Copy link
Member

erikng commented Aug 26, 2015

FWIW, Cacher isn't impacted by this, as I am looking for the values rather than explicitly calling a location in the log.

Looks like get_device_stats function needs to be refactored. Time willing, I will take a stab at it.

@erikng
Copy link
Member

erikng commented Aug 26, 2015

Eric,

I noticed another interesting thing. Can you try the latest commit on the testing branch and see the following goes away?

This will be a very boring report if you dont run this command: sudo serveradmin settings caching:LogClientIdentity = true

It looks like it was always outputting a false response.

@ehemmete
Copy link
Author

I made the change and still get the same output. I then checked on my server with defaults and my LogClientIdentity = ‘true’ not True.

mini01:~ serveradmin$ defaults read /Library/Server/Caching/Config/Config LogClientIdentity
true
mini01:~ serveradmin$

Can that check be done in a case insensitive way?

On Aug 26, 2015, at 2:41 PM, Erik Gomez notifications@github.com wrote:

Eric,

I noticed another interesting thing. Can you try the latest commit on the testing branch and see the following goes away?

This will be a very boring report if you dont run this command:
sudo serveradmin settings caching:LogClientIdentity = true

It looks like it was always outputting a false response.


Reply to this email directly or view it on GitHub #1 (comment).

@erikng
Copy link
Member

erikng commented Aug 26, 2015

It isn't case sensitive. Can you ensure that you didn't set it as a string, rather than a Boolean?

Sent from my iPhone

On Aug 26, 2015, at 2:54 PM, ehemmete notifications@github.com wrote:

I made the change and still get the same output. I then checked on my server with defaults and my LogClientIdentity = ‘true’ not True.

mini01:~ serveradmin$ defaults read /Library/Server/Caching/Config/Config LogClientIdentity
true
mini01:~ serveradmin$

Can that check be done in a case insensitive way?

On Aug 26, 2015, at 2:41 PM, Erik Gomez notifications@github.com wrote:

Eric,

I noticed another interesting thing. Can you try the latest commit on the testing branch and see the following goes away?

This will be a very boring report if you dont run this command:
sudo serveradmin settings caching:LogClientIdentity = true

It looks like it was always outputting a false response.


Reply to this email directly or view it on GitHub #1 (comment).


Reply to this email directly or view it on GitHub.

@erikng
Copy link
Member

erikng commented Aug 26, 2015

My output is a "1", so I'm fairly certain you have it set as a string.

@ehemmete
Copy link
Author

Hmm… Using the command as the tool suggests seems to set it as a string.

mini01:~ serveradmin$ sudo serveradmin settings caching:LogClientIdentity = true
Password:
caching:LogClientIdentity = "true"
mini01:~ serveradmin$ sudo serveradmin settings caching:LogClientIdentity
caching:LogClientIdentity = "true"
mini01:~ serveradmin$ defaults read /Library/Server/Caching/Config/Config LogClientIdentity
true
mini01:~ serveradmin$

This seems to work:
sudo defaults write /Library/Server/Caching/Config/Config LogClientIdentity -bool true

As I then get:

mini01:~ serveradmin$ sudo serveradmin settings caching:LogClientIdentity
caching:LogClientIdentity = yes

and sashay reports properly:
mini01:~ serveradmin$ sudo /usr/local/bin/sashay.py
Daily Download requests served from cache: 266.24 MBs
Amount streamed from Apple ( no peer servers detected ): 174.08 MBs
(Potential) Net bandwidth saved: 92.16 MBs

The 4 most frequently seen types of devices (of 4 unique devices in total, followed by their count) were:
[('dt:74)]', 5), ('iPhone7,2', 4), ('dt:86)]', 2), ('Unknown Mac', 1)]
The server was accessed by those devices 12 times, (Unique devices above do not include some unspecified Macs)
IP ranges that devices most frequently accessed this server from were:
[('10.33.21', 12)]

Of the 3 different OS versions seen across all devices, the 3 most frequent were:
[('iOS/9.0', 7), ('iOS/8.4.1', 4), ('Mac OS 10.10.x', 1)]

4 different iPhone Applications were requested 11 times,
1 different Mac Applications and/or Updates were requested 1 times,

On Aug 26, 2015, at 2:57 PM, Erik Gomez notifications@github.com wrote:

My output is a "1". So I'm fairly certain you have it set as a string.


Reply to this email directly or view it on GitHub #1 (comment).

@erikng
Copy link
Member

erikng commented Aug 26, 2015

Can you see what sudo serveradmin settings caching:LogClientIdentity = 1 does?

If this fixes it, I will update the readme/script.

@ehemmete
Copy link
Author

That works as expected. Both serveradmin and defaults report back 1 and sashay does not complain about it not being set.

mini01:~ serveradmin$ sudo serveradmin settings caching:LogClientIdentity = 1
Password:
caching:LogClientIdentity = 1
mini01:~ serveradmin$ defaults read /Library/Server/Caching/Config/Config LogClientIdentity
1
mini01:~ serveradmin$ sudo serveradmin settings caching:LogClientIdentity
caching:LogClientIdentity = 1
mini01:~ serveradmin$ sudo /usr/local/bin/sashay.py
Daily Download requests served from cache: 266.24 MBs
Amount streamed from Apple ( no peer servers detected ): 174.08 MBs
(Potential) Net bandwidth saved: 92.16 MBs

The 4 most frequently seen types of devices (of 4 unique devices in total, followed by their count) were:
[('dt:74)]', 5), ('iPhone7,2', 4), ('dt:86)]', 2), ('Unknown Mac', 1)]
The server was accessed by those devices 12 times, (Unique devices above do not include some unspecified Macs)
IP ranges that devices most frequently accessed this server from were:
[('10.33.21', 12)]

Of the 3 different OS versions seen across all devices, the 3 most frequent were:
[('iOS/9.0', 7), ('iOS/8.4.1', 4), ('Mac OS 10.10.x', 1)]

4 different iPhone Applications were requested 11 times,
1 different Mac Applications and/or Updates were requested 1 times,

Eric

On Aug 26, 2015, at 3:12 PM, Erik Gomez notifications@github.com wrote:

Can you see what sudo serveradmin settings caching:LogClientIdentity = 1 does?

If this fixes it, I will update the readme/script.


Reply to this email directly or view it on GitHub #1 (comment).

@erikng
Copy link
Member

erikng commented Aug 26, 2015

Thanks for testing. I've pushed this fix to both the testing and master branch.

@ehemmete
Copy link
Author

You’re welcome. Thanks for a great tool!

On Aug 26, 2015, at 3:19 PM, Erik Gomez notifications@github.com wrote:

Thanks for testing. I've pushed this fix to both the testing and master branch.


Reply to this email directly or view it on GitHub #1 (comment).

@arubdesu
Copy link
Contributor

Pardon the lag, should be fixed by eadd54f. Closing in anticipation that I did that right.. ;)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants