<html><head><meta http-equiv="Content-Type" content="text/html; charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Hi Dridi,<div class=""><br class=""></div><div class="">It's ugly as hell, but it works. Sadly not an option for 4.1.</div><div class=""><br class=""></div><div class="">Thanks a lot,</div><div class=""><br class=""><div class="">
<div style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); font-family: Menlo; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; text-decoration: none;">--</div><div style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); font-family: Menlo; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; text-decoration: none;">Carlos Abalde</div>
</div>
<div><br class=""><blockquote type="cite" class=""><div class="">On 18 Dec 2019, at 21:40, Dridi Boukelmoune <<a href="mailto:dridi@varni.sh" class="">dridi@varni.sh</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div class="">Hello Carlos,<br class=""><br class="">On Wed, Dec 18, 2019 at 4:04 PM Carlos Abalde <<a href="mailto:carlos.abalde@gmail.com" class="">carlos.abalde@gmail.com</a>> wrote:<br class=""><blockquote type="cite" class=""><br class="">Hi,<br class=""><br class="">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?<br class=""><br class="">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.<br class=""></blockquote><br class="">You can try this:<br class=""><br class=""><blockquote type="cite" class="">$ cat test.vtc<br class="">varnishtest "dude, where's my pid?"<br class=""><br class="">varnish v1 -vcl {backend be { .host = "${bad_backend}"; }} -start<br class=""><br class="">shell {<br class="">    # manager<br class="">    cat ${v1_name}/_.pid<br class="">    echo<br class="">    # child<br class="">    awk '$1 == "#" {print $2}' ${v1_name}/_.vsm_child/_.index<br class="">}<br class=""><br class="">$ varnishtest -v test.vtc | grep shell_out<br class="">**** top  shell_out|2038076<br class="">**** top  shell_out|2038088<br class=""></blockquote><br class="">Not the best interface for the child, I must admit :)<br class=""><br class="">Dridi<br class=""><br class=""><blockquote type="cite" class="">Thanks,<br class=""><br class="">--<br class="">Carlos Abalde<br class=""><br class="">_______________________________________________<br class="">varnish-misc mailing list<br class=""><a href="mailto:varnish-misc@varnish-cache.org" class="">varnish-misc@varnish-cache.org</a><br class="">https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc<br class=""></blockquote></div></div></blockquote></div><br class=""></div></body></html>