萌新求助

foraire 15cm2021-03-021033 次点击
纯小白,请问各位大佬们能否把树莓派每一次的开机时间 远程(通过网络)记录在电脑上,或者说Pi Dashboard (Pi 仪表盘)能不能做到这种事呢?
就是我希望可以在手机或者电脑上远程查看树莓派的开机关机时间,只记录这一个数据,都需要些什么呢(树莓派是否需要联网,或者安装某些插件)
因为是纯小白所以希望各位大佬可以说的稍稍详细一些,非常非常感谢
收藏 ♥ 感谢
Spoony 小组长 2021-03-03 
Pi Dashboard 目前只能查看运行时间。

你需要用 last 命令
last

查看最近一次开机时间
who -b
或者
last -1 reboot

查看关机记录
last -x | grep shutdown #以关机时间段显示

Check last rebooted using “last reboot” command :
[root@server ~]# last reboot
reboot system boot 2.6.32-431.el6.x Sat Aug 16 09:34 - 01:11 (15:36)
reboot system boot 2.6.32-431.el6.x Tue Aug 12 19:39 - 00:13 (04:33)
reboot system boot 2.6.32-431.el6.x Mon Aug 11 23:08 - 23:59 (00:50)
reboot system boot 2.6.32-431.el6.x Tue Aug 5 11:47 - 05:41 (5+17:54)
reboot system boot 2.6.32-431.el6.x Tue Aug 5 09:03 - 11:18 (02:15)
reboot system boot 2.6.32-431.el6.x Tue Aug 5 08:58 - 09:03 (00:04)
reboot system boot 2.6.32-431.el6.x Fri Jul 18 00:47 - 00:51 (00:04)
reboot system boot 2.6.32-431.el6.x Sun Dec 8 11:22 - 11:23 (00:01)
reboot system boot 2.6.32-431.el6.x Sun Dec 8 10:28 - 10:30 (00:01)
reboot system boot 2.6.32-431.el6.x Sat Dec 7 21:54 - 22:40 (00:46)
reboot system boot 2.6.32-431.el6.x Sat Dec 7 19:46 - 21:54 (02:08)

wtmp begins Sat Dec 7 19:46:12 2013

登录注册 后可回复。




› 相关内容关注微信公众号