LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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


Reply
  Search this Thread
Old 11-09-2009, 07:54 AM   #1
sumeet inani
Member
 
Registered: Oct 2008
Posts: 908
Blog Entries: 26

Rep: Reputation: 49
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?
 
Old 11-09-2009, 08:36 AM   #2
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,623

Rep: Reputation: 7964Reputation: 7964Reputation: 7964Reputation: 7964Reputation: 7964Reputation: 7964Reputation: 7964Reputation: 7964Reputation: 7964Reputation: 7964Reputation: 7964
Quote:
Originally Posted by sumeet inani View Post
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...).
 
Old 11-09-2009, 04:52 PM   #3
salasi
Senior Member
 
Registered: Jul 2007
Location: Directly above centre of the earth, UK
Distribution: SuSE, plus some hopping
Posts: 4,070

Rep: Reputation: 897Reputation: 897Reputation: 897Reputation: 897Reputation: 897Reputation: 897Reputation: 897
Quote:
Originally Posted by sumeet inani View Post
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.
 
Old 11-09-2009, 11:18 PM   #4
sumeet inani
Member
 
Registered: Oct 2008
Posts: 908

Original Poster
Blog Entries: 26

Rep: Reputation: 49
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.
 
Old 11-10-2009, 12:15 AM   #5
SaintDanBert
Senior Member
 
Registered: Jan 2009
Location: "North Shore" Louisiana USA
Distribution: Mint-20.1 with Cinnamon
Posts: 1,771
Blog Entries: 3

Rep: Reputation: 108Reputation: 108
Quote:
Originally Posted by sumeet inani View Post
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
 
Old 11-12-2009, 02:11 AM   #6
sumeet inani
Member
 
Registered: Oct 2008
Posts: 908

Original Poster
Blog Entries: 26

Rep: Reputation: 49
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.
 
Old 11-12-2009, 07:56 AM   #7
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,623

Rep: Reputation: 7964Reputation: 7964Reputation: 7964Reputation: 7964Reputation: 7964Reputation: 7964Reputation: 7964Reputation: 7964Reputation: 7964Reputation: 7964Reputation: 7964
Quote:
Originally Posted by sumeet inani View Post
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?
 
Old 11-13-2009, 02:28 AM   #8
sumeet inani
Member
 
Registered: Oct 2008
Posts: 908

Original Poster
Blog Entries: 26

Rep: Reputation: 49
I just wanted to find out time system takes to boot(i.e GUI appears with automatic login)?
 
Old 11-13-2009, 04:00 AM   #9
xaler
LQ Newbie
 
Registered: May 2009
Location: the zero world
Distribution: F11, U9.04, Gentoo
Posts: 20

Rep: Reputation: 1
Quote:
Originally Posted by sumeet inani View Post
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...
 
Old 11-13-2009, 11:01 AM   #10
mudangel
Member
 
Registered: May 2008
Location: Ohio
Distribution: Slackware
Posts: 267

Rep: Reputation: 56
Cool my OS runs on fairy dust

Quote:
Originally Posted by sumeet inani View Post
I am not fond of using softwares to find information.
Really?
 
Old 12-14-2009, 03:36 AM   #11
sumeet inani
Member
 
Registered: Oct 2008
Posts: 908

Original Poster
Blog Entries: 26

Rep: Reputation: 49
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.
 
Old 12-14-2009, 10:27 AM   #12
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,623

Rep: Reputation: 7964Reputation: 7964Reputation: 7964Reputation: 7964Reputation: 7964Reputation: 7964Reputation: 7964Reputation: 7964Reputation: 7964Reputation: 7964Reputation: 7964
Quote:
Originally Posted by sumeet inani View Post
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.
 
Old 12-15-2009, 02:25 AM   #13
sumeet inani
Member
 
Registered: Oct 2008
Posts: 908

Original Poster
Blog Entries: 26

Rep: Reputation: 49
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.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Can not find sdc1 and /dev takes a very long time to load walterbyrd Debian 2 10-31-2009 12:29 PM
LXer: Write Your Own Linux Twitter Client In Less Time Than It Takes To Find One! LXer Syndicated Linux News 0 07-09-2009 11:31 PM
Benchmarking a tape drive, time to copy takes forever, time to append takes longer? jeriryan Linux - Hardware 2 06-15-2008 12:15 AM
Loading Linux at boot takes much time maginotjr Slackware 4 10-11-2005 09:15 AM
Mandrake takes a LONG time to boot VinTSS Mandriva 2 01-11-2004 12:36 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:52 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration