Path: utzoo!attcan!uunet!aplcen!samsung!cs.utexas.edu!usc!wuarchive!julius.cs.uiuc.edu!apple!altos!megadon!clp From: bhoughto@cmdnfs.intel.com (Blair P. Houghton) Newsgroups: comp.unix Subject: Re: How to find process name in c Message-ID: <2234@megadon.UUCP> Date: 20 Oct 90 18:18:47 GMT References: <2207@megadon.UUCP> Sender: clp@megadon.UUCP Organization: Intel Corp, Chandler, AZ Lines: 34 Approved: clp@megadon.UUCP In-Reply-To: <2223@megadon.UUCP> Cc: >In article <2207@megadon.UUCP>, > bhoughto@cmdnfs.intel.com (Blair P. Houghton) writes: >> >>and doing 'time ps -ef' vs. 'time popenpsef' a few times, >>I get these results: > >[bogus conclusion about 'ps' behavior deleted] Mostly bogus :-). The perceived user-time isn't bogus at all. The program returns to the caller (whether command-line or script) _much_ faster when the pclose() is left to the kernel. This probably does require more real CPU time and definitely more kernel-mode time, but less user time, which (I'm glad this is a moderated group or this would start a purists-vs-pragmatists flame war) is what we're paid for, really. >Therefore, the timing statistics >refer only to the run time of "popenpsef" itself only. I prefer to think of it as an "executive" who's "delegated" the dirty work. >Here's the statistics as generated on my system. BTW, timing was done using >the built-in command of the csh, which seems (by the output format) to be >what you used as well. Yes, it was. --Blair "Sometimes, it pays."