LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How to find time system takes to boot using command (https://www.linuxquestions.org/questions/linux-newbie-8/how-to-find-time-system-takes-to-boot-using-command-767900/)

sumeet inani 11-09-2009 07:54 AM

How to find time system takes to boot using command
 
Hi,
I want to know Is there any command to find time system takes to start up?

TB0ne 11-09-2009 08:36 AM

Quote:

Originally Posted by sumeet inani (Post 3750252)
Hi,
I want to know Is there any command to find time system takes to start up?

No, but you can look at the system logs, since they're started at the same time as system boot. There may be a second or two delay, though, since the GRUB and other things run without logging (since the systems not' up TO log to yet...).

salasi 11-09-2009 04:52 PM

Quote:

Originally Posted by sumeet inani (Post 3750252)
Hi,
I want to know Is there any command to find time system takes to start up?

Can you define what you mean by this? Is the system started when it has the GUI running? before the gui is running? when it gets to some run level? And has it started at he tine power goes on or when the bios hands over? At the start of grub? When you hit a key in grub?

In any case, you may be able to see the point that you want from bootchart. Dmesg would be promising, but entries there aren't timestamped by default (for me, iptables entries are, but that's because of the way iptables is set up). You could get an approximate number from this - approximate because you can't really start it at the right time and you possibly can't stop it at the right time, depending on how you define the right time.

sumeet inani 11-09-2009 11:18 PM

I meant that i have set grub to load default in 1second & i have set autologin for user.so I want to know the time when GUI appears.

SaintDanBert 11-10-2009 12:15 AM

Quote:

Originally Posted by sumeet inani (Post 3751132)
I meant that i have set grub to load default in 1second & i have set autologin for user.so I want to know the time when GUI appears.

Take a look at http://www.bootchart.org/.
I've not used it ... yet ... but it seems to meet your stated requirements.

~~~ 0;-Dan

sumeet inani 11-12-2009 02:11 AM

I saw the otput of 'dmesg'.Can you tell me which is the point when GUI appears.I am not fond of using softwares to find information.

TB0ne 11-12-2009 07:56 AM

Quote:

Originally Posted by sumeet inani (Post 3753900)
I saw the otput of 'dmesg'.Can you tell me which is the point when GUI appears.I am not fond of using softwares to find information.

X windows startup isn't logged to dmesg, but to your syslog and/or Xorg.0.log.

And if you don't want to use 'softwares' (???), how are you planning on monitoring a computer?

sumeet inani 11-13-2009 02:28 AM

I just wanted to find out time system takes to boot(i.e GUI appears with automatic login)?

xaler 11-13-2009 04:00 AM

Quote:

Originally Posted by sumeet inani (Post 3755226)
I just wanted to find out time system takes to boot(i.e GUI appears with automatic login)?

If you do not want any softwares, the nearest thing you can do is to get a stop watch and time it with it from the time you press enter at GRUB to the point of X-auto-login... All the onus is on you...

but bootchart & dmesg are the best...

mudangel 11-13-2009 11:01 AM

my OS runs on fairy dust
 
Quote:

Originally Posted by sumeet inani (Post 3753900)
I am not fond of using softwares to find information.

Really?

sumeet inani 12-14-2009 03:36 AM

TB0ne said that
Code:

X windows startup isn't logged to dmesg, but to your syslog and/or Xorg.0.log.
Is the time at which login prompt appears OR when user logs in written in any logfile with respect to time at which the boot began?
I think this will help me get time system took to boot.

TB0ne 12-14-2009 10:27 AM

Quote:

Originally Posted by sumeet inani (Post 3790639)
TB0ne said that
Code:

X windows startup isn't logged to dmesg, but to your syslog and/or Xorg.0.log.
Is the time at which login prompt appears OR when user logs in written in any logfile with respect to time at which the boot began?
I think this will help me get time system took to boot.

It's approximately when the login screen appears.

Since you don't want to use "softwares", don't know what else to suggest. If it was me, and I wanted a very accurate boot-time measurement, I'd use bootchart, as was suggested to you. If you don't want to do that, insert a command to output the date to a file, in your rc.local. Then look in the system logs for a start time, and that file for an end time.

sumeet inani 12-15-2009 02:25 AM

So I added following line to /etc/rc.local
date >>/login.txt
Then I created an empty file /login.txt.
Now I had configured grub to load default in 10 second & set login in ubuntu to automatic.
I restarted my computer.

I see that /var/log/syslog says
Dec 15 13:34:27 lxuser-desktop syslogd 1.5.0#1ubuntu1: restart.
Whereas login.txt contains
Tue Dec 15 13:34:31 IST 2009

does that mean ubuntu takes only 4second to boot.


All times are GMT -5. The time now is 03:43 AM.