Exemplo n.º 1
0
 static function web_getdisk_usage($customer_name, $domainname)
 {
     global $gbl, $sgbl, $login, $ghtml;
     return;
     //$path[] = "__path_customer_root/$customer_name/$domainname";
     $path[] = "__path_customer_root/{$customer_name}/__processed_stats/{$domainname}";
     $path[] = "__path_program_home/domain/{$domainname}/__backup/";
     //$path[] = "__path_httpd_root/$domainname";
     $t = 0;
     foreach ($path as $p) {
         $t += lxfile_dirsize($p);
     }
     return $t;
 }
Exemplo n.º 2
0
function lxfile_dstat($dir, $duflag)
{
    $dir = expand_real_root($dir);
    $list = lscandir_without_dot($dir);
    $ret = null;
    foreach ($list as $l) {
        $stat = lstat("{$dir}/{$l}");
        get_file_type("{$dir}/{$l}", $stat);
        remove_unnecessary_stat($stat);
        if ($duflag && is_dir("{$dir}/{$l}") || $l === ".trash") {
            $stat['size'] = lxfile_dirsize("{$dir}/{$l}", true);
        } else {
            $stat['size'] = lxfile_size("{$dir}/{$l}");
        }
        $stat['name'] = "{$dir}/{$l}";
        $ret[] = $stat;
    }
    //dprintr($ret);
    return $ret;
}
Exemplo n.º 3
0
 static function findTotalUsage($driver, $list)
 {
     foreach ($list as $k => $d) {
         $ret[$k] = 0;
         $ret[$k] += lxfile_dirsize("__path_program_home/client/{$d['nname']}/");
         $ret[$k] += lxfile_dirsize("__path_customer_root/{$d['nname']}/");
     }
     return $ret;
 }
Exemplo n.º 4
0
 static function findTotalUsage($driver, $list)
 {
     foreach ($list as $k => $l) {
         $name = $l['dbname'];
         $ret[$k] = lxfile_dirsize("__path_mysql_datadir/{$name}");
     }
     return $ret;
 }
Exemplo n.º 5
0
 function getQuotadisk_usage()
 {
     global $gbl, $sgbl, $login, $ghtml;
     return lxfile_dirsize("/home/kloxo/domain/{$this->nname}");
 }
Exemplo n.º 6
0
 static function getBackupDiskSize($vpsname)
 {
     return lxfile_dirsize("__path_program_home/vps/{$vpsname}/__backup");
 }