[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Disk or I/O latency?

From: Pierre-Philipp Braun
Subject: Re: Disk or I/O latency?
Date: Fri, 3 Jun 2016 19:02:30 +0200
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.1.1

Hello Martin,

yes I am more interested in I/O charts than alerts. So my script is currently useless and I need to wait until the custom charts feature _or_ native i/o monitoring is available. By next release do you mean 5.19 or _major_ release ?

Although I am a sysadmin, I work with/for skilled programmers and I can have them take a look at the code so they can help. Can you point some places in the code that would need to be enhanced to get the i/o charts? Both the agent and the m/monit server would need some tweaks, right?


On 26/05/2016 15:40, Martin Pala wrote:
You can use the "check program" to integrate that script to Monit. The script 
should return error in the case that the I/O limit is exceeded:

The next M/Monit release will support custom charts, so it'll be possible to 
render charts for I/O. We also plan to add native I/O monitoring to Monit and 
related charts to M/Monit, so it'll be easier to use.

Best regards,

On 26 May 2016, at 14:31, Pierre-Philipp Braun <address@hidden> wrote:

Many thanks Viktor for your input.  I also need IO performance monitoring (not 
esp. lacenty like Bryna, graphs reporting usage would yet be nice) so I wrote a 
little script based on your/Munin's method,


[[ ! -d /sys/block/ ]] && echo /sys/block/ does not exist, exiting && exit 1
#[[ ! -d /var/cache/monit/ ]] && echo /var/cache/monit/ does not exist, exiting 
&& exit 1
mkdir -p /var/cache/monit/

for disk in `ls -1 /sys/block/ | egrep -v '^fd|^dm-|^sr'`; do
        readio=`cat /sys/block/$disk/stat | awk '{print $1}'`
        writeio=`cat /sys/block/$disk/stat | awk '{print $5}'`
        echo "$readio,$writeio" >> /var/cache/monit/$disk.stat
        unset readio writeio

it produces,

# pwd
# ll
total 16K
drwxr-xr-x   2 root root   51 May 26 14:21 .
drwxr-xr-x. 15 root root 4.0K May 26 14:20 ..
-rw-r--r--   1 root root   26 May 26 14:21 sda.stat
-rw-r--r--   1 root root   18 May 26 14:21 sdb.stat
-rw-r--r--   1 root root   12 May 26 14:21 sdc.stat
# cat *

How to integrate this into Monit?  Is CSV a good choice as a format?

On 18/05/2016 23:05, SZÉPE Viktor wrote:
Munin does it by comparing `cat /sys/block/*/stat` e.g `cat
/sys/block/sda/stat` with the previous reading. This file contains 11

So previous rd_ios minus current rd_ios gives you and average IO/period.
You may "remember" these by storing them in a file, for example in

Idézem/Quoting Graham Smith <address@hidden>:

I don't think there is anything built in for that. You may not need a
script per se, an application may have an exit status you could use to
denote a fail or success of performance quality. Possibly iostat or
If it's not a simple numeric output, a wrapper script might not need
to be
long and that could output a simple exit status to denote a success
which monit can handle easier.

I always think it's best to keep complexity out of monit and if you
need to
do something fancy a script for anything odd is ultimately more
modular as
you may find other uses for it.

On 18 May 2016 19:04, "Bryan Harris" <address@hidden> wrote:

Hello all,

Does Monit have a way to measure i/o latency and alert if say a 4k write
takes longer than some number of ms?  I searched the mailing list and
manual and do not see anything.  Otherwise I can always monitor a custom
script for this purpose.

Thanks in advance.


To unsubscribe:

SZÉPE Viktor

To unsubscribe:

To unsubscribe:

reply via email to

[Prev in Thread] Current Thread [Next in Thread]