Best time to collect usage data?

jsefton

Verified User
Joined
Mar 30, 2004
Messages
36
Hi,

I have a billing system that i use to bill by customers and i am in the process of making it check all the accounts on a server to find out how much disk space and traffic each user has used in the month.

Im just wondering when is the best time to read this data from DA.

Im guessing that DA counts up the bandwidth until the last day of the month and then resets the stats for the 1st.

Can anyone tell me when *exactly* the stats get reset. (ie, midnight, 3am, etc)

The idea being so that i can setup a cronjob on the server that holds the billing system to collect the data from the DA servers about half an hour before the data gets reset.

Cheers to any who reply. :)

- James
 
Hello,

It gets reset at 1:20 am on the 1st of the month. That time may vary depending on how long ago your copy of DA was installed. Check your /etc/cron.d/directadmin_cron to find the exact time.

Also, you'll want to note that we're going to add stats for previous months in the next release. Keep an eye on this for more info: http://www.directadmin.com/features.php?id=377

John
 
Friends,

I've newly installed DA. I was using Ensim before and had a few critical problems with it. Now i want to get my 300+ domains to DA installed server but the passwords are crypted. I want to add domains automaticly with API but i don't know how to add users with crypted passwords.

Can somebody help me?
 
Passwords are one-way encrypted; that means there's no way (short of a brute force trial for every possible combination) to find out the original password.

So the only way to do it is to (after creating the new users on DA) cut the password field out of the old system's /etc/shadow file, and paste the password into the appropriate field in the new system's /etc/shadow file.

And if you make a mistake yes, you can lock yourself out of your system quite easily.

Jeff
 
So ?

Can you tell me where DA keeps virtual users passwords. Like mail addresses passwords.
 
Ok. Thanks i found them. It was under /etc/virtual/domain.com/passwd and created like .htpasswd file :) it looks quiet simple, then let me ask a last question. I wrote all domains, users, crypted passwords to a file. Can i create all my domains and users automaticly with a php script using API under linux. Does API supports that?

Of course i'll write passwd files then.
 
Back
Top