forum.gl-inet.cn

 找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
热搜: 活动 交友 discuz
    查看: 835|回复: 7

    [经验分享] sft1200 显示CPU温度

    [复制链接]

    17

    主题

    104

    帖子

    1304

    积分

    金牌会员

    Rank: 6Rank: 6

    积分
    1304
     楼主| 发表于 2024-7-21 05:13:18 | 显示全部楼层 |阅读模式


    想要显示CPU温度的,请替换下面的文件。或者自己添加代码

    /usr/lib/lua/luci/view/admin_status下的index.htm



    红色是需要添加的内容:


    <div class="tr"><div class="td left" width="33%"><%:Kernel Version%></div><div class="td left"><%=unameinfo.release or "?"%></div></div>
    <div class="tr"><div class="td left" width="33%"><%:CPU Temperature%></div><div class="td left"><%=luci.sys.exec("cut -c1-2 /sys/class/thermal/thermal_zone0/temp")%>&degC</div></div>
    <div class="tr"><div class="td left" width="33%"><%ocal Time%></div><div class="td left" id="localtime">-</div></div>
    <div class="tr"><div class="td left" width="33%"><%:Uptime%></div><div class="td left" id="uptime">-</div></div>
    <div class="tr"><div class="td left" width="33%"><%oad Average%></div><div class="td left" id="loadavg">-</div></div>

    本帖子中包含更多资源

    您需要 登录 才可以下载或查看,没有帐号?立即注册

    x
    回复

    使用道具 举报

    0

    主题

    6

    帖子

    98

    积分

    注册会员

    Rank: 2

    积分
    98
    发表于 2024-7-28 17:33:10 | 显示全部楼层


    好使 感谢


    回复

    使用道具 举报

    2

    主题

    18

    帖子

    190

    积分

    注册会员

    Rank: 2

    积分
    190
    发表于 2024-7-30 17:43:39 | 显示全部楼层


    感谢分享,可以顺便把使用率也加上

    <div class="tr"><div class="td left" width="33%">CPU 使用率</div><div class="td left" id="cpu_usage">-</div></div>

    本帖子中包含更多资源

    您需要 登录 才可以下载或查看,没有帐号?立即注册

    x
    回复

    使用道具 举报

    2

    主题

    25

    帖子

    862

    积分

    高级会员

    Rank: 4

    积分
    862
    发表于 2024-8-14 21:28:37 | 显示全部楼层
    楼主,我目录下的index.htm文件没有<div class="tr"><div class="td left" width="33%"><%:Kernel Version%></div><div class="td left"><%=unameinfo.release or "?"%></div></div>
    之类的代码怎么办?

    本帖子中包含更多资源

    您需要 登录 才可以下载或查看,没有帐号?立即注册

    x
    回复

    使用道具 举报

    17

    主题

    104

    帖子

    1304

    积分

    金牌会员

    Rank: 6Rank: 6

    积分
    1304
     楼主| 发表于 2024-8-15 17:10:03 | 显示全部楼层
    777 发表于 2024-8-14 21:28
    楼主,我目录下的index.htm文件没有
    之类的代码怎么办?

    应该需要先安装luci,在界面里-高级设置里安装官方的luci
    回复

    使用道具 举报

    2

    主题

    25

    帖子

    862

    积分

    高级会员

    Rank: 4

    积分
    862
    发表于 2024-8-15 17:54:43 | 显示全部楼层
    240038901 发表于 2024-8-15 17:10
    应该需要先安装luci,在界面里-高级设置里安装官方的luci

    软件包里所有luci都安装完了,html里也没有相关元素

    本帖子中包含更多资源

    您需要 登录 才可以下载或查看,没有帐号?立即注册

    x
    回复

    使用道具 举报

    17

    主题

    104

    帖子

    1304

    积分

    金牌会员

    Rank: 6Rank: 6

    积分
    1304
     楼主| 发表于 2024-8-16 15:47:08 | 显示全部楼层
    777 发表于 2024-8-15 17:54
    软件包里所有luci都安装完了,html里也没有相关元素

    这个只适合openwrt 18 和 openwrt 19
    回复

    使用道具 举报

    0

    主题

    6

    帖子

    98

    积分

    注册会员

    Rank: 2

    积分
    98
    发表于 2024-8-30 16:20:51 | 显示全部楼层
    本帖最后由 undefined 于 2024-8-30 16:21 编辑

    看了一下楼上的添加CPU占用率 试了试发现还需要补充其他信息 在恩山搜到了 这个帖子的6L

    https://www.right.com.cn/forum/forum.php?mod=redirect&goto=findpost&ptid=256122&pid=2138558

    主题是 luci-theme-argon https://github.com/jerrykuku/luci-theme-argon/releases/tag/v1.8.3



    回复

    使用道具 举报

    您需要登录后才可以回帖 登录 | 立即注册

    本版积分规则

    Archiver|手机版|小黑屋|gl-inet.cn ( 粤ICP备18130956号 )

    GMT+8, 2024-9-8 09:07 , Processed in 0.022568 second(s), 25 queries .

    Powered by Discuz! X3.4

    Copyright © 2001-2021, Tencent Cloud.

    快速回复 返回顶部 返回列表