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 |
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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
|
 |
11-09-2009, 07:54 AM
|
#1
|
Member
Registered: Oct 2008
Posts: 908
Rep:
|
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?
|
|
|
11-09-2009, 08:36 AM
|
#2
|
LQ Guru
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 27,609
|
Quote:
Originally Posted by sumeet inani
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...).
|
|
|
11-09-2009, 04:52 PM
|
#3
|
Senior Member
Registered: Jul 2007
Location: Directly above centre of the earth, UK
Distribution: SuSE, plus some hopping
Posts: 4,070
|
Quote:
Originally Posted by sumeet inani
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.
|
|
|
11-09-2009, 11:18 PM
|
#4
|
Member
Registered: Oct 2008
Posts: 908
Original Poster
Rep:
|
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.
|
|
|
11-10-2009, 12:15 AM
|
#5
|
Senior Member
Registered: Jan 2009
Location: "North Shore" Louisiana USA
Distribution: Mint v21.3 & v22.x with Cinnamon
Posts: 1,797
Rep: 
|
Quote:
Originally Posted by sumeet inani
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
|
|
|
11-12-2009, 02:11 AM
|
#6
|
Member
Registered: Oct 2008
Posts: 908
Original Poster
Rep:
|
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.
|
|
|
11-12-2009, 07:56 AM
|
#7
|
LQ Guru
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 27,609
|
Quote:
Originally Posted by sumeet inani
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?
|
|
|
11-13-2009, 02:28 AM
|
#8
|
Member
Registered: Oct 2008
Posts: 908
Original Poster
Rep:
|
I just wanted to find out time system takes to boot(i.e GUI appears with automatic login)?
|
|
|
11-13-2009, 04:00 AM
|
#9
|
LQ Newbie
Registered: May 2009
Location: the zero world
Distribution: F11, U9.04, Gentoo
Posts: 20
Rep:
|
Quote:
Originally Posted by sumeet inani
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...
|
|
|
11-13-2009, 11:01 AM
|
#10
|
Member
Registered: May 2008
Location: Ohio
Distribution: Slackware
Posts: 267
Rep:
|
my OS runs on fairy dust
Quote:
Originally Posted by sumeet inani
I am not fond of using softwares to find information.
|
Really?
|
|
|
12-14-2009, 03:36 AM
|
#11
|
Member
Registered: Oct 2008
Posts: 908
Original Poster
Rep:
|
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.
|
|
|
12-14-2009, 10:27 AM
|
#12
|
LQ Guru
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 27,609
|
Quote:
Originally Posted by sumeet inani
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.
|
|
|
12-15-2009, 02:25 AM
|
#13
|
Member
Registered: Oct 2008
Posts: 908
Original Poster
Rep:
|
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.
|
|
|
All times are GMT -5. The time now is 09:55 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.
|
Latest Threads
LQ News
|
|