[{"createTime":1735734952000,"id":1,"img":"hwy_ms_500_252.jpeg","link":"https://activity.huaweicloud.com/cps.html?fromacct=261f35b6-af54-4511-a2ca-910fa15905d1&utm_source=V1g3MDY4NTY=&utm_medium=cps&utm_campaign=201905","name":"华为云秒杀","status":9,"txt":"华为云38元秒杀","type":1,"updateTime":1735747411000,"userId":3},{"createTime":1736173885000,"id":2,"img":"txy_480_300.png","link":"https://cloud.tencent.com/act/cps/redirect?redirect=1077&cps_key=edb15096bfff75effaaa8c8bb66138bd&from=console","name":"腾讯云秒杀","status":9,"txt":"腾讯云限量秒杀","type":1,"updateTime":1736173885000,"userId":3},{"createTime":1736177492000,"id":3,"img":"aly_251_140.png","link":"https://www.aliyun.com/minisite/goods?userCode=pwp8kmv3","memo":"","name":"阿里云","status":9,"txt":"阿里云2折起","type":1,"updateTime":1736177492000,"userId":3},{"createTime":1735660800000,"id":4,"img":"vultr_560_300.png","link":"https://www.vultr.com/?ref=9603742-8H","name":"Vultr","status":9,"txt":"Vultr送$100","type":1,"updateTime":1735660800000,"userId":3},{"createTime":1735660800000,"id":5,"img":"jdy_663_320.jpg","link":"https://3.cn/2ay1-e5t","name":"京东云","status":9,"txt":"京东云特惠专区","type":1,"updateTime":1735660800000,"userId":3},{"createTime":1735660800000,"id":6,"img":"new_ads.png","link":"https://www.iodraw.com/ads","name":"发布广告","status":9,"txt":"发布广告","type":1,"updateTime":1735660800000,"userId":3},{"createTime":1735660800000,"id":7,"img":"yun_910_50.png","link":"https://activity.huaweicloud.com/discount_area_v5/index.html?fromacct=261f35b6-af54-4511-a2ca-910fa15905d1&utm_source=aXhpYW95YW5nOA===&utm_medium=cps&utm_campaign=201905","name":"底部","status":9,"txt":"高性能云服务器2折起","type":2,"updateTime":1735660800000,"userId":3}]
uptime 的功能是展示系统已运行的时间。
用法
uptime [options]
uptime 提供包含以下内容的一行信息:当前时间、系统运行了多长时间、当前登录的用户数以及过去 1、5 和 15 分钟的系统负载平均值。
系统负载平均值是处于可运行或不可中断状态的平均进程数。处于可运行状态的进程要么正在使用 CPU,要么正在等待使用
CPU。处于不可中断状态的进程正在等待某些 I/O 访问,例如等待磁盘。取三个时间间隔的平均值。负载平均值并未针对系统中的 CPU
数量进行标准化,因此负载平均值为 1 意味着单个 CPU 系统始终处于加载状态,而在 4 个 CPU 系统上则意味着它有 75% 的时间处于空闲状态。
选项
-p,--pretty
以更简洁格式显示。
-h,--help
展示帮助信息。
-s,--since
系统运行时间自从 yyyy-mm-dd HH:MM:SS。
-V,--version
展示版本信息。
相关文件
/var/run/utmp 当前登录到此系统的用户信息。
/proc 进程信息。
使用示例:
[root@server run]# uptime 15:03:58 up 32 days, 23:47, 1 user, load average:
0.07, 0.05, 0.05 [root@server run]# uptime -p up 4 weeks, 4 days, 23 hours, 47
minutes [root@server run]# uptime -s 2021-11-28 15:16:50