Current time: 04-20-2024, 11:18 PM Hello There, Guest! (LoginRegister)


Post Reply 
Domain Disk and Traffic Usage Report
Author Message
FeG Offline
Banned

Posts: 222
Joined: Aug 2007
Post: #11
RE: Domain Disk and Traffic Usage Report
Hi,

(10-08-2008 07:29 PM)aseques Wrote:  Note: It's too late for this to be added to 1.0.0?

I suppose it is too late, since no new features are applied anymore - afaik. But that has to be decided by developers, not by me...

At least the script is so easy to install that it would be no tragedy if it'll be not added to 1.0.0 .. Wink

Regards
FeG
10-08-2008 10:05 PM
Find all posts by this user Quote this message in a reply
DaSilva Offline
Member
***

Posts: 302
Joined: Dec 2007
Reputation: 0
Post: #12
RE: Domain Disk and Traffic Usage Report
(10-08-2008 06:46 PM)FeG Wrote:  
(10-08-2008 05:13 AM)DaSilva Wrote:  Can you add a date -1 month like:

"=== ispCP - Domain Disk and Traffic Usage Report for 09.2008 ==="

I've added a date to the header, like this:
Code:
=== ispCP - Domain Disk and Traffic Usage Report (YYYY-MM-DD) ===

Quote:because I want to add the cronjob every first day in a month at 0:00.

You shouldn't do this because you'll get zero traffic always... This script reports the traffic of the current months, so you'll have to run it on the last day of each month, but this will be a bit difficult with cron ... you could run it on 28nd of each month, maybe..


Regards
FeG

Thanks, I will try it out. Smile
Now I have added this cronjob:

59 23 31 1,3,5,7,8,10,12 * /etc/ispcp/ispcp-domainreport-cronjob.sh
59 23 30 4,6,9,11 * /etc/ispcp/ispcp-domainreport-cronjob.sh
59 23 28 2 * /etc/ispcp/ispcp-domainreport-cronjob.sh
(This post was last modified: 10-09-2008 04:05 AM by DaSilva.)
10-09-2008 03:53 AM
Visit this user's website Find all posts by this user Quote this message in a reply
victor531 Offline
Junior Member
*

Posts: 167
Joined: Oct 2007
Reputation: 3
Post: #13
RE: Domain Disk and Traffic Usage Report
Hi,
Thanks BeNe, you are right, my script didn't have writing permission, now , it work's fine Smile

Saludos cordiales

Victor
10-09-2008 06:50 AM
Find all posts by this user Quote this message in a reply
aseques Offline
Member
*****
Dev Team

Posts: 330
Joined: May 2008
Reputation: 4
Post: #14
RE: Domain Disk and Traffic Usage Report
Is there anyone that has updated this script to group the results by distributor?
Having a monthly summary send by mail would be very useful
01-16-2009 12:59 AM
Find all posts by this user Quote this message in a reply
BeNe Offline
Moderator
*****
Moderators

Posts: 5,899
Joined: Jan 2007
Reputation: 68
Post: #15
RE: Domain Disk and Traffic Usage Report
Quote:Is there anyone that has updated this script to group the results by distributor?
I know none. But it is more or less a simple SQL Query. You can try to use "ORDER BY"

Greez BeNe
01-16-2009 06:06 AM
Visit this user's website Find all posts by this user Quote this message in a reply
pgentoo Offline
Member
*****
Dev Team

Posts: 326
Joined: Mar 2007
Reputation: 0
Post: #16
RE: Domain Disk and Traffic Usage Report
Great contribution. I'm sure this (or a version of it) will make it in post 1.0. Smile

Just an FYI, if you are running gentoo, you'll need to install the "mailx" package.

-
pGentoo
01-20-2009 01:55 PM
Find all posts by this user Quote this message in a reply
crafter Offline
Junior Member
*

Posts: 10
Joined: Sep 2009
Reputation: 0
Post: #17
RE: Domain Disk and Traffic Usage Report
I'm not meaning to hijack the thread, but I have created a PHP version that does the same thing and then sends out an email to the customer if there is overusage.

What's missing is the calculation for a reseller, as the reseller would normally be the party that is billed for overusage, which they will pass to their own clients. Also useful for the reseller is to provide a breakdown by owned domains.

Regards
Pradesh


Attached File(s)
.php  usage_reports.php (Size: 8.95 KB / Downloads: 38)
01-16-2010 09:56 AM
Find all posts by this user Quote this message in a reply
fulltilt Offline
Member
***

Posts: 1,225
Joined: Apr 2007
Reputation: 5
Post: #18
RE: Domain Disk and Traffic Usage Report
nice works - should a daily cron job run the script?

(01-16-2010 09:56 AM)crafter Wrote:  I'm not meaning to hijack the thread, but I have created a PHP version that does the same thing and then sends out an email to the customer if there is overusage.

What's missing is the calculation for a reseller, as the reseller would normally be the party that is billed for overusage, which they will pass to their own clients. Also useful for the reseller is to provide a breakdown by owned domains.

Regards
Pradesh
01-17-2010 01:38 AM
Find all posts by this user Quote this message in a reply
crafter Offline
Junior Member
*

Posts: 10
Joined: Sep 2009
Reputation: 0
Post: #19
RE: Domain Disk and Traffic Usage Report
Yes, fulltilt

I schedule it for midnight:
- In /etc/cron.d/daily/ispcp
---------------------------------------------------------
# resource usage - send email to customer - added by Pradesh - 2009/11/07
@daily root php /var/www/ispcp/engine/tools/usage_reports.php &>/var/log/ispcp/usage_reports.log
---------------------------------------------------------

You can guess that I installed the script in var/www/ispcp/engine/tools/usage_reports.php
01-17-2010 06:13 AM
Find all posts by this user Quote this message in a reply
fulltilt Offline
Member
***

Posts: 1,225
Joined: Apr 2007
Reputation: 5
Post: #20
RE: Domain Disk and Traffic Usage Report
getting some errors:
Code:
/var/www/ispcp/engine/tools/usage_reports.php: line 1: ?php: No such file or directory
/var/www/ispcp/engine/tools/usage_reports.php: line 3: /backup: is a directory
/var/www/ispcp/engine/tools/usage_reports.php: line 4: razor-agent.log: command not found
/var/www/ispcp/engine/tools/usage_reports.php: line 5: razor-agent.log: command not found
/var/www/ispcp/engine/tools/usage_reports.php: line 6: razor-agent.log: command not found
/var/www/ispcp/engine/tools/usage_reports.php: line 7: razor-agent.log: command not found
/var/www/ispcp/engine/tools/usage_reports.php: line 8: syntax error near unexpected token `('
/var/www/ispcp/engine/tools/usage_reports.php: line 8: ` * Copyright (c) 2009, Datacraft Software'

Warning: Division by zero in /var/www/ispcp/engine/tools/usage_reports.php on line 123

Warning: Division by zero in /var/www/ispcp/engine/tools/usage_reports.php on line 123

Warning: Division by zero in /var/www/ispcp/engine/tools/usage_reports.php on line 123

Warning: Division by zero in /var/www/ispcp/engine/tools/usage_reports.php on line 123
(This post was last modified: 01-26-2010 03:55 AM by fulltilt.)
01-26-2010 03:48 AM
Find all posts by this user Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)