站点动态:欢迎您!今天是 2025-06-26 星期四!

Emlog程序需要简单的统计运行时间、内存和数据库查询次数,用于Emlog的优化。
以下是Hack Emlog代码实现,操作前请先备份,支持Emlog Pro版本
1、前台页面显示统计。根目录index.php修改,<?php后面首行增加以下代码。需要开启memory_get_usage函数
$_SERVER['MEMORY_USAGE'] = memory_get_usage();
2、后台页面显示统计。admin\index.php,<?php后面首行增加以下代码。

问题描述
电脑无法开机,显示如下内容
attenion:unsupported video configuration detected
action is required
this comper has an add-in graphics card,but the monitor cable is plugged
to attach the monitor cable to the add-in graphics card:
1.shut down the computer

问题描述
Debian执行sudo时提示“XXX 不在sudoers文件中,此事将被报告”
问题分析
因为能执行sudo权限的用户都在/etc/sudoers文件中做了设置的。
解决方法
方法1:使用root账号,输入su,再输入root密码后就可以操作了,不需要sudo命令

问题描述
一台很老的Debian使用apt-get update的时候,出现一下报错:
Get:1 http://mirrors.163.com/debian buster InRelease [122 kB]
Get:2 http://mirrors.163.com/debian buster-updates InRelease [56.6 kB]
Get:3 http://security.debian.org/debian-security buster/updates InRelease [34.8 kB]
Reading package lists... Done
N: Repository 'http://mirrors.163.com/debian buster InRelease' changed its 'Version' value from '10.7' to '10.13'

问题描述
有一台OpenWrt X86由于长时间未登录,忘记了root密码,需要重置密码,但是需要保留其他配置。
解决方法
进入OpenWrt x86的console界面(直接接显示器的页面),输入以下命令重置密码。

OpenWrt默认使用uHTTPd来进行web服务,但是由于业务需求需要使用Nginx来驱动。
以下是使用nginx并开通Web网站的操作方法(OpenWrt 22.03.2 r19803-9a599fee93)
一、安装nginx
1、系统 -> software -> Update lists,搜索nginx,找到luci-nginx和luci-ssl-nginx并安装,这时可以看到uhttpd已经禁用,nginx已经启用

OpenWrt默认的软件源为openwrt.org,但是在国内使用速度非常慢,而且经常无法更新,所以需要更换为国内源。
Web页面更换国内源
1、系统 -> Software -> Configure OKPG...
2、/etc/opkg/distfeeds.conf下面的更改为国内源,然后保存即可。

OpenWrt原版默认为英文页面,而且不带中文语言包,需要通过安装中文语言包插件才可以设置为中文。
一、在线安装
1、OpenWrt WEB后台管理界面,System -> Software打开软件界面,点击Update lists...更新软件列表
2、点击 Dismiss
1、查看CPU信息
cat /proc/cpuinfo
2、查看内存信息
cat /proc/meminfo
3、查看硬盘使用情况
Linux的网卡bond
网卡bond是通过把多个物理网卡绑定为一个逻辑网卡,实现本地网卡的冗余,带宽扩容和负载均衡,具体的功能取决于采用的哪种模式。
bond的七种模式
1、mode=0(balance-rr)(平衡抡循环策略)