Plugin Directory

Changeset 1816122


Ignore:
Timestamp:
02/06/2018 06:33:52 AM (8 years ago)
Author:
fs1995
Message:

add system load

Location:
lw-mwp-tools/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • lw-mwp-tools/trunk/core.php

    r1816053 r1816122  
    22defined('ABSPATH') or die('No!');
    33
     4$loadavg = sys_getloadavg();
     5preg_match_all('/^processor/m', file_get_contents('/proc/cpuinfo'), $cores);
    46$meminfo = preg_split('/\ +|[\n]/', file_get_contents("/proc/meminfo")); //regex to split spaces and newline
    57
     
    8183
    8284echo "<h2>Server Resource Monitor</h2>This page does not automatically update, you will need to reload it.<br><br>
     85Load average: " . number_format($loadavg[0], 2) . " " . number_format($loadavg[1], 2) . " " . number_format($loadavg[2], 2) . "<br>
     86Cores: " . count($cores[0]) . "<br><br>
    8387<table>
    8488  <tr>
  • lw-mwp-tools/trunk/lw-mwp-tools.php

    r1816053 r1816122  
    55Description: Easy access to system logs and resource usage on the Liquid Web Managed WordPress Hosting Platform.
    66Author: Francis Smith
    7 Version: 0.1
     7Version: 0.2
    88Author URI: https://github.com/fs1995
    99License: GPL2
     
    4949  echo "<h2>NGINX Error Log viewer</h2>This page does not automatically update, you will need to refresh it.<pre>" . $lw_mwp_tools_log . "</pre>";
    5050}
    51 
  • lw-mwp-tools/trunk/readme.txt

    r1816053 r1816122  
    44Tags: liquidweb, liquid web, server info
    55Requires at least: 3.0.1
    6 Tested up to: 4.9.2
    7 Requires PHP: 4.3.0
    8 Stable tag: 0.1
     6Tested up to: 4.9.3
     7Requires PHP: 5.1.3
     8Stable tag: 0.2
    99License: GPLv2 or later
    1010License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    4141== Changelog ==
    4242
     43= 0.2 =
     44* View system load.
     45
    4346= 0.1 =
    4447* First release!
     48
     49== Upgrade Notice ==
     50
     51= 0.2 =
     52* Can now view system load.
Note: See TracChangeset for help on using the changeset viewer.