How to discover manager & worker PIDs given a Varnish Cache instance name?

Carlos Abalde carlos.abalde at gmail.com
Thu Dec 19 08:33:32 UTC 2019


Hi Dridi,

It's ugly as hell, but it works. Sadly not an option for 4.1.

Thanks a lot,

--
Carlos Abalde

> On 18 Dec 2019, at 21:40, Dridi Boukelmoune <dridi at varni.sh> wrote:
> 
> Hello Carlos,
> 
> On Wed, Dec 18, 2019 at 4:04 PM Carlos Abalde <carlos.abalde at gmail.com> wrote:
>> 
>> Hi,
>> 
>> Simple question related with Varnish Cache and monitoring. Let's assume a single server running one or more Varnish Cache instances. Given the name of one instance (i.e. '-n' argument), is there any reasonable way (e.g. via varnishadm) to discover the PIDs of the associated manager and worker processes?
>> 
>> The goal is to find those PIDs in order to fetch detailed memory usage stats (virtual, resident, shared, etc.) of the associated Varnish Cache instance and then feed the monitoring agent with that info.
> 
> You can try this:
> 
>> $ cat test.vtc
>> varnishtest "dude, where's my pid?"
>> 
>> varnish v1 -vcl {backend be { .host = "${bad_backend}"; }} -start
>> 
>> shell {
>>    # manager
>>    cat ${v1_name}/_.pid
>>    echo
>>    # child
>>    awk '$1 == "#" {print $2}' ${v1_name}/_.vsm_child/_.index
>> }
>> 
>> $ varnishtest -v test.vtc | grep shell_out
>> **** top  shell_out|2038076
>> **** top  shell_out|2038088
> 
> Not the best interface for the child, I must admit :)
> 
> Dridi
> 
>> Thanks,
>> 
>> --
>> Carlos Abalde
>> 
>> _______________________________________________
>> varnish-misc mailing list
>> varnish-misc at varnish-cache.org
>> https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.varnish-cache.org/lists/pipermail/varnish-misc/attachments/20191219/f2ec1df2/attachment-0001.html>


More information about the varnish-misc mailing list