Discussion:
[p4] Preventing no longer running processes from appearing in process table
Lorikeet Lee (Intern)
2008-07-22 22:06:25 UTC
Permalink
Sometimes processes that have stopped running still appear in the process table when you call "p4 monitor show". Does anyone know if there is a way of preventing this from happening?

Thanks,

Lori
Stephen Vance
2008-07-22 22:25:08 UTC
Permalink
Preventing it, no. You can reduce its occurrence by making sure you shut
down Perforce cleanly at all times (e.g. use 'p4 admin stop', 'kill
-15', 'net stop Perforce' instead of 'kill -9' or 'End Process'). If it
occurs because of a Perforce process crash, report it to Support.

You can detect the mismatches automatically using techniques like I
assume you have to recognize the problem to begin with. You can use 'p4
monitor clear' to clean up the table.

Steve
Post by Lorikeet Lee (Intern)
Sometimes processes that have stopped running still appear in the process table when you call "p4 monitor show". Does anyone know if there is a way of preventing this from happening?
Thanks,
Lori
_______________________________________________
http://maillist.perforce.com/mailman/listinfo/perforce-user
--
Stephen Vance
www.vance.com
Lorikeet Lee (Intern)
2008-07-22 22:29:35 UTC
Permalink
That's true. However, I'd like to be able to detect these occurrences as soon as they happen. Usually I only find out about them when I notice that they've been running for one or more days.

On 22/07/08 6:25 PM, "Stephen Vance" <***@vance.com> wrote:

Preventing it, no. You can reduce its occurrence by making sure you shut
down Perforce cleanly at all times (e.g. use 'p4 admin stop', 'kill
-15', 'net stop Perforce' instead of 'kill -9' or 'End Process'). If it
occurs because of a Perforce process crash, report it to Support.

You can detect the mismatches automatically using techniques like I
assume you have to recognize the problem to begin with. You can use 'p4
monitor clear' to clean up the table.

Steve
Post by Lorikeet Lee (Intern)
Sometimes processes that have stopped running still appear in the process table when you call "p4 monitor show". Does anyone know if there is a way of preventing this from happening?
Thanks,
Lori
_______________________________________________
http://maillist.perforce.com/mailman/listinfo/perforce-user
--
Stephen Vance
www.vance.com
Tony Sweeney
2008-07-22 22:42:13 UTC
Permalink
Post by Lorikeet Lee (Intern)
Sometimes processes that have stopped running still appear in the process table when you call "p4 monitor show". Does anyone know if there is a way of preventing this from happening?
The "process table" for 'p4 monitor show' is really just the
'db.monitor' database table. Should a p4d process end abruptly, it's
possible that its db.monitor entry will not be removed, and will persist
until it is overwritten or cleared. There isn't currently a command to
sync db.monitor with the running server. You can, however, run 'p4
monitor clear [id|all]' to purge the table of either a numbered process
id or all entries, and p4 monitor will subsequently resume reporting
normally.

Tony.
Post by Lorikeet Lee (Intern)
Thanks,
Lori
_______________________________________________
http://maillist.perforce.com/mailman/listinfo/perforce-user
Robert Cowham
2008-07-23 09:13:03 UTC
Permalink
Post by Lorikeet Lee (Intern)
That's true. However, I'd like to be able to detect these
occurrences as soon as they happen. Usually I only find out
about them when I notice that they've been running for one or
more days.
Just curious as to why you are worried about them?

Apart from being untidy, what harm are they doing?

On Unix you can detect them on the server by checking if every PID in p4
monitor output corresponds to an active process (via ps) - detecting
inconsistencies due to simple time lage between commands left as a coding
exercise!

Must be possible on Windows too but harder as they are threads within p4d.

Robert
Michael Mirman
2008-07-23 13:22:38 UTC
Permalink
I asked the support recently about it.
They said that the most recent version of p4v (2007.3 at that time) is *better* with that - IOW, it leaves fewer IDLE processes running.

What I did is, I wrote a small script I run as a cron once a week and clear all IDLE processes that are older than X.
Let me know if you want to have this script.

--
Michael Mirman Tel: (508) 647-7555
The MathWorks, Inc. FAX: (508) 647-7013
3 Apple Hill Drive, Natick, MA 01760-2098

-----Original Message-----
From: perforce-user-***@perforce.com [mailto:perforce-user-***@perforce.com] On Behalf Of Lorikeet Lee (Intern)
Sent: Tuesday, July 22, 2008 6:06 PM
To: perforce-***@perforce.com
Subject: [p4] Preventing no longer running processes from appearing in process table

Sometimes processes that have stopped running still appear in the process table when you call "p4 monitor show". Does anyone know if there is a way of preventing this from happening?

Thanks,

Lori

_______________________________________________
perforce-user mailing list - perforce-***@perforce.com
http://maillist.perforce.com/mailman/listinfo/perforce-user
John Hopkins
2008-07-23 20:19:32 UTC
Permalink
Date: Tue, 22 Jul 2008 15:06:25 -0700
Subject: [p4] Preventing no longer running processes from appearing in
process table
Sometimes processes that have stopped running still appear in the
process table when you call "p4 monitor show". Does anyone know if
there is a way of preventing this from happening?
The 'id' returned from 'p4 monitor' maps to a process id on the
server. If you look at the process ids from no-longer-running
commands and check for those on the server, are they still running?
If not, perhaps checking that 'p4 monitor' ids are present on the
server would be a useful way to indicate what commands are no longer
running.

John
--
John Hopkins
Senior Build and Release Engineer, Sophos
Sophos - security and control
Continue reading on narkive:
Loading...