How to find time system takes to boot using command
Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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...).
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.
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...
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.
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.
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.
Last edited by sumeet inani; 12-15-2009 at 02:27 AM.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.