Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 22 Jan 2013 14:17:39 -0800
From:      Stanislav Sedov <stas@freebsd.org>
To:        John Baldwin <jhb@freebsd.org>
Cc:        Mikolaj Golub <trociny@freebsd.org>, freebsd-hackers@freebsd.org, Robert Watson <rwatson@freebsd.org>
Subject:   Re: libprocstat(3): retrieve process command line args and environment
Message-ID:  <9679EEE4-BE52-493E-9188-CAECEE5E63D3@freebsd.org>
In-Reply-To: <201301221648.50747.jhb@freebsd.org>
References:  <20130119151253.GB88025@gmail.com> <201301221201.06290.jhb@freebsd.org> <20130122211743.GA4490@gmail.com> <201301221648.50747.jhb@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help

On Jan 22, 2013, at 1:48 PM, John Baldwin <jhb@freebsd.org> wrote:
>=20
> Well, you could make procstat open a kvm handle in both cases (open a =
"live"=20
> handle in the procstat_open_sysctl() case).  It just seems rather =
silly to be=20
> duplicating code in the two interfaces.  More a question for Robert: =
does=20
> libprocstat intentionally duplicate the code in libkvm for other =
things as=20
> well in the live case?  (Like fetching the list of processes?)
>=20

It does not actually has a duplicate code, the code for fetching the =
list of
processes via sysctl is different from the KVM case.  The open file =
descriptors
processing is different as well.  Because libprocstat implements almost =
the
same functionality both for sysctl and mvm backends, it can be used to =
analyze
both the live system and the kernel crash dumps.  The code Mikolaj =
proposed
only implements the sysctl backend currently, so it does not seem to =
have
any relation to KVM, so it will be a bit weird to make it open a KVM =
handle
though it does not use it.

--
ST4096-RIPE








Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?9679EEE4-BE52-493E-9188-CAECEE5E63D3>