<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Hi,<div class=""><br class=""><div><blockquote type="cite" class=""><div class="">On 09 Mar 2015, at 13:44, SebA <<a href="mailto:spah@syntec.co.uk" class="">spah@syntec.co.uk</a>> wrote:</div><div class=""><div class=""><div class=""></div></div></div></blockquote><div><br class=""></div>(…)<br class=""><br class=""><blockquote type="cite" class=""><div class="">
<div class=""><font size="2" face="Arial" class="">Although we have 
some Debian systems, I was looking for a solution for another Linux 
distro.</font></div>
<div class=""><font size="2" face="Arial" class=""><span class="298451712-09032015"></span></font> </div>
<div class=""><font size="2" face="Arial" class="">If I was to write 
something myself to do it, I would check /proc/mounts and the best command I 
could find was:</font></div>
<div class=""><font size="2" face="Arial" class="">awk 
'$4~/(^|,)ro($|,)/' /proc/mounts<br class="">which outputs:</font></div>
<div class=""><font size="2" face="Arial" class="">/dev/root / ext3 
ro,data=ordered 0 0</font></div>
<div class=""><font size="2" face="Arial" class="">with sample 
line:</font></div>
<div class=""><font size="2" face="Arial" class="">/dev/root / ext3 
ro,data=ordered 0 0<br class=""></font></div></div></blockquote><div><br class=""></div><div>You could use the reported “Client data” / “clientlog” with a server-side extension. I have to admit that I’m not 100% sure if error-or-remounts are reflected properly by this — but `mount` seems to use `/proc/self/mountinfo` as it’s datasource, so it _should_ be ok.</div><div><br class=""></div><div>Extract the reported `mount`-data for host bb.local:</div><div><br class=""></div><div><span class="Apple-tab-span" style="white-space:pre">       </span>xymon 127.0.0.1 “clientlog bb.local section=mount”</div><div><br class=""></div><div>Some testing of the output:</div><div><br class=""></div><div><span class="Apple-tab-span" style="white-space:pre">     </span>(export host=bb.local; xymon 127.0.0.1:1984 "clientlog $host section=mount" | gawk '/[(,]+ro[,)]+/ { print "filesystem " $1 " mounted RO!" } ')</div><div><br class=""></div><div>This would not require installing and maintaining an extension on every client. One drawback would be increased latency as the ro-check would be “indirect”.</div><div><br class=""></div>Cheers</div><div>Thomas</div><div><br class=""></div></div></body></html>