This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Fwd: Any way to find the network usage by a process?


Hi -

On Thu, Oct 05, 2006 at 04:28:10PM -0700, Mike Mason wrote:
> [...]
> ERROR: empty aggregate near identifier 'execname' at nettop.stp:35:4
> WARNING: Number of errors: 1, skipped probes: 0
> Apparently using @sum on empty aggregates isn't allowed. I expected 0's to 
> be returned. 

As a judgement call, to be consistent with other extractors like @avg,
the @sum etc. of an empty set was deemed to be undefined.

> The only way to avoid the error is use @sum only if @count > 
> 0, which makes the printf too complex in my opinion.

Maybe so.  It's worth considering some syntactic sugar to express a
undefined=>0 intent.

> >The way that the script tracks pid-to-uid and pid-to-execname mappings
> >is not bad, though if that part were moved to new probes on fork or
> >exec, it would allow the network-related probes to run concurrently on
> >an SMP without fighting over locks.
> 
> But that would only catch processes created after the script starts, 
> correct?

That's true.

- FChE


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]