How to find process name in c

Blair P. Houghton bhoughto at cmdnfs.intel.com
Sun Oct 21 04:18:47 AEST 1990


>In article <2207 at megadon.UUCP>,
>	bhoughto at 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."



More information about the Comp.unix mailing list