Единственное, с чем пока не разобрался - не работает индикатор чтения и записи на диск. Играюсь с параметрами. У меня этот файл называется ".bargraph.lua" и лежит в домашнем каталоге.
А вот .conkyrc:
Единственное, с чем пока не разобрался - не работает индикатор чтения и записи на диск. Играюсь с параметрами. У меня этот файл называется ".bargraph.lua" и лежит в домашнем каталоге.
zenon, я понял, в чём дело с diskio_read и diskio_write. Но сам не решу проблемы - не хватает пока знаний :( .
Дело в том, что там выдаётся не чистая цифра, а с единицами изменения в текстовом виде - "KiB" или "MiB".
Идея такова:
1. Разделяемся на 2 части - цифры и единицы измерения, обрезаем пробелы.
2. Если единицы "KiB" - умножаем цифру на 1 000, "MiB" - на 1 000 000.
3. Для того, чтобы было видно малую скорость, а большая не вызывала зашкаливания - берём логарифм и приводим к масштабу, скажем, 100 миллионов байт в секунду - полная шкала.
4. Далее передаём в luа-скрипт.
rizado, ну я про это в принципе почти и говорил.
Все это без вмешательства в lua (те внутренними возможностями коньков) можно делать только через exec+script.
Но мне показания скоростей IO не нужны, хотя тоже можно из /proc/diskstats или iostat/dstat нарыть.
r/s and w/s— respectively, the number of read and write requests issued by processes to the OS for a device.
rsec/s and wsec/s — sectors read/written (each sector 512 bytes).
rkB/s and wkB/s — kilobytes read/written.
avgrq-sz — average sectors per request (for both reads and writes). Do the math — (rsec + wsec) / (r + w) = (134.13+178.84)/(10.18+9.78)=15.6798597
If you want it in kilobytes, divide by 2.
If you want it separate for reads and writes — do you own math using rkB/s and wkB/s.
avgqu-sz — average queue length for this device.
await — average response time (ms) of IO requests to a device. The name is a bit confusing as this is the total response time including wait time in the requests queue (let call it qutim), and service time that device was working servicing the requests (see next column — svctim).So the formula is await = qutim + svctim.
svctim — average time (ms) a device was servicing requests. This is a component of total response time of IO requests.
%util — this is a pretty confusing value. The man page defines it as, Percentage of CPU time during which I/O requests were issued to the device (bandwidth utilization for the device). Device saturation occurs when this value is close to 100%. A bit difficult to digest. Perhaps it’s better to think of it as percentage of time the device was servicing requests as opposed to being idle. To understand it better here is the formula:utilization = ( (read requests + write requests) * service time in ms / 1000 ms ) * 100%
or
%util = ( r + w ) * svctim /10 = ( 10.18 + 9.78 ) * 8.88 = 17.72448
Field 1 -- # of reads issued
Field 2 -- # of reads merged
Field 3 -- # of sectors read
Field 4 -- # of milliseconds spent reading
Field 5 -- # of writes completed
Field 6 -- # of writes merged
Field 7 -- # of sectors written
Field 8 -- # of milliseconds spent writing
Field 9 -- # of I/Os currently in progress
Field 10 -- # of milliseconds spent doing I/Os
Field 11 -- weighted # of milliseconds spent doing I/Os
Забираем 9-ое поле, максимум поставил 200, в чём измеряется не понятно, но активность винтов получается смотреть отлично.
Сначала переход зеленый - желтый - красный не нужен был, сейчас попробовал, и не пойму почему так, конфигурация из примера, те должно быть так же, как на сэмпле.
Вверху как должно быть, внизу как у меня на самом деле, те отсутствуют некоторые цвета: