Sponsor:

Server and Web Integrator
Link:
Kloxo-MR logo
6.5.0 or 7.0.0
Click for "How to install"
Donation/Sponsorship:
Kloxo-MR is open-source.
Donate and or Sponsorship always welcome.
Click to:
Click Here
Please login or register. 2024-04-27, 18:16:02

Author Topic: Bug in linuxfslib.php causing disk usage not to be counted  (Read 15680 times)

0 Members and 1 Guest are viewing this topic.

Offline Spacedust

  • Super Grand Master
  • ****
  • Posts: 4,050
  • Karma: +1/-0
    • View Profile
Re: Bug in linuxfslib.php causing disk usage not to be count
« Reply #15 on: 2013-04-23, 16:17:12 »
To get quota running on particular customer you have to create client with Resource Package and limited disk space for example to 50 GB.
« Last Edit: 1970-01-01, 01:00:00 by Guest »

Offline Spacedust

  • Super Grand Master
  • ****
  • Posts: 4,050
  • Karma: +1/-0
    • View Profile
Re: Bug in linuxfslib.php causing disk usage not to be count
« Reply #16 on: 2013-04-23, 16:29:20 »
Here you've got tutorial how to enable quota: http://www.yolinux.com/TUTORIALS/LinuxT ... uotas.html

It works fine on my VPS:

Code: [Select]
[root@nowosci /]# quota -u testclient                                                   Ograniczenia dyskowe user testclient (uid 7798):
 System plików   bloki mi?kki  twardy  pob?.   pliki mi?kki  twardy  pob?.
      /dev/root  100256  51200000 51200000              34       0       0
« Last Edit: 1970-01-01, 01:00:00 by Guest »

Offline Spacedust

  • Super Grand Master
  • ****
  • Posts: 4,050
  • Karma: +1/-0
    • View Profile
Re: Bug in linuxfslib.php causing disk usage not to be count
« Reply #17 on: 2013-04-23, 16:36:09 »
My temporary solution:

Code: [Select]
      exec("ionice -c2 -n7 du -s {$path}", $out);
       $os  = preg_replace("/s+/", ":", $out[0]);
       $t = str_replace(":{$path}", "", $os);
« Last Edit: 1970-01-01, 01:00:00 by Guest »

Offline Spacedust

  • Super Grand Master
  • ****
  • Posts: 4,050
  • Karma: +1/-0
    • View Profile
Re: Bug in linuxfslib.php causing disk usage not to be count
« Reply #18 on: 2013-04-23, 16:55:28 »
Look how this is made inside DirectAdmin:

http://forum.directadmin.com/showthread ... #post51071
« Last Edit: 1970-01-01, 01:00:00 by Guest »

Offline MRatWork

  • Administrator
  • The Elite
  • *****
  • Posts: 15,807
  • Karma: +119/-11
  • Gender: Male
    • View Profile
    • MRatWork Forum
Re: Bug in linuxfslib.php causing disk usage not to be count
« Reply #19 on: 2013-04-23, 17:22:52 »
I will use your 'ionice -c2 -n7' code.

For quota, it's not easy because need overhaul the code related to diskuse.
« Last Edit: 1970-01-01, 01:00:00 by Guest »
..:: MRatWork (Mustafa Ramadhan Projects) ::..
-- Server/Web-integrator - Web Hosting (Kloxo-MR READY!) --

Offline Spacedust

  • Super Grand Master
  • ****
  • Posts: 4,050
  • Karma: +1/-0
    • View Profile
Re: Bug in linuxfslib.php causing disk usage not to be count
« Reply #20 on: 2013-04-23, 18:24:16 »
Quote from: "MRatWork"
I will use your 'ionice -c2 -n7' code.

For quota, it's not easy because need overhaul the code related to diskuse.

We will have to do this anyway in future. I will be testing the new command tonight.
« Last Edit: 1970-01-01, 01:00:00 by Guest »

Offline Spacedust

  • Super Grand Master
  • ****
  • Posts: 4,050
  • Karma: +1/-0
    • View Profile
Re: Bug in linuxfslib.php causing disk usage not to be count
« Reply #21 on: 2013-04-24, 00:08:50 »
I found another bug !

Go to admin home -> select domains -> choose domains -> TotDisk is always 0 !

« Last Edit: 1970-01-01, 01:00:00 by Guest »

Offline MRatWork

  • Administrator
  • The Elite
  • *****
  • Posts: 15,807
  • Karma: +119/-11
  • Gender: Male
    • View Profile
    • MRatWork Forum
Re: Bug in linuxfslib.php causing disk usage not to be count
« Reply #22 on: 2013-04-24, 01:31:37 »
Look like certain codes unfinished by Ligesh. So, need more time to investigate dirsize codes.
« Last Edit: 1970-01-01, 01:00:00 by Guest »
..:: MRatWork (Mustafa Ramadhan Projects) ::..
-- Server/Web-integrator - Web Hosting (Kloxo-MR READY!) --

Offline Spacedust

  • Super Grand Master
  • ****
  • Posts: 4,050
  • Karma: +1/-0
    • View Profile
Re: Bug in linuxfslib.php causing disk usage not to be count
« Reply #23 on: 2013-04-24, 01:57:35 »
Quote from: "MRatWork"
Look like certain codes unfinished by Ligesh. So, need more time to investigate dirsize codes.

He propably wanted to add quota disk usage anyway. What would be the reason to integrate quotas directly inside Kloxo ? Try to do tail -f /usr/local/lxlabs/kloxo/shell_exec and then add customer with Resource Plan - you will see setquota command ;)
« Last Edit: 1970-01-01, 01:00:00 by Guest »

Offline Spacedust

  • Super Grand Master
  • ****
  • Posts: 4,050
  • Karma: +1/-0
    • View Profile
Re: Bug in linuxfslib.php causing disk usage not to be count
« Reply #24 on: 2013-04-25, 15:04:04 »
This is still causing our servers to overload. This can't stay that way !
« Last Edit: 1970-01-01, 01:00:00 by Guest »

Offline Spacedust

  • Super Grand Master
  • ****
  • Posts: 4,050
  • Karma: +1/-0
    • View Profile
Re: Bug in linuxfslib.php causing disk usage not to be count
« Reply #25 on: 2013-04-25, 17:25:00 »
Mustafa please write this function ASAP and I will donate this project !
« Last Edit: 1970-01-01, 01:00:00 by Guest »

Offline Spacedust

  • Super Grand Master
  • ****
  • Posts: 4,050
  • Karma: +1/-0
    • View Profile
Re: Bug in linuxfslib.php causing disk usage not to be count
« Reply #26 on: 2013-04-25, 18:22:29 »
I'm getting somewhere:

Code: [Select]
     exec("quota -u testclient | tail -1 | awk '{print $2}'", $out);
       $os  = preg_replace("/s+/", ":", $out[0]);
       $t = str_replace(":{$user}", "", $os);

This is reporting correctly, but all values for mail, mysql and web are the same.

First I need to replace testclient with $user then add additional function to use quota for web usage only.
« Last Edit: 1970-01-01, 01:00:00 by Guest »

Offline Spacedust

  • Super Grand Master
  • ****
  • Posts: 4,050
  • Karma: +1/-0
    • View Profile
Re: Bug in linuxfslib.php causing disk usage not to be count
« Reply #27 on: 2013-04-26, 00:26:00 »
Quote
I will use your 'ionice -c2 -n7' code.

Please use ionice -c3 -n7 at least ! This is the lowest priority.
« Last Edit: 1970-01-01, 01:00:00 by Guest »

Offline Spacedust

  • Super Grand Master
  • ****
  • Posts: 4,050
  • Karma: +1/-0
    • View Profile
Re: Bug in linuxfslib.php causing disk usage not to be count
« Reply #28 on: 2013-05-03, 00:05:06 »
Our developer will create quota for Kloxo-MR.
« Last Edit: 1970-01-01, 01:00:00 by Guest »

 


Top 10 Social Networking:    Facebook    Twitter    LinkedIn    Pinterest    Google Plus    Tumblr    Instagram    VK    Flickr    Vine
Click Here

Page created in 0.067 seconds with 18 queries.

web stats analysis