[ ssic-linux-Bugs-1027800 ] ps miscalculates start time on other nodes

"SourceForge.net" <[email protected]>
Newsgroups gmane.linux.cluster.ssic.devel
Message-ID <[email protected]>
Bugs item #1027800, was opened at 2004-09-14 05:55
Message generated for change (Settings changed) made by rogertsang
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=405834&aid=1027800&group_id=32541

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
>Category: Sysadmin
>Group: default
Status: Open
Resolution: None
>Priority: 1
Private: No
Submitted By: John Hughes (hughesj)
Assigned to: Roopa Prabhu (roopa_prabhu)
>Summary: ps miscalculates start time on other nodes

Initial Comment:
ps works out the start time of a process as:

  node boot + process start time since node boot.

This gives the right time on the node the process was
started on and the wrong time on all other nodes.

For example:

$ onall ps -fp 637934
(node 1)
UID        PID  PPID  C STIME TTY          TIME CMD
jamie    637934 637872  0 Sep06 ?      00:00:00
/usr/bin/ssh-agent x-session-man(node 3)
UID        PID  PPID  C STIME TTY          TIME CMD
jamie    637934 637872  0 Sep15 ?      00:00:00
/usr/bin/ssh-agent x-session-man(node 4)
UID        PID  PPID  C STIME TTY          TIME CMD
jamie    637934 637872  0 Sep20 ?      00:00:00
/usr/bin/ssh-agent x-session-man(node 5)
UID        PID  PPID  C STIME TTY          TIME CMD
jamie    637934 637872  0 Sep21 ?      00:00:00
/usr/bin/ssh-agent x-session-man(node 6)
UID        PID  PPID  C STIME TTY          TIME CMD
jamie    637934 637872  0 Sep13 ?      00:00:00
/usr/bin/ssh-agent x-session-man(node 7)
UID        PID  PPID  C STIME TTY          TIME CMD
jamie    637934 637872  0 Sep16 ?      00:00:00
/usr/bin/ssh-agent x-session-man(node 9)
UID        PID  PPID  C STIME TTY          TIME CMD
jamie    637934 637872  0 10:44 ?      00:00:00
/usr/bin/ssh-agent x-session-man


----------------------------------------------------------------------

Comment By: Roopa Prabhu (roopa_prabhu)
Date: 2004-12-14 07:43

Message:
Logged In: YES 
user_id=820498

'ps' uses uptime info to calculate start time for a process.
This works well for processes running on local node.  Its
currently reading /proc/uptime of the node on which it is
running for all processes. Result of which process's STIME
field is being calculated differently on different node
depending on which node you run ps.
Same bug exits with the %CPU values, as it reads /proc/stat
file (for both top and ps).
Fix: 
Get uptime and cpu stat info of all nodes during
initilization of libproc.
Or do not support fields mentioned above in default view
mode as already implemented in 'top'.


----------------------------------------------------------------------

Comment By: Nobody/Anonymous (nobody)
Date: 2004-12-14 02:03

Message:
Logged In: NO 

I saw this happen a while back with Apache Jakarta Tomcat -
java webapp container.  Still need to verify this.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=405834&aid=1027800&group_id=32541

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.