| View previous topic :: View next topic | 
	
	
		| Author | Message | 
	
		| hc2995 -
 
 
 Joined: 07 Aug 2006
 Posts: 644
 Location: Maryland, USA
 
 | 
			
				|  Posted: Fri Dec 22, 2006 8:55 pm    Post subject: Monituring bandwidth on a particular directory |   |  
				| 
 |  
				| Ok my friend is starting a site (not using abyss, iv told him a lot about it but hes not the sharpest tool in the shed ;) ) but the site the host he is going with will not allow him to put .mp3's on there server. I told him that i would host hsi music but he is only getting 2 GB of bandwidth per month (i think thats fare) and if he needs more its goinna be 5 bucks per 5Gb (but it add each month, like if he had 2 GB and bought 5 GB next month he will start with 7 GB) but before i do im looking for a program or script that will let me monture the bandwidth on his directory. If anyone knows where i can obtain such a script please post. 
 Thanks and merry Christmas,
 Hc2995
 _________________
 Where have i been? School got heck-tick, had to move half way around the state, then back... and then i had to change jobs, so iv been away for a while :P
 |  | 
	
		| Back to top |       | 
	
		|  | 
	
		| pkSML -
 
 
 Joined: 29 May 2006
 Posts: 959
 Location: Michigan, USA
 
 | 
			
				|  Posted: Fri Dec 22, 2006 10:28 pm    Post subject: |   |  
				| 
 |  
				| I have a PHP snippet that will parse the logfile. 
 You could have PHP run through the logfile and total the sent bytes.
 
 I'll try to get that snippet for you in maybe a day or so.
 _________________
 Stephen
 Need a LitlURL?
 
   http://CodeBin.yi.org
 |  | 
	
		| Back to top |       | 
	
		|  | 
	
		| hc2995 -
 
 
 Joined: 07 Aug 2006
 Posts: 644
 Location: Maryland, USA
 
 | 
			
				|  Posted: Sat Dec 23, 2006 1:08 am    Post subject: |   |  
				| 
 |  
				|  	  | pkSML wrote: |  	  | I have a PHP snippet that will parse the logfile. 
 You could have PHP run through the logfile and total the sent bytes.
 
 I'll try to get that snippet for you in maybe a day or so.
 | 
 
 Thanks, take your time no rush :D
 _________________
 Where have i been? School got heck-tick, had to move half way around the state, then back... and then i had to change jobs, so iv been away for a while :P
 |  | 
	
		| Back to top |       | 
	
		|  | 
	
		| pkSML -
 
 
 Joined: 29 May 2006
 Posts: 959
 Location: Michigan, USA
 
 |  | 
	
		| Back to top |       | 
	
		|  | 
	
		| hc2995 -
 
 
 Joined: 07 Aug 2006
 Posts: 644
 Location: Maryland, USA
 
 | 
			
				|  Posted: Sat Jan 06, 2007 11:11 pm    Post subject: |   |  
				| 
 |  
				| wow, i thought you had forgotten about me, no big deal on the time, hope you didnt lose anything. Thanks for the script :D _________________
 Where have i been? School got heck-tick, had to move half way around the state, then back... and then i had to change jobs, so iv been away for a while :P
 |  | 
	
		| Back to top |       | 
	
		|  | 
	
		| loloyd -
 
 
 Joined: 03 Mar 2006
 Posts: 435
 Location: Philippines
 
 | 
			
				|  Posted: Sun Jan 07, 2007 3:55 am    Post subject: |   |  
				| 
 |  
				| hc2995, regarding the mp3 files, maybe your friend can circumvent the restriction by renaming the files into another extension like .tx3.  for streaming, maybe declare it to be handled as audio/mp3 files, or users can be made to be aware to rename it to .mp3 after a download.  another alternative is to zip or rar those mp3 files prior to uploading in the server.  just providing some ideas anyway. 
 pkSML, so sorry to hear about that.  i hope you have backups of your precious data.  what was the brand/model/specs of this hd that crashed?
 _________________
 
   
  http://home.loloyd.com/ is online if the logo graphic at left is showing. 
 Last edited by loloyd on Mon Jan 08, 2007 4:14 am; edited 1 time in total
 |  | 
	
		| Back to top |       | 
	
		|  | 
	
		| pkSML -
 
 
 Joined: 29 May 2006
 Posts: 959
 Location: Michigan, USA
 
 | 
			
				|  Posted: Sun Jan 07, 2007 4:25 am    Post subject: |   |  
				| 
 |  
				| Loloyd, the HD was a Maxtor DiamondMax Plus 9 120 GB ATA/133 drive. It was in an USB enclosure and fell from the top of my computer case at a friend's house. It won't spin up when powered on. After about 5 seconds it makes some goofy sounds like from a Mario game or something. I don't know if it's something on the electronic board or something inside the drive (like the voice coil). 
 I have it backed up from about 4 months ago, but I still lost quite a bit of scripts (and all the quotes I saved from your sig :). I might try to take it in and see if I can get some of the data back.
 
 Hc2995, I actually found a copy of this script on my server just today. I thought I lost it with the HD. Hope it works well for you!
 _________________
 Stephen
 Need a LitlURL?
 
   http://CodeBin.yi.org
 |  | 
	
		| Back to top |       | 
	
		|  | 
	
		| hc2995 -
 
 
 Joined: 07 Aug 2006
 Posts: 644
 Location: Maryland, USA
 
 | 
			
				|  Posted: Sun Jan 07, 2007 5:49 am    Post subject: |   |  
				| 
 |  
				|  	  | pkSML wrote: |  	  | Loloyd, the HD was a Maxtor DiamondMax Plus 9 120 GB ATA/133 drive. It was in an USB enclosure and fell from the top of my computer case at a friend's house. It won't spin up when powered on. After about 5 seconds it makes some goofy sounds like from a Mario game or something. I don't know if it's something on the electronic board or something inside the drive (like the voice coil). 
 I have it backed up from about 4 months ago, but I still lost quite a bit of scripts (and all the quotes I saved from your sig :). I might try to take it in and see if I can get some of the data back.
 
 Hc2995, I actually found a copy of this script on my server just today. I thought I lost it with the HD. Hope it works well for you!
 | 
 
 The script should work, i just have to find out how many KB the script uses it self (so i can subtract it from the total)
 _________________
 Where have i been? School got heck-tick, had to move half way around the state, then back... and then i had to change jobs, so iv been away for a while :P
 |  | 
	
		| Back to top |       | 
	
		|  | 
	
		| pkSML -
 
 
 Joined: 29 May 2006
 Posts: 959
 Location: Michigan, USA
 
 | 
			
				|  Posted: Sun Jan 07, 2007 6:41 pm    Post subject: |   |  
				| 
 |  
				|  	  | hc2995 wrote: |  	  | i just have to find out how many KB the script uses it self | 
 If the script is in a different directory than the user's directory, it won't enter into the calculations.
 _________________
 Stephen
 Need a LitlURL?
 
   http://CodeBin.yi.org
 |  | 
	
		| Back to top |       | 
	
		|  | 
	
		| hc2995 -
 
 
 Joined: 07 Aug 2006
 Posts: 644
 Location: Maryland, USA
 
 | 
			
				|  Posted: Mon Jan 08, 2007 2:05 am    Post subject: |   |  
				| 
 |  
				| ok so i can keep the script in a folder like /no-access/ and have user accounts on like /SD/ and it wont interfere? _________________
 Where have i been? School got heck-tick, had to move half way around the state, then back... and then i had to change jobs, so iv been away for a while :P
 |  | 
	
		| Back to top |       | 
	
		|  | 
	
		| pkSML -
 
 
 Joined: 29 May 2006
 Posts: 959
 Location: Michigan, USA
 
 | 
			
				|  Posted: Mon Jan 08, 2007 2:21 am    Post subject: |   |  
				| 
 |  
				| Correct. The script will use the filesystem to load your logfile.
  	  | Quote: |  	  | 210.196.191.68 - - [30/Apr/2006:15:26:04 -0400] "GET /adserver/adxmlrpc.php HTTP/1.0" 404 7994 "" "" | 
 If you're checking for the /adserver directory, the script uses preg_match() to see if the bold part begins with /adserver. If it does, it adds the underlined value to its running total (which is the total bytes sent).
 
 It doesn't matter where the script is kept. As long as it's not in /sd, the script will not count it.
 _________________
 Stephen
 Need a LitlURL?
 
   http://CodeBin.yi.org
 |  | 
	
		| Back to top |       | 
	
		|  | 
	
		|  |