LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
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.

Notices


Reply
  Search this Thread
Old 03-11-2005, 12:26 PM   #1
MClayton
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 linuxquestions.org" followed by a network error when I tried to search, so I guess the site is busy!
 
Old 03-11-2005, 12:30 PM   #2
scuffell
Member
 
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 youremail@yourdomain.com

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

Original Poster
Rep: Reputation: 0
Thanks scuffell!
Actually the 'uptime' command was all I was after...it 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.
 
  


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 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 05:20 PM
i can't browse my linux machine from windows machine's network neighbourhood window yagneshmistry Linux - Networking 2 08-10-2004 02:52 AM
How Can I get Client Machine's IP in PHP ritesh_aladdin Linux - Software 3 08-19-2003 03:13 AM
How to get another machine's hostname? afpe Linux - Networking 4 01-27-2003 07:59 PM
How can one machine access other machine's directory Wagner Linux - Networking 1 06-05-2001 07:37 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 10:40 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