www.delorie.com/archives/browse.cgi | search |
X-Recipient: | archive-cygwin AT delorie DOT com |
DomainKey-Signature: | a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id |
:list-unsubscribe:list-subscribe:list-archive:list-post | |
:list-help:sender:reply-to:subject:to:references:from:message-id | |
:date:mime-version:in-reply-to:content-type | |
:content-transfer-encoding; q=dns; s=default; b=qvrN43AigcjAWJZj | |
rgHbmyxjp7AWcRCYT9gQTzH6P657w0RmPuzgKnGL8wvu29V7RsHUurmYFM0fKNiR | |
eSa/B0NUY5gFqCQvi+Uddv/KHXLjFCcvlkosioVBUFA/HPpY86lkDjLdks4qbA8k | |
ruX8VmdlThdPAW5IpBhLZvR37SQ= | |
DKIM-Signature: | v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id |
:list-unsubscribe:list-subscribe:list-archive:list-post | |
:list-help:sender:reply-to:subject:to:references:from:message-id | |
:date:mime-version:in-reply-to:content-type | |
:content-transfer-encoding; s=default; bh=ixUQdgD1/9TgZme2u+Aajn | |
I94kE=; b=aSM75xNRrRJncHlgJZXDCcBZHaSRICDLC+gIr5qUZQTxjNRnwCJbbR | |
bA6If/roDtaXzuDbP4kk1Ra7ZwwA1ZpF8mEWziIPRLWEUQoDt77u5gFxvlAFoJKS | |
4Lp0NWS11e2lrL8nM9JOsSkk9LO9ob/rwA3LJdl7pWDTSIFJbuPq8= | |
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
List-Id: | <cygwin.cygwin.com> |
List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
List-Archive: | <http://sourceware.org/ml/cygwin/> |
List-Post: | <mailto:cygwin AT cygwin DOT com> |
List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs> |
Sender: | cygwin-owner AT cygwin DOT com |
Mail-Followup-To: | cygwin AT cygwin DOT com |
Delivered-To: | mailing list cygwin AT cygwin DOT com |
Authentication-Results: | sourceware.org; auth=none |
X-Spam-SWARE-Status: | No, score=-2.4 required=5.0 tests=AWL,BAYES_00,KAM_NUMSUBJECT,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.1 spammy=sk:2019031, elevated, advised, unique |
X-HELO: | smtp-out-so.shaw.ca |
Reply-To: | Brian DOT Inglis AT SystematicSw DOT ab DOT ca |
Subject: | Re: ps -W now showing STIME Dec 31 |
To: | cygwin AT cygwin DOT com |
References: | <a72f126f-ee45-9d77-5116-6ec1eb64c878 AT SystematicSw DOT ab DOT ca> <20190321145237 DOT GF2167 AT calimero DOT vinschen DOT de> <f0a29c26-2c1a-7104-d832-a6ae0bda5e2b AT SystematicSw DOT ab DOT ca> <20190321190826 DOT GV3908 AT calimero DOT vinschen DOT de> |
From: | Brian Inglis <Brian DOT Inglis AT SystematicSw DOT ab DOT ca> |
Openpgp: | preference=signencrypt |
Message-ID: | <50fa5b02-3470-d8fb-92a0-98e88ec70d62@SystematicSw.ab.ca> |
Date: | Fri, 22 Mar 2019 12:52:53 -0600 |
User-Agent: | Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.6.0 |
MIME-Version: | 1.0 |
In-Reply-To: | <20190321190826.GV3908@calimero.vinschen.de> |
X-IsSubscribed: | yes |
On 2019-03-21 13:08, Corinna Vinschen wrote: > On Mar 21 10:02, Brian Inglis wrote: >> On 2019-03-21 08:52, Corinna Vinschen wrote: >>> On Mar 21 08:07, Brian Inglis wrote: >>>> With latest Cygwin ps -W is now showing STIME Dec 31 for Windows >>>> startup processes - these should be limited to actual start or uptime >>>> if possible. >>> It's not possible. Starttime requires ability to open process. >> Everything on Cygwin updated Mar 18. Running ps under bash from mintty >> launched from XDG. Ran cygcheck on ps below, and attached strace not >> showing much useful. Running under gdb, ps appears never to call >> GetProcessTimes on startup processes including my own startup scheduled >> tasks, so start_time is always zero, and is offset -7 to MST. Showing >> below also unique startup programs, unique other programs with normal times >> from System32, running Cygwin processes, and installed releases FYI. I >> could rebuild ps with debugging and add logging if not reproducible. > Sorry, but I really can't follow. It's really simple: If the user can open > a process, starttime is available, if the user can not open the process, > starttime is not available. Just check the ps source. If you see another > solution (no WMI, Bill is right there), feel free to provide a patch. Tried in PS and system startup process and task StartTime is not available: Get-Process | where {$_.StartTime} | Format-Table Id, StartTime, Name with or without the StartTime filter, in a unelevated process not in a domain; an elevated process shows it for all but the System Idle Process. It is available from WMI as shown by SysInternals ProcExp64 and directly by: $ wmic process get processid, creationdate, name # rearranged with awk Proce CreationDate Name 104 20190315065342.676287-360 Registry 4 20190315065436.434418-360 System 0 20190315065436.434418-360 System 408 20190315065436.891830-360 smss.exe 560 20190315065500.672209-360 csrss.exe 660 20190315065502.159992-360 wininit.exe 780 20190315065502.406370-360 services.exe 824 20190315065502.618164-360 lsass.exe 928 20190315065504.236736-360 svchost.exe 952 20190315065504.262313-360 svchost.exe 976 20190315065504.364113-360 fontdrvhost.exe In Cygwin ps, think zero could be subbed by what goes out as /proc/stat btime. I will try to pull it together and remember how git format-patch and send-email work. ;^> -- Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada This email may be disturbing to some readers as it contains too much technical detail. Reader discretion is advised. -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |