使用 shell 脚本在 Solaris 服务器中启动时间
如何使用shell脚本查找Solaris 5.1服务器的启动时间,需要知道进入运行状态需要多长时间?我需要知道从启动模式到运行模式需要多长时间?
How to find the start up time of a Solaris 5.1 server using a shell script,need to know how much time it took to be on running state?I need to know how much time it took to come to running mode from starting mode?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
没有 Solaris 5.1 这样的东西,我猜你指的是 Solaris 10 又名 SunOS 5.10。
不管怎样,这里有一种方法可以知道系统上次启动的时间
,这里有一个替代方案,假设 CPU 没有被关闭并稍后打开:
There is no such thing as Solaris 5.1, I guess you mean Solaris 10 a.k.a. SunOS 5.10.
Anyway, here is a way to know when the system last booted
and here is an alternative, assuming CPUs weren't taken off and on later:
您可以尝试的命令之一是正常运行时间。
one of the command you can try is uptime.
查找启动时间的最简单方法(这并不完全准确,假设您正在无暂停地完全重新启动,并忽略硬件引导时间,但可以完成工作)是简单地检查日志并获取时间码,其中系统进入您担心的任何状态,并减去最后一个“停止”状态的时间码
Easiest way to find the boot-up time (which is not entirely accurate, assumes you're doing a complete reboot with no pause, and ignores hardware bootstrapping time, but does the job) is to simply inspect the logs and get the timecode where the system enters whichever state you're worried about, and subtract the timecode of the last 'halting' state