<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="">Do you want to find out the service/process's own vsz_limit or another service's vsz_limit? Own vsz_limit would be easiest to get with getrlimit(RLIMIT_AS) as Aki said. If you want another service's vsz_limit that's not easily possible, because those settings just aren't sent to anything except the master process. struct service_settings in general isn't accessible to anything except the master process. The only alternative would be to ask service/indexer/vsz_limit setting either via doveconf or by connecting to the "config" socket. master_service_settings_read() could be used to do these. However, that's likely overly complicated for whatever you're planning.<br class=""><div><br class=""></div><div><blockquote type="cite" class=""><div class="">On 21. Nov 2021, at 14.27, Joan Moreau <<a href="mailto:jom@grosjo.net" class="">jom@grosjo.net</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" class=""><div style="font-size: 9pt; font-family: Verdana,Geneva,sans-serif" class=""><p class="">ok but this does not consider the vsz_limit of the service (indexer in my case)</p><p class="">only the "default_vzs_limit" is given</p><p class=""><br class=""></p>
<div id="signature" class=""></div><p class=""><br class=""></p><p id="reply-intro" class="">On 2021-11-21 13:14, Aki Tuomi wrote:</p>
<blockquote type="cite" style="padding: 0 0.4em; border-left: #1010ff 2px solid; margin: 0" class="">
<div id="replybody1" class="">
<div style="font-size: 9pt; font-family: Verdana,Geneva,sans-serif;" class="">Dovecot master process uses setrlimit to enforce the limit, so you should be able to get it with RLIMIT_AS or RLIMIT_DATA, iirc it depends a bit on os which is used.<br class=""><br class="">I dont think service->vsz_limit is available on the service itself.<br class=""><br class="">Aki<br class=""><br class=""><br class="">
<div class="v1gmail_quote">On 21 November 2021 12.20.16 UTC, Joan Moreau <<a href="mailto:jom@grosjo.net" class="">jom@grosjo.net</a>> wrote:
<blockquote class="v1gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid #cccccc; padding-left: 1ex;"><p class="">In the dovecot source, I see "service->vsz_limit" giving the answer</p><p class="">How to reach the "service" object from within a plugin ?</p>
<div id="v1signature" class=""></div><p class=""><br class=""></p><p id="v1reply-intro" class="">On 2021-11-21 12:15, Joan Moreau wrote:</p>
<blockquote style="padding: 0 0.4em; border-left: #1010ff 2px solid; margin: 0;" class="">
<div id="v1replybody1" class="">
<div style="font-size: 9pt; font-family: Verdana,Geneva,sans-serif;" class=""><p class="">Hi</p><p class="">This does not really work</p><p class="">Putting</p><p class="">service indexer-worker {<br class="">        vsz_limit = 1G<br class="">}</p><p class="">Getrlimit returns "-1"</p>
<div id="v1v1signature" class=""></div><p class=""><br class=""></p><p class="">Is there a proper function giving the actual  process size (memory used) and limit (vsz_limit, either process of default_vsz_limit, as applicable) ?</p><p class=""><br class=""></p><p id="v1v1reply-intro" class="">On 2021-11-21 07:09, Aki Tuomi wrote:</p>
<blockquote style="padding: 0 0.4em; border-left: #1010ff 2px solid; margin: 0;" class="">
<div id="v1v1replybody1" class="">
<div style="font-size: 9pt; font-family: Verdana,Geneva,sans-serif;" class="">You could try getrlimit RLIMIT_AS.<br class=""><br class="">Aki<br class=""><br class="">
<div class="v1v1v1gmail_quote">On 20 November 2021 17.22.17 UTC, Joan Moreau <<a href="mailto:jom@grosjo.net" class="">jom@grosjo.net</a>> wrote:
<blockquote class="v1v1v1gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid #cccccc; padding-left: 1ex;"><p class="">Hello</p><p class=""><br class=""></p><p class="">How to get, programatically (C/C++), the value of teh dovecot.conf file of vsz_limit and default_vsz_limit ?</p><p class="">Thank you</p><p class=""><br class=""></p>
</blockquote>
</div>
</div>
</div>
</blockquote>
</div>
</div>
</blockquote>
</blockquote>
</div>
</div>
</div>
</blockquote>
</div>
</div></blockquote></div><br class=""></body></html>