Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Serious time for update of stat types #19

Closed
teqnodude opened this issue Sep 8, 2019 · 15 comments
Closed

Serious time for update of stat types #19

teqnodude opened this issue Sep 8, 2019 · 15 comments

Comments

@teqnodude
Copy link

teqnodude commented Sep 8, 2019

Things got a lot bigger and faster since glFTPD was first created so the show of KB/s, MB's etc is not relevant to the age we are in now. Same goes for the adding/removing of credits etc that require you to put in KB's instead of MB's. Would be helpful if they were all updated to more relevant stat types such as GB instead of MB and MB/s instead of KB/s etc.

@hrxcodes
Copy link

hrxcodes commented Sep 8, 2019

Relates to: #14

@Skeddie
Copy link
Collaborator

Skeddie commented Sep 9, 2019

I think the best way to implement this is to add two new config options where you can set the default speed and size to be displayed.
This avoids:

  • having to add all new Cookies for the newer sizes or,
  • updating them all and neglecting servers with slower speeds and/or sizes.

This also makes it more future proof. Text files will still need to be updated though. To make this future proof as well we could add two new cookies which hold the chosen speed and size indicators.

@teqnodude
Copy link
Author

It's not just about what is being displayed even tho I agree with what you just proposed as part of the solution, I like your solution. But when adding credits to users it makes more sense to add in MB/GB/TB than in KB so while updating the display of things may help, it does not solve all the problems.

@hrxcodes
Copy link

[17:51:16 SITE] site give user 1G
[17:51:16 SITE] 200 Successfully transferred 1048576K to user.

Giving credits in K/M/G works fine but return is always in K, if that was changed it would probably break a lot of scripts.

@teqnodude
Copy link
Author

Embarrassed to admit, I didn't even know it was possible giving credits in K/M/G, thought it was only possible in K. Since that is clearly possible then I tend to fully agree with the proposal made by Skeddie.

@hrxcodes
Copy link

RTFM 😄

site give <user> <#>["m"|"M"|"g"|"G"] [stringlist]
	Gives credits equal to the second argument to user, taking these from
	the logged in user. Amount is in KiB, use the suffixes for MiB or GiB.
	Last argument is a message to be sent.

	Example: site give Archimede 100000 there you go
	This will give 100000 KiB of credits to user "Archimede" and send the
	message "there you go".

@Skeddie
Copy link
Collaborator

Skeddie commented Sep 12, 2019

Let's add "t"|"T" to that list then...

@Skeddie
Copy link
Collaborator

Skeddie commented Nov 11, 2019

Ok, so I'd like some input regarding which cookies to adjust. So far these are being changed:

User Cookies:
  %[%f]IG: Total # of bytes uploaded in MiB.
  %[%f]IH: # of bytes uploaded this call in MiB.
  %[%f]Ih: # of bytes uploaded this week in MiB.
  %[%f]Ib: # of bytes uploaded this month in MiB.
  %[%f]IB: # of bytes uploaded this day in MiB.
  %[%f]IJ: Total # of bytes downloaded in MiB.
  %[%f]Ik: # of bytes downloaded this week in MiB.
  %[%f]IK: # of bytes downloaded this call in MiB.
  %[%f]Ip: # of bytes downloaded this month in MiB.
  %[%f]IP: # of bytes downloaded this day in MiB.
  %[%f]ID: Average download rate in KiB/s.
  %[%f]IS: Average download rate in KiB/s this day.
  %[%f]IV: Average download rate in KiB/s this week.
  %[%f]Iv: Average download rate in KiB/s this month.
  %[%f]IU: Average upload rate in KiB/s.
  %[%f]Is: Average upload rate in KiB/s this day.
  %[%f]Iq: Average upload rate in KiB/s this week.
  %[%f]IQ: Average upload rate in KiB/s this month.
  %[%f]IR: Overall average transfer rate in KiB/s.
  %[%f]Ix: Bytes nuked in MiB.
Ginfo Cookies:
  %[%f]gb: User's bytes up in MiB.
  %[%f]gc: User's bytes down in MiB.
  %[%f]gm: Total bytes up in MiB.
  %[%f]gn: Total bytes down in MiB.
Multipurpose stats Cookies:
  %[%s]Gb: Amount of bytes in KiB, all stats but nuketop.
  %[%s]Gs: Speed in KiB/s, usertops only.
  %[%s]Gn: Bytes nuked in MiB, nuketop only.

Now others that could be changed:

General Cookies:
  %[%f]F: Free space in CWD in MiB.
  %[%f]X: Free space in CWD in GiB.
User Cookies:
  %[%f]Ic: Amount of credits in MiB.
  %[%f]IW: Weekly allotment in MiB.
  %[%f]Iz: User's max allowed download speed in KiB/s.
  %[%f]I&: User's max allowed upload speed in KiB/s.
  %[%s]IX: List of credits ordered by stat_section, seperated by a space,
                 "-" if shared with the default stat_section.
Group Cookies:
  %[%s]Cw: Maximum weekly allotment size per user in KiB, "Unlimited" if 0.
Ginfo Cookies:
  %[%f]gW: Weekly allotment in MiB.
Show Totals Cookies:
  %[%s]Zb: Total bytes by uploader.
  %[%s]ZB: Total bytes in directory.
Who's Online Cookies:
  %[%s]Wa: User's action.
  %[%s]Wx: Total upload speed by all visible users.
  %[%s]Wy: Total download speed by all visible users.
Lastonline Cookies:
  %[%s]LU: The amount of bytes uploaded.
  %[%s]LD: The amount of bytes downloaded.
New Directories Cookies:
  %[%s]Ns: Files + Size (MiB or Gib if > 1GiB), "=Empty=" if no files,
                  else "XXXFYYYYYYYM" with X files and Y size and M a G if in GiB.
Nuke/Unnuke Cookies:
  %[%s]Ks: Multiplier + Size, "XXxYYYYY.YM" with X multiplier and Y size.
  • %F or %X: either one of those will need statline.txt changed.
  • %I*: will need user.txt changed.
  • %g*: will need ginfo.head/foot changed.
  • %Z*: will need show_totals.head changed, no bytes precision anymore.
  • %L*: no more autochange to B/KB/MB/GB and change of laston.body to have size indicator cookie.
  • %Ns: the M or G would be changed to what the chosen size is and no autochange to GiB anymore.
  • %Ks: the M would be changed to what the chosen size is.
  • %G*: will need changed *.head to use the size and speed indicator cookies.

@teqnodude
Copy link
Author

I say change all of the "Now others that could be changed:". :D

@Skeddie
Copy link
Collaborator

Skeddie commented Nov 14, 2019

That's the kind of input I can't do much with... You want weekly allotment also in GiB if size unit is set to GiB for stats? And which freespace would be in the shared sizeunit %F or %X? Etc...

Meanwhile other thing changed (but without cookies): site traffic output.

@teqnodude
Copy link
Author

Ok how about this then

General Cookies:
  %[%f]F: Free space in CWD in MiB.
  %[%f]X: Free space in CWD in GiB. <- possible to have it in TiB too?
User Cookies:
  %[%f]Ic: Amount of credits in MiB. <- possible to have it in GiB/TiB too?
  %[%f]IW: Weekly allotment in MiB. <- possible to have it in GiB/TiB too?
  %[%f]Iz: User's max allowed download speed in KiB/s. <- possible to have it in MiB/s too?
  %[%f]I&: User's max allowed upload speed in KiB/s. <- possible to have it in MiB/s too?
Group Cookies:
  %[%s]Cw: Maximum weekly allotment size per user in KiB, "Unlimited" if 0. <- possible to have it in MiB/GiB/TiB too?
Ginfo Cookies:
  %[%f]gW: Weekly allotment in MiB. <- possible to have it in MiB/GiB/TiB too?
Show Totals Cookies:
  %[%s]Zb: Total bytes by uploader. <- possible to have it in MiB/GiB/TiB too?
  %[%s]ZB: Total bytes in directory. <- possible to have it in MiB/GiB too?
Who's Online Cookies:
  %[%s]Wa: User's action.
  %[%s]Wx: Total upload speed by all visible users. <- possible to have it in MiB/s too?
  %[%s]Wy: Total download speed by all visible users. <- possible to have it in MiB/s too?
Lastonline Cookies:
  %[%s]LU: The amount of bytes uploaded. <- possible to have it in MiB/GiB/TiB too?
  %[%s]LD: The amount of bytes downloaded. <- possible to have it in MiB/GiB/TiB too?

@Skeddie
Copy link
Collaborator

Skeddie commented Nov 14, 2019

It's ZiB or nothing.

@Skeddie
Copy link
Collaborator

Skeddie commented Nov 14, 2019

OK, jokes aside. To be clear, we're not talking about adding more cookies; you want those you propose to follow the same sizeunit or speedunit that's been set in config (future display_size_unit and display_speed_unit) for the stats so far?
So if you set it to TiB, everything will be in TiB (and some will consequently be 0 even if it has e.g. 500GiB).

@teqnodude
Copy link
Author

"you want those you propose to follow the same sizeunit or speedunit that's been set in config (future display_size_unit and display_speed_unit) for the stats so far?"

Yes that would be great.

@Skeddie
Copy link
Collaborator

Skeddie commented Nov 17, 2019

Also adjusted %X, Ic, Iw, Iz, I&, Cw, gW, Wa, Wx and Wy. Lastonline I didn't touch cause it auto changes (did add TiB) and Show Totals also cause it has Bytes precision now and can't pick that with the new setting.

Done in the soon to appear 2.10beta.

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

No branches or pull requests

3 participants