'Live' quota updates

ProWebUK

Verified User
Joined
Jun 9, 2003
Messages
1,963
Location
UK
One thing that I think is currently letting DirectAdmin down, we need live updates on quotas! :D

Chris
 
Hello,

That can be fixed one of two ways:

1) call the "quota -v" command each request through DA.. would slow things down a bit... or have a quota command who's job it is to show the results of that command.

2) have a re-tally button to recount everything.. it would bascially just run the tally on command for the User.. everything would be updated including webalizer etc.

Let me know what you think. :)

John
 
Dont like the idea of #2...... again its manual.

I would think the best way would be to have a token that triggers the update, then have that token on the main areas where quotas are more important - the main index page of a skin for domain admins and other importantn pages such as 'site information' pages for admins and resellers.

With the other pages i cant see it being to important, usually when you go into the add new skins page your not looking for users quotas, so you would therefore not need to slow down the panel updating quotas.

With the token, if it was possible it allows the different kinds of skins to utilising a feature without dramatic chnages in speed.... since it would only be one or 2 pages affected at all.

Once scripting is enabled within skins that idea would only need to be once even.. which would increase the speed even further.

Chris
 
DirectAdmin Support said:
2) ........everything would be updated including webalizer etc.

If webalizer was not updated with idea #1, then the suggestion i noted above could also be followed with a similar token for webalizer, which wwould only update when the webalizer pages were accessed again not slowing down the rest of the panel for 1 area.

Chris
 
#2 all the way.

Possibly add an 'only let users retally every X hours' option to prevent them running it every few minutes.
 
Last edited:
hmm your going against me :p . why manual when you can have live though?
 
Well.. here is what I'd do: Recalc bandwidth and space tallies when the user logs in. Have a button on the 'Stats' page to rebuild webalizer (but only let it run once every X hours).
 
ProWebUK said:
Dont like the idea of #2...... again its manual.

I would think the best way would be to have a token that triggers the update, then have that token on the main areas where quotas are more important - the main index page of a skin for domain admins and other importantn pages such as 'site information' pages for admins and resellers.

With the other pages i cant see it being to important, usually when you go into the add new skins page your not looking for users quotas, so you would therefore not need to slow down the panel updating quotas.

With the token, if it was possible it allows the different kinds of skins to utilising a feature without dramatic chnages in speed.... since it would only be one or 2 pages affected at all.

Once scripting is enabled within skins that idea would only need to be once even.. which would increase the speed even further.

Chris

Now that would sort your above problem and also automate webalizer areas without effecting speed..... to be honest if its 'live' im not interested in a manual update button. manual updates are already there through command line.. live atm is not possible which is where the suggestion comes into place ;)

Chris
 
Just out of curiosity I modified the crontab to do it every 1 minute which is as near live as I can get it just to see how it would affect server load.

I enabled both the quotacheck and the tally to run. It worked as expected, stats updated every 1min BUT server load went up from an average of 0.00 0.00 0.01 to 0.10 0.13 0.09

and thats only for 11 users with little bandwidth usage (6gb/mo at most), so just imagine the havoc that live stats would cause on a server with more than 600 users and nearly 2000gb/mo use.

So unless a more efficient way is found I wouldn't recommend live stats, but I'm for the button with a max execution times limit.
 
We have "live" quota limits already, so running the retally every minute, with no users accessing the panel to read the data even, would be a total waste of system resources....

My idea still goes in the lines of have a token.... or a simple check it does upon a correct login.... thats one simple command run every time you login or view a token.... the amount of usage that would get is minimal compared to a forced cron job *every* minute.
 
I'll look into adding something like that pretty soon. Seems in high enough demand ;)

Perhaps I can add a basic (simple and efficient without webalizer) retally command to the task.queue when a user logs in.. his stats would then be updated within one ... long ....minute.

Or else I can just add the system quota's value each time as well.. choices choices :)

John
 
what about a simple command that runs on a token, something like:

Code:
quota -v username | cut -d" " -f12 | tail -n1

should use little resources and do the trick here?

Chris
 
That would be the cleanest... Just have to figure out a way to show the system quota, as well as the "other" quotas (databases, email, etc), as they're seperate, and would just need to be added together each time...

John
 
Back
Top