From 746c84950a39d68761a0704f4a08278de40df399 Mon Sep 17 00:00:00 2001 From: retoor Date: Wed, 11 Dec 2024 20:51:27 +0100 Subject: [PATCH] Version that pushes ps aux when load too high. --- dot | Bin 18000 -> 18040 bytes dot.c | 4 ++++ 2 files changed, 4 insertions(+) diff --git a/dot b/dot index 41d7a96d8d252f95dab4295043c2b7a8a6b43614..fc0cdf733a629977f03a16db2acbaead8782f944 100755 GIT binary patch delta 2880 zcmZ`*eN0=|6~EVh#&-DdbAtQqlEfx4D^`My6O5B4fI~_0SlAk&H2b67l1v>jtCkQ2 z7P@5u1l8gJoyn2bbk#aYq-|X%4VV4F{%A`?TD4lY5;fA)YU`XV-OTzCXgdjYrEkCc zJ}70{m7dQ%zkAN_oO{modv|VxFOBf5-@CAZ=_6$bHa!;krF+I@XftDP#@x#eLs=#- zkL{CfhGt178#;$5!jrBs^mM})<*!V?X&T^)x8JntH?8{V8UDIA9Ws3^Ng3O*%KyiB z$z;4lZu{wS`<{C@S3ULM&r8qnZ{90E`_I2ze)I~B*sFaWa9YVRHULFt9(vV&4?jnX zc7-3+f2XNZQurY;r^Aw;WQU*M(6IwFARXk*`bu8%^S|q89p$77pO@XuPB$njbqvoSj|urUdbkT&Mfe~r1oB$1a@N!A_cbTiltn^<{gXDNft z6Q=&Vv7eyQb~a(^J$DOx8~Y7(F|5)X8Es{3uH0DYGOKN+I%oF2m#!8mS2PWrl2 z2_V|aSZXq+qPH@QI+apUP-|SE9FVMO;{+_x^G=1{bC#5juR@FHeV`j%C8d+AP&aLI zDbxmZW))gYUvVjc5-SAc+^W^GsR7p^=S6vovpvR`R&|6T@>At$6oAdQYns-P{m8TV z6Rm1rgiXTSK*V- zG_7^_2R-k^wZfk;Z_8-Hsk$%#MIH4$jZVBEn%9=Oqh_ua-qLOU)t32($x@is5vYAS zD|~(npTcF~KP-h;2;&CfSJx2!=zj>)7NNy=Qt-8}MUMz{uOJ;hANIdsXNX_;>$0W| zE@_^j9xQz5kx`EhPs~vdTh9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b4gO>n~ z=FM+BjHvFmVaU<(;$U5i5z%_=Gntq-*6!B2?LU>^cyqd4(oed)8*p!AfJ@~6#f&}W z=V3+u_4Hkc=igZT5kh2r$-P=<)mApt5~tgNX%;mevx-jXdED%}B`H#K_%vC{}AFVqp=RXNuN27+x`u`4*PALyLC) z&9goYnMT%SBkN9#FgSHQ>teu6`aa~dfCb|L?HI6VAk&N%k~-^_r@~R^s;$04nB$Aw zk2BI4w)sscF&Y{CL)W*UTzyv8_oHk_`58*_oURA(+`CaeiZX(-lF19mN4XSbJM!vA zb^S+_gD9O8hI}(`7(TD-Hz7po9LALvz+nWRFiy1_?EY#uyUDEP!vR}B6D;%3s@RWV zTbW7A4GYavbDcF=#=XdvG>rZVv*m_K7{y6^MiCpM@Qy!7_rNK?m+nr{nQOBkEfn~Z z>{Y{N-F1yz$JHC{2}qQBm89F$JREI<4@$js1B{f0XcI_5FTDuG!H^Q?cNG7`kYQ*E zdX;{5>0#r7q@gdk2tOld(C==LLThOktP4E|!=c9|YaJ@QEvT?2d^1f#U-%=MOx;)Z zIi-D2I5&6=>3WFIZS<@%_Dl#Dq!_0YFe&Tc)Z7q;P$Hq?ll(e2)`Hzi&XM_+ExZ*L zM^xAl@!lnkyG(vnPTQmi^ z3(i%j)WLcvdw?Bn!A67Asz5u79s^=Z%Eo6^>!cAv#fcZ&Bc$y_3Dw?X&*{BSW*4 diff --git a/dot.c b/dot.c index d89546f..91b527e 100644 --- a/dot.c +++ b/dot.c @@ -17,6 +17,10 @@ void print_load() { perror("getloadavg failed"); return; } + if(loadavg[0] > 0.2){ + int result = system("ps aux"); + (void)result; + } printf("%.2f %.2f %.2f", loadavg[0], loadavg[1], loadavg[2]); }