code: public static function getDiskUsage()
      {
          $result = [];
          $lines = explode("\n", trim(shell_exec('df')));
          array_shift($lines);
          foreach ($lines as &$line) {
              if (0 === strpos($line, '/')) {
                  $result[] = explode("\t", $line);
              }
          }
  
          return $result;
      }
docs: Get disk usage on UNIX OS
  
  @return array Partitions space usage. Every partition (array element) consist of:
  <ul>
  <li>0 - Device</li>
  <li>1 - Capacity in kB</li>
  <li>2 - Used kB</li>
  <li>3 - Available Kb</li>
  <li>4 - Use percentage</li>
  <li>5 - Mount point</li>
  </ul>
  @static