English 中文(简体)
Startup time in Solaris server using shell script
原标题:

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?

最佳回答

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

last reboot | head -1

and here is an alternative, assuming CPUs weren t taken off and on later:

psrinfo
问题回答

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





相关问题
What does it mean "to write a web service"?

I just asked a question about whether it was possible to write a web-page-checking code and run it from free web server, and one supporter answered and said that it was possible only if I run "a web ...

How can I use exit codes to run shell scripts sequentially?

Since cruise control is full of bugs that have wasted my entire week, I have decided the existing shell scripts I have are simpler and thus better. Here is what I have so far svn update /var/www/...

Dynamically building a command in bash

I am construcing a command in bash dynamically. This works fine: COMMAND="java myclass" ${COMMAND} Now I want to dynamically construct a command that redirectes the output: LOG=">> myfile.log ...

Why does Scala create a ~/tmp directory when I run a script?

When I execute a Scala script from the command line, a directory named "tmp" is created in my home directory. It is always empty, so I simply deleted it without any apparent problem. Of course, when I ...

Ivy, ant and start scripts

I have a project that uses ant to build and ivy for dependencies. I would like to generate the start scripts for my project, with the classpath, based on the dependencies configured in Ivy, ...

热门标签