public static function avgload()
    {
        $avgload = new \StdClass();
        if(false !== ($data = @file('/proc/loadavg'))){
            $data               = explode(" ", implode("", $data));
            $data               = array_chunk($data, 4);
            $avgload->min1      = $data[0][0];
            $avgload->min5      = $data[0][1];
            $avgload->min15     = $data[0][2];
            $fourth             = explode('/',$data[0][3]);
            $avgload->running   = $fourth[0];
            $avgload->exists    = $fourth[1];
            $avgload->recentPID = $data[1][0];
        }
        
        return $avgload;
        
    }
public static function avgload()
    {
        $avgload = new \StdClass();
        if(false !== ($data = @file('/proc/loadavg'))){
            $data               = explode(" ", implode("", $data));
            $data               = array_chunk($data, 4);
            $avgload->min1      = $data[0][0];
            $avgload->min5      = $data[0][1];
            $avgload->min15     = $data[0][2];
            $fourth             = explode('/',$data[0][3]);
            $avgload->running   = $fourth[0];
            $avgload->exists    = $fourth[1];
            $avgload->recentPID = $data[1][0];
        }
        
        return $avgload;
        
    }
public static function avgload ( ) { $ avgload = new \ StdClass ( ) ; if ( false !== ( $ data = @ file ( '/proc/loadavg' ) ) ) { $ data = explode ( " " , implode ( "" , $ data ) ) ; $ data = array_chunk ( $ data , 4 ) ; $ avgload -> min1 = $ data [ 0 ] [ 0 ] ; $ avgload -> min5 = $ data [ 0 ] [ 1 ] ; $ avgload -> min15 = $ data [ 0 ] [ 2 ] ; $ fourth = explode ( '/' , $ data [ 0 ] [ 3 ] ) ; $ avgload -> running = $ fourth [ 0 ] ; $ avgload -> exists = $ fourth [ 1 ] ; $ avgload -> recentPID = $ data [ 1 ] [ 0 ] ; } return $ avgload ; }
Server average load info
@return \StdClass
->min1
->min5
->min15
->running
->exists
->recentPID
Server average load info