Exemplo n.º 1
0
function makeDiskBars()
{
    printDiskBarGB(getDiskspace("/"), "SSD", getDiskspaceUsed("/"), disk_total_space("/"));
    printDiskBarGB(getDiskspace("/Volumes/Isengard"), "Isengard", getDiskspaceUsed("/Volumes/Isengard"), disk_total_space("/Volumes/Isengard"));
    printDiskBar(getDiskspace("/Volumes/WD2.1"), "Minas Morgul", getDiskspaceUsed("/Volumes/WD2.1"), disk_total_space("/Volumes/WD2.1"));
    printDiskBar(getDiskspaceErebor("/Volumes/Erebor"), "Erebor", getDiskspaceUsed("/Volumes/Erebor"), 8961020000000.0);
    printDiskBar(getDiskspaceTV1("/Volumes/Television"), "Narya", getDiskspaceUsed("/Volumes/Television"), 5959350000000.0);
    printDiskBar(getDiskspaceTV2("/Volumes/Television 2"), "Nenya", getDiskspaceUsed("/Volumes/Television 2"), 5959350000000.0);
    printDiskBar(getDiskspaceTV3("/Volumes/Storage space"), "Vilya", getDiskspaceUsed("/Volumes/Storage space"), 4991780000000.0);
}
function makeTotalDiskSpace()
{
    $du = getDiskspaceUsed("/");
    /*+ getDiskspaceUsed("/Volumes/Time Machine") + getDiskspaceUsed("/Volumes/Isengard") + getDiskspaceUsed("/Volumes/1TB Portable") + getDiskspaceUsed("/Volumes/WD2.2") + getDiskspaceUsed("/Volumes/WD2.1") + getDiskspaceUsed("/Volumes/Barad-dur") + getDiskspaceUsed("/Volumes/Erebor") + getDiskspaceUsed("/Volumes/Television") + getDiskspaceUsed("/Volumes/Television 2");
     */
    $dts = disk_total_space("/");
    /*+ disk_total_space("/Volumes/Time Machine") + disk_total_space("/Volumes/Isengard") + disk_total_space("/Volumes/1TB Portable") + disk_total_space("/Volumes/WD2.2") + disk_total_space("/Volumes/WD2.1") + disk_total_space("/Volumes/Barad-dur") + $GLOBALS['ereborTotalSpace'] + $GLOBALS['televisionTotalSpace'] + $GLOBALS['television2TotalSpace']
     */
    $dfree = $dts - $du;
    printTotalDiskBar(sprintf('%.0f', $du / $dts * 100), "Total Capacity", $dfree, $dts);
}
Exemplo n.º 3
0
function makeDiskBars()
{
    // For special drives like my Drobos I have to set the total disk space manually.
    // That is why you see the total space in bytes.
    printDiskBar(getDiskspace("/"), "SSD", disk_free_space("/"), disk_total_space("/"));
    printDiskBar(getDiskspace("/Volumes/Time Machine"), "Time Machine", disk_free_space("/Volumes/Time Machine"), disk_total_space("/Volumes/Time Machine"));
    printDiskBar(getDiskspace("/Volumes/Isengard"), "Isengard", disk_free_space("/Volumes/Isengard"), disk_total_space("/Volumes/Isengard"));
    printDiskBar(getDiskspace("/Volumes/WD2.2"), "Minas Tirith", disk_free_space("/Volumes/WD2.2"), disk_total_space("/Volumes/WD2.2"));
    printDiskBar(getDiskspace("/Volumes/WD2.1"), "Minas Morgul", disk_free_space("/Volumes/WD2.1"), disk_total_space("/Volumes/WD2.1"));
    printDiskBar(getDiskspace("/Volumes/Barad-dur"), "Barad-dûr", disk_free_space("/Volumes/Barad-dur"), disk_total_space("/Volumes/Barad-dur"));
    printDiskBar(getDiskspaceErebor("/Volumes/Erebor"), "Erebor", $GLOBALS['ereborTotalSpace'] - getDiskspaceUsed("/Volumes/Erebor"), $GLOBALS['ereborTotalSpace']);
    printDiskBar(getDiskspaceTV1("/Volumes/Television"), "Narya", $GLOBALS['televisionTotalSpace'] - getDiskspaceUsed("/Volumes/Television"), $GLOBALS['televisionTotalSpace']);
    printDiskBar(getDiskspaceTV2("/Volumes/Television 2"), "Nenya", $GLOBALS['television2TotalSpace'] - getDiskspaceUsed("/Volumes/Television 2"), $GLOBALS['television2TotalSpace']);
}