Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - General
User Name
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.


  Search this Thread
Old 03-11-2005, 01:26 PM   #1
LQ Newbie
Registered: May 2004
Posts: 8

Rep: Reputation: 0
Question How do I get my machine's up time programmatically?

Sorry if this has been asked many times before, but I was unable to find anything by searching. I kept getting "waiting for" followed by a network error when I tried to search, so I guess the site is busy!
Old 03-11-2005, 01:30 PM   #2
Registered: Jun 2004
Location: Reading, UK
Distribution: SUSE 9.1, SUSE 9.2, SUSE 9.3, Knoppix 3.8, Gentoo 2005.0, cygwn, colinux
Posts: 100

Rep: Reputation: 15
So, do you want something like:

uptime > mail

Then you put that in a crontab with: crontab -e
If you need to know how to work a crontab, see
Old 03-11-2005, 01:39 PM   #3
LQ Newbie
Registered: May 2004
Posts: 8

Original Poster
Rep: Reputation: 0
Thanks scuffell!
Actually the 'uptime' command was all I was was that easy!
I'm still getting to know my way around Linux but am loving it!
My Linux machine serves out identical dynamically created web pages 3 times faster than my XP box (which is on superior hardware with twice the memory), so I'm sold!

I will look into the crontab stuff too.
Thanks again.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 On
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Suspend to Disk failed, now machine's CPU usage makes machine unusable tisource Linux - General 2 09-11-2005 06:20 PM
i can't browse my linux machine from windows machine's network neighbourhood window yagneshmistry Linux - Networking 2 08-10-2004 03:52 AM
How Can I get Client Machine's IP in PHP ritesh_aladdin Linux - Software 3 08-19-2003 04:13 AM
How to get another machine's hostname? afpe Linux - Networking 4 01-27-2003 08:59 PM
How can one machine access other machine's directory Wagner Linux - Networking 1 06-05-2001 08:37 AM

All times are GMT -5. The time now is 10:29 PM.

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