• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

PHP get_single_sysctl函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中get_single_sysctl函数的典型用法代码示例。如果您正苦于以下问题:PHP get_single_sysctl函数的具体用法?PHP get_single_sysctl怎么用?PHP get_single_sysctl使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了get_single_sysctl函数的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: get_disks

function get_disks()
{
    global $g, $debug;
    $disks_array = array();
    $disks_s = explode(" ", get_single_sysctl("kern.disks"));
    foreach ($disks_s as $disk) {
        if (trim($disk)) {
            $disks_array[] = $disk;
        }
    }
    return $disks_array;
}
开发者ID:NewEraCracker,项目名称:pfsense,代码行数:12,代码来源:ecl.php


示例2: sprintf

				<div class="progress" >
					<div id="memUsagePB" class="progress-bar progress-bar-striped" role="progressbar" aria-valuenow="<?php 
echo $memUsage;
?>
" aria-valuemin="0" aria-valuemax="100" style="width: <?php 
echo $memUsage;
?>
%">
					</div>
				</div>
				<span id="memusagemeter"><?php 
echo $memUsage;
?>
</span><span>% of <?php 
echo sprintf("%.0f", get_single_sysctl('hw.physmem') / (1024 * 1024));
?>
 MiB</span>
			</td>
		</tr>
		<?php 
if ($showswap == true) {
    ?>
		<tr>
			<th><?php 
    echo gettext("SWAP usage");
    ?>
</th>
			<td>
				<?php 
    $swapusage = swap_usage();
开发者ID:nwholloway,项目名称:pfsense,代码行数:30,代码来源:system_information.widget.php


示例3: get_cpu_count

function get_cpu_count($show_detail = false)
{
    $cpucount = get_single_sysctl('kern.smp.cpus');
    if ($show_detail) {
        $cpudetail = "";
        exec("/usr/bin/grep 'SMP.*package.*core' /var/log/dmesg.boot | /usr/bin/cut -f2- -d' '", $cpudetail);
        $cpucount = $cpudetail[0];
    }
    return $cpucount;
}
开发者ID:OptimWIFI,项目名称:pfsense,代码行数:10,代码来源:functions.inc.php


示例4: DAMAGES

    INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
    AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
    AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
    OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
    SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
    INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
    CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
    ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
    POSSIBILITY OF SUCH DAMAGE.
*/
$nocsrf = true;
require_once "guiconfig.inc";
require_once "pfsense-utils.inc";
require_once "interfaces.inc";
require_once "widgets/include/carp_status.inc";
$carp_enabled = get_single_sysctl('net.inet.carp.allow') > 0;
?>
<table class="table table-striped" width="100%" border="0" cellspacing="0" cellpadding="0" summary="carp status">
<?php 
if (isset($config['virtualip']['vip'])) {
    $carpint = 0;
    foreach ($config['virtualip']['vip'] as $carp) {
        if ($carp['mode'] != "carp") {
            continue;
        }
        $ipaddress = $carp['subnet'];
        $password = $carp['password'];
        $netmask = $carp['subnet_bits'];
        $vhid = $carp['vhid'];
        $advskew = $carp['advskew'];
        $status = get_carp_interface_status("{$carp['interface']}_vip{$vhid}");
开发者ID:8191,项目名称:opnsense-core,代码行数:31,代码来源:carp_status.widget.php


示例5: unset

    exit;
}
## Find out whether there's hardware encryption or not
unset($hwcrypto);
$fd = @fopen("{$g['varlog_path']}/dmesg.boot", "r");
if ($fd) {
    while (!feof($fd)) {
        $dmesgl = fgets($fd);
        if (preg_match("/^hifn.: (.*?),/", $dmesgl, $matches) or preg_match("/.*(VIA Padlock)/", $dmesgl, $matches) or preg_match("/^safe.: (\\w.*)/", $dmesgl, $matches) or preg_match("/^ubsec.: (.*?),/", $dmesgl, $matches) or preg_match("/^padlock.: <(.*?)>,/", $dmesgl, $matches) or preg_match("/^glxsb.: (.*?),/", $dmesgl, $matches)) {
            $hwcrypto = $matches[1];
            break;
        }
    }
    fclose($fd);
    if (!isset($hwcrypto) && get_single_sysctl("dev.aesni.0.%desc")) {
        $hwcrypto = get_single_sysctl("dev.aesni.0.%desc");
    }
}
##build widget saved list information
if ($config['widgets'] && $config['widgets']['sequence'] != "") {
    $pconfig['sequence'] = $config['widgets']['sequence'];
    $widgetsfromconfig = array();
    foreach (explode(',', $pconfig['sequence']) as $line) {
        list($file, $col, $display) = explode(':', $line);
        // be backwards compatible
        // If the display column information is missing, we will assign a temporary
        // column here. Next time the user saves the dashboard it will fix itself
        if ($col == "") {
            if ($file == "system_information") {
                $col = "col1";
            } else {
开发者ID:BillTheBest,项目名称:pfsense,代码行数:31,代码来源:index.php


示例6: interfaces_carp_setup

            interfaces_carp_setup();
            set_single_sysctl('net.inet.carp.allow', '1');
        }
    }
}
$carpcount = 0;
foreach ($a_vip as $carp) {
    if ($carp['mode'] == "carp") {
        $carpcount++;
        break;
    }
}
// fetch pfsync info
$pfsyncnodes = json_decode(configd_run("filter list pfsync json"), true);
legacy_html_escape_form_data($a_vip);
$status = get_single_sysctl('net.inet.carp.allow') > 0;
$carp_detected_problems = array_pop(get_sysctl("net.inet.carp.demotion")) > 0;
include "head.inc";
?>

<body>
<?php 
include "fbegin.inc";
?>

<section class="page-content-main">
  <div class="container-fluid">
    <div class="row">
      <?php 
if (isset($savemsg)) {
    print_info_box($savemsg);
开发者ID:8191,项目名称:opnsense-core,代码行数:31,代码来源:carp_status.php


示例7: interface_ipalias_configure

                            interface_ipalias_configure($vip);
                        }
                        break;
                }
            }
        }
        interfaces_sync_setup();
        set_single_sysctl('net.inet.carp.allow', '1');
        $status = 1;
    }
}
$carp_detected_problems = get_single_sysctl("net.inet.carp.demotion");
if (!empty($_POST['resetdemotion'])) {
    set_single_sysctl("net.inet.carp.demotion", "-{$carp_detected_problems}");
    sleep(1);
    $carp_detected_problems = get_single_sysctl("net.inet.carp.demotion");
}
$pgtitle = array(gettext("Status"), gettext("CARP"));
$shortcut_section = "carp";
include "head.inc";
if ($savemsg) {
    print_info_box($savemsg, 'success');
}
$carpcount = 0;
if (is_array($config['virtualip']['vip'])) {
    foreach ($config['virtualip']['vip'] as $carp) {
        if ($carp['mode'] == "carp") {
            $carpcount++;
            break;
        }
    }
开发者ID:nwholloway,项目名称:pfsense,代码行数:31,代码来源:status_carp.php


示例8: mem_usage

?>
</td>
			<td width="75%" class="listr">
				<?php 
$memUsage = mem_usage();
?>
				<div class="progress">
				  <div id="memUsagePB" class="progress-bar" role="progressbar" aria-valuenow="60" aria-valuemin="0" aria-valuemax="100" style="width: 0%;">
				    <span class="sr-only"></span>
				  </div>
				</div>
				<span id="memusagemeter"><?php 
echo $memUsage . '%';
?>
</span> used <?php 
echo sprintf("%.0f/%.0f", $memUsage / 100.0 * get_single_sysctl('hw.physmem') / (1024 * 1024), get_single_sysctl('hw.physmem') / (1024 * 1024));
?>
 MB
			</td>
		</tr>
		<?php 
if ($showswap == true) {
    ?>
		<tr>
			<td width="25%" class="vncellt"><?php 
    echo gettext("SWAP usage");
    ?>
</td>
			<td width="75%" class="listr">
				<?php 
    $swapusage = swap_usage();
开发者ID:Toudix,项目名称:core,代码行数:31,代码来源:system_information.widget.php



注:本文中的get_single_sysctl函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP get_single_template函数代码示例发布时间:2022-05-15
下一篇:
PHP get_single函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap