The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
Google UNIX.COM


UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Get date and time for past 1 hour from current date spch2o Shell Programming and Scripting 5 08-29-2008 01:32 AM
Processing a log file based on date/time input and the date/time on the log file primp Shell Programming and Scripting 4 03-16-2008 08:23 AM
Date/Time help ssmiths001 Shell Programming and Scripting 5 01-27-2006 12:40 AM
X Keyboard Extension version mismatch hiker04 SUN Solaris 0 09-13-2005 05:51 AM
time and date in os X help please dercarcort UNIX for Dummies Questions & Answers 1 06-30-2002 05:03 AM

Reply
 
Submit Tools LinkBack Thread Tools Display Modes
  #1  
Old 12-13-2005
Registered User
 

Join Date: Dec 2005
Location: MD
Posts: 18
Interesting date/ps time mismatch

[root@system root]# date;ps -ef|grep confused.
Tue Dec 13 11:11:22 EST 2005
root 12847 12733 0 11:21 pts/83 00:00:00 grep confused.

I am really confused on why my ps and my date command are returning different values for the time. Anyone know how to resolve this?

Running FC2, if it helps.

Last edited by r0sc0; 12-13-2005 at 09:47 AM.
Reply With Quote
Forum Sponsor
  #2  
Old 12-13-2005
...@...
 

Join Date: Feb 2004
Location: NM
Posts: 4,269
I get
Code:
kcsdev:/home/jmcnama> date;ps -ef|grep confused.
Tue Dec 13 09:45:12 MST 2005
 jmcnama  1699 20740  1 09:45:12 pts/3     0:00 grep confused.
which is what you'd expect.

I can't see why this could happen, unless you had multiple CPU's and multiple clocks.
I don't get it either.
Reply With Quote
  #3  
Old 12-13-2005
Registered User
 

Join Date: Dec 2005
Location: MD
Posts: 18
I have a hyperthreading Intel Xeon CPU, but I dont see how I would have multiple clocks, isnt my problem OS based?
Reply With Quote
  #4  
Old 12-13-2005
Just Ice's Avatar
Lights on, brain off.
 

Join Date: Mar 2005
Location: in front of my computer
Posts: 629
have you tried rebooting the box? if yes and the problem still occurs --- check the binaries for the date and ps for "corruption" ... you might have had some visitors that came in the night ... good luck!
Reply With Quote
  #5  
Old 12-13-2005
Registered User
 

Join Date: Dec 2005
Location: MD
Posts: 18
Something else I just noticed:
Quote:
[root@system modules]# date;ps -ef|grep date
Tue Dec 13 12:15:02 EST 2005
root 15270 12733 0 12:24 pts/83 00:00:00 grep date
Its not exactly 10 minutes off :P How does ps establish the stime?
Reply With Quote
  #6  
Old 12-13-2005
Just Ice's Avatar
Lights on, brain off.
 

Join Date: Mar 2005
Location: in front of my computer
Posts: 629
should look at system date ...
Reply With Quote
  #7  
Old 12-13-2005
Perderabo's Avatar
Unix Daemon
 

Join Date: Aug 2001
Location: Washington DC Area
Posts: 8,613
Post the output from the following commands...
env | grep -v COLOR
type ps
type date
date ; date -u
date ; perl -e 'print time(), " ", localtime(time()), "\n"'
touch fubar ; date ; ls -l fubar
{ sleep 1000 & } ; ps -fp $! ; ls -l /proc/$! ; kill $!
Reply With Quote
Google The UNIX and Linux Forums
Reply

Tags
linux, solaris

Thread Tools
Display Modes




All times are GMT -7. The time now is 09:38 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0