<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">Il 04/04/2016 16:54, Artem Tomyuk ha
scritto:<br>
</div>
<blockquote
cite="mid:CANYYVqKn9i9kkmxCBwUcd6g5FbgXmTBRxYrAVD2p6wLgLh4BrA(at)mail(dot)gmail(dot)com"
type="cite">
<div dir="ltr">
<div class="gmail_extra"><br>
<div class="gmail_quote">2016-04-04 17:43 GMT+03:00 Moreno
Andreo <span dir="ltr"><<a moz-do-not-send="true"
href="mailto:moreno(dot)andreo(at)evolu-s(dot)it" target="_blank">moreno(dot)andreo(at)evolu-s(dot)it</a>></span>:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div id=":3ii" class="" style="overflow:hidden">s there a
way to monitor active connections, or at least to report
when they grow too much?<br>
(say, I have an 8-core system and want to track down if,
and when, active connections grow over 80)</div>
</blockquote>
</div>
<br>
You can achieve that just running simple query like<br>
<span class="">select</span><span class=""> count(*) </span><span
class="">from</span><span class=""> pg_stat_activity </span><span
class="">where</span><span class=""> state = </span><span
class="">'active'</span> </div>
<div class="gmail_extra"><br>
</div>
<div class="gmail_extra"><br>
</div>
<div class="gmail_extra"><br>
</div>
<div class="gmail_extra"><br>
</div>
</div>
</blockquote>
Thanks, but this way I get the "sample" on that actual moment: what
I'd need is to monitor, or to have something warning me like "Hey,
You've got 2000 active connections! Time to grow up!" :-)<br>
<br>
Cheers,<br>
Moreno.-<br>
<br>
</body>
</html>