The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

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 04: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 11:23 AM
Date/Time help ssmiths001 Shell Programming and Scripting 5 01-27-2006 03:40 AM
X Keyboard Extension version mismatch hiker04 SUN Solaris 0 09-13-2005 08:51 AM
time and date in os X help please dercarcort UNIX for Dummies Questions & Answers 1 06-30-2002 08:03 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 12-13-2005
r0sc0 r0sc0 is offline
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 12:47 PM..
  #2 (permalink)  
Old 12-13-2005
jim mcnamara jim mcnamara is offline Forum Staff  
...@...
  
 

Join Date: Feb 2004
Location: NM
Posts: 5,643
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.
  #3 (permalink)  
Old 12-13-2005
r0sc0 r0sc0 is offline
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?
  #4 (permalink)  
Old 12-13-2005
Just Ice's Avatar
Just Ice Just Ice is offline Forum Advisor  
Lights on, brain off.
  
 

Join Date: Mar 2005
Location: in front of my computer
Posts: 637
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!
  #5 (permalink)  
Old 12-13-2005
r0sc0 r0sc0 is offline
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?
  #6 (permalink)  
Old 12-13-2005
Just Ice's Avatar
Just Ice Just Ice is offline Forum Advisor  
Lights on, brain off.
  
 

Join Date: Mar 2005
Location: in front of my computer
Posts: 637
should look at system date ...
  #7 (permalink)  
Old 12-13-2005
Perderabo's Avatar
Perderabo Perderabo is offline Forum Staff  
Unix Daemon
  
 

Join Date: Aug 2001
Location: Ashburn, Virginia
Posts: 9,100
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 $!
Sponsored Links
Closed Thread

Bookmarks

Tags
linux, solaris

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -4. The time now is 12:20 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language translation by Google.
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0