LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices



Reply
 
Search this Thread
Old 08-13-2003, 05:14 PM   #1
skate
Member
 
Registered: Aug 2003
Location: Bulgaria
Distribution: OpenSuse 10.3, Debian 4.0r3 "Etch", FreeBSD 7.1, Ubuntu
Posts: 210

Rep: Reputation: 30
Question uptime


How can i change the uptime in Red Hat 9.0 ?
My machine is on 12 days up and i wanna to change it for more time, something like 50 or more ..
If someone know how can i change it just to type it here... thanx~
 
Old 08-13-2003, 05:16 PM   #2
trickykid
Guru
 
Registered: Jan 2001
Posts: 24,133

Rep: Reputation: 199Reputation: 199
You can't that I know of, its basically pulling this information from your system and when it booted for the first time. Unless you can trick your computer into thinking it booted 50 days ago instead of 12, I really don't see the point in you trying to do this. Why not just let it keep running without a reboot, you'll get there in 38 more days...
 
Old 08-13-2003, 05:19 PM   #3
skate
Member
 
Registered: Aug 2003
Location: Bulgaria
Distribution: OpenSuse 10.3, Debian 4.0r3 "Etch", FreeBSD 7.1, Ubuntu
Posts: 210

Original Poster
Rep: Reputation: 30
heh thanx for the post|~
 
Old 08-13-2003, 05:25 PM   #4
Proud
Senior Member
 
Registered: Dec 2002
Location: England
Distribution: Used to use Mandrake/Mandriva
Posts: 2,794

Rep: Reputation: 116Reputation: 116
Hell if you want to brag about uptime, edit a screenshot showing something like GKrellm.
 
Old 08-13-2003, 05:29 PM   #5
trickykid
Guru
 
Registered: Jan 2001
Posts: 24,133

Rep: Reputation: 199Reputation: 199
Quote:
Originally posted by Proud
Hell if you want to brag about uptime, edit a screenshot showing something like GKrellm.
Or you can just run the command uptime and post here, then just edit it...
 
Old 08-13-2003, 05:41 PM   #6
acid2000
Member
 
Registered: Nov 2001
Location: Exeter, UK
Distribution: Gentoo 1.4
Posts: 243

Rep: Reputation: 30
Sorry to disagree but i'm sure that /proc/uptime has something to do with it.
 
Old 08-13-2003, 05:41 PM   #7
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,415

Rep: Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968
Quote:
Originally posted by trickykid
Or you can just run the command uptime and post here, then just edit it...
why would anyone want to do that?
Code:
25:40:15 up 8122 days, 11 min,  0.6 users,  goat average: 0.42, -0.35, 23.49
i'm not ashamed to admit this.. why should anyone else?
 
Old 08-13-2003, 05:47 PM   #8
trickykid
Guru
 
Registered: Jan 2001
Posts: 24,133

Rep: Reputation: 199Reputation: 199
Code:
 04:43:33 up  4.6 Billion Years,  1 user,  load average: 0.09, 0.16, 0.07
My machine runs the Earth.. if I reboot, you won't want to know the outcome...
 
Old 08-13-2003, 06:11 PM   #9
Looking_Lost
Senior Member
 
Registered: Apr 2003
Location: Eire
Distribution: Slackware 12.0, OpenSuse 10.3
Posts: 1,120

Rep: Reputation: 45
Quote:
My machine runs the Earth.. if I reboot, you won't want to know the outcome...
I hope you're using a UPS for all our sakes then
 
Old 08-13-2003, 06:35 PM   #10
Proud
Senior Member
 
Registered: Dec 2002
Location: England
Distribution: Used to use Mandrake/Mandriva
Posts: 2,794

Rep: Reputation: 116Reputation: 116
Nope, once the sun goes that's it, no backups for us
 
Old 08-14-2003, 02:31 AM   #11
skate
Member
 
Registered: Aug 2003
Location: Bulgaria
Distribution: OpenSuse 10.3, Debian 4.0r3 "Etch", FreeBSD 7.1, Ubuntu
Posts: 210

Original Poster
Rep: Reputation: 30
Heeee and so.... in /proc/uptime what i must type there is 1 empty file named uptime?
 
Old 08-14-2003, 02:42 AM   #12
MasterC
Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu
Posts: 12,612

Rep: Reputation: 64
Call:
cat /proc/uptime
If you see some numbers, feel free to manipulate them, you might be able to echo something:
echo 10000 > /proc/uptime
And and see if that up's the uptime

Good Luck!

Cool
 
Old 08-14-2003, 02:44 AM   #13
MasterC
Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu
Posts: 12,612

Rep: Reputation: 64
Nope, it didn't work for me See about adjusting your system clock, maybe that'll bump that uptime to the figures you are looking for. Or, if you'd like you can point them towards my box, currently running a 72/73 day uptime ( www.masterc.no-ip.org/forums at the bottom of the page ) and just tell em it's yours

Cool
 
Old 08-14-2003, 02:57 AM   #14
skate
Member
 
Registered: Aug 2003
Location: Bulgaria
Distribution: OpenSuse 10.3, Debian 4.0r3 "Etch", FreeBSD 7.1, Ubuntu
Posts: 210

Original Poster
Rep: Reputation: 30
ahum it doesnt works.... :|
 
Old 08-14-2003, 03:11 AM   #15
MasterC
Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu
Posts: 12,612

Rep: Reputation: 64
How about an alias? Remove the execute bit on your uptime call:
chmod a-x /usr/bin/uptime
And then create yourself a script or alias to call a complete fake uptime?
Code:
#!/bin/bash
date
echo  up  88 days,  1 user,  load average: 0.09, 0.16, 0.07
Save that as uptime in /usr/local/bin (the different directory than the real uptime is in). Make it executable:
chmod 755 /usr/local/bin/uptime
And then execute it:
uptime
And see if it works.

Alternatively, an alias:
Open up your ~/.bashrc And add an alias:
alias uptime='date && echo up 88 days, 1 user, load average: 0.09, 0.16, 0.07'
Save and exit, then source it:
. .bashrc
And then type:
uptime (after removing the execute bit from the real uptime app of course) and see if that works

Cool
 
  


Reply


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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Max uptime? driftingremains Linux - General 46 12-28-2013 08:20 AM
Uptime: 2.4 vs 2.6 Synesthesia Linux - General 4 10-17-2005 04:23 PM
24/7 uptime? jollyjoice General 20 01-25-2005 12:12 PM
uptime for server einstien Linux - General 2 09-20-2004 09:35 PM
Internet uptime plexy Linux - Networking 2 11-02-2003 11:42 AM


All times are GMT -5. The time now is 12:27 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration