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 <[email protected]> wrote: > > Hello Carlos, > > On Wed, Dec 18, 2019 at 4:04 PM Carlos Abalde <[email protected]> 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 >> [email protected] >> https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc
_______________________________________________ varnish-misc mailing list [email protected] https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc
