K Raid Monitor

System Software

Source (required if based on other people's work): Add the source-code for this project on git.opendesktop.org

0
Score 64%
Description:

Creates a button in your kicker, the color of this button is green if the raid arrays are fine, and it turns red if a disk of one of the arrays fails. If one of the raid arrays is not available, the color is yellow.

Shortcomings:
* Tested currently for a RAID1 array using 2 discs.

Other projects with similar functionality:
- http://raid-monitor.mihosoft.eu/
Last changelog:

11 years ago

Changes in v0.5:

- Ported to KDE4
- No more Tooltip, and other niceities :(


Changes in v0.4:

- Supports monitoring of any amount of raid arrays.
- Autodetects still only the first found raid device.


Changes in v0.3:

- Added some autoconfiguring magic (upon first start, the first raid device is set to be monitored).
- Added a settings dialog.
- If a device is not found, the color is set to yellow instead of red.
- Added tooltips.


Changes in v0.2:

- Fixed monitoring behaviour bug: A raid array can have two healthy states, "clean" and "active". When "active", in v0.2 the button no longer switches to red.
- Replaced the GPLv2 in the COPYING file with the GPLv3

cmorgan

9 years ago

Is there a forthcoming kde4 version? I don't see any tools for monitoring raid status in kde4 yet so your tool seems to fill a needed role there.

Chris

Report

C

gustl

9 years ago

debian stable is still on KDE3, so I do not know when I will port the whole stuff to KDE4.

I have a box with fedora and KDE4 though, so I might start porting actually before Debian hits KDE4.

Just need to get some time for it ... and two spare USB sticks to set up an array.
:(

Report

kentaur

10 years ago

Raid-Monitor is also a good program with nice documentation... It uses mdadm to check the status of Your RAID. Maybe we could merge the two projects?

Report

kentaur

10 years ago

Sorry forgot the url:
http://raid-monitor.mihosoft.eu/

Report

C

gustl

11 years ago

and the feedback. I actually might add some of the requested features.

I want to tell you the reasons why I programmed this tool:

I read a nice statement by a system administrator who said that the most common reason for data loss on a raid array is manual deletion (translation: plain stupidity ;) ), the second most reason is a disk failure which goes by undetected.

When I bought two 500 GB USB disks to store my digital photos on, I set them up as a raid-1 array. I use this machine as my daily work desktop, and I wanted to recognize a disk failure immediately. The mdadm tool can send me an email, but that was not an option for me, because I read them only once a day. The tool I wanted should notify me immediately and it should work as non-root and non-sudo. It should also take very little space on my kicker bar, but be prominent enough to not get overlooked in case of color change.

From these motivations and requirements stem the features:
* A monocolor button, half an icon wide (therefore: No, I will not use an icon)
* Color change from an unobtrusive dark green to a bright red in case of disk failure.

Feature requests I'd like to pick up:
* Adding of a tooltip.
* If no .kraidmonitor file is available, find the first available raid array and write the .kraidmonitor file.
* If no device is found, the button stays yellow.
* Configuration dialog.

I don't know about playing a sound, because when the machine is under heavy load (hugin), it sometimes happens, that the button switches to red for 10 seconds (would be quite annoying).

Maybe I should log all statuses which currently cause the button to turn red, without actually meaning that one disk is actually gone, and include these statuses into the "green" status. I am pretty much on trial and error here, so any specific tips, when the files in /sys/... change to what status would be welcome.

Also, of course, modifications of the source code are warmly welcome, as I am not a professional programmer by any means.

If anyone can give me a cookbook, walk-through, take-me-by-the-hand-and-drag-me tutorial about how to debug my code, I would be much more efficient. I know that I can start the beast in appletproxy, but that is about it. Currently I help myself by displaying the contents of interesting variables in info-boxes, which, to my opinion, is ingeniously brain-dead ;) .

Report

C

gustl

11 years ago

Hi everyone,

v0.3 is here!

As this Sunday was a cold and foggy one, I sat down before my screen and added some of the requested features.

This should now be a better usable and configurable version, with no more need to write your own config file.

Report

C

gustl

10 years ago

Everybody who has more than one raid array will be interested in this new release.

It now can handle any amount of locally mounted raid arrays.

Please test it and give me feedback if something does not work.

Have fun!
Gustl

Report

LinuxDon

10 years ago

I'm using it and it seems to work great.
It didn't detect my second raid array automatically BTW.

It seems to be a great solution to easily monitor your raid arrays. Hopefully you will get around to port it to KDE4 when it's released.

Thank you for this valuable tool!

Report

C

gustl

10 years ago

Thanks for the bug report.

The detection is only run once at program startup, and only if you have not yet a file named ".kraidmonitor" in your home directory. And even then, it only looks for the first raid array it can find.
Adding other arrays is not so difficult that a full autodetection seems to be necessary. In other words: It's a feature, not a bug. ;)

Dang! Now it's done. I could as well get myself hired by Microsoft as chief of the weasel word department.
Joke aside, I know the program should be modified, but I don't have the time right now, and I fear I will not have time for several months to come.

I also plan to include the monitoring of raid arrays on remote computers (for my future home network :) ) and in that case autodetection would no longer be possible anyway. Then my 500 GB array which is currently connected locally will be moved to a server, but I still want to monitor the array. For everybody who will then also want to use this feature it will be manual configuration anyway. I think, providing documentation to how the syntax of the configuration file must look like is sufficient.

On the other hand, I wouldn't turn down any code which makes the program do what you suggest.

Porting to KDE4 is also on my to-do list, I hope they didn't break the API too badly. But for this to happen, I first need a working install of KDE4, and time is short these days (my holidays are over :( ).

If the people, who's only remaining roadblock to KDE4 adoption is the still-not-ported KRaidMonitor, send me a mail to remind me of their needs, I might find time and motivation to start porting right away. The address is:

gerald/dot/pichler/at/chello/dot/at

(the last "at" is to be written as is, I am from Austria and our country-domain is ".at")

Report

C

gustl

10 years ago

Thanks for the bug report.

The detection is only run once at program startup, and only if you have not yet a file named ".kraidmonitor" in your home directory. And even then, it only looks for the first raid array it can find.
Adding other arrays is not so difficult that a full autodetection seems to be necessary. In other words: It's a feature, not a bug. ;)

Dang! Now it's done. I could as well get myself hired by Microsoft as chief of the weasel word department.
Joke aside, I know the program should be modified, but I don't have the time right now, and I fear I will not have time for several months to come.

I also plan to include the monitoring of raid arrays on remote computers (for my future home network :) ) and in that case autodetection would no longer be possible anyway. Then my 500 GB array which is currently connected locally will be moved to a server, but I still want to monitor the array. For everybody who will then also want to use this feature it will be manual configuration anyway. I think, providing documentation to how the syntax of the configuration file must look like is sufficient.

On the other hand, I wouldn't turn down any code which makes the program do what you suggest.

Porting to KDE4 is also on my to-do list, I hope they didn't break the API too badly. But for this to happen, I first need a working install of KDE4, and time is short these days (my holidays are over :( ).

If the people, who's only remaining roadblock to KDE4 adoption is the still-not-ported KRaidMonitor, send me a mail to remind me of their needs, I might find time and motivation to start porting right away. The address is:

gerald/dot/pichler/at/chello/dot/at

(the last "at" is to be written as is, I am from Austria and our country-domain is ".at")

Report

C

gustl

11 years ago

Could someone who tried this out please give some feedback to me?

Where are the shortcomings, where should the thing become better, does it not work for your raid array configuration, where did you have troubles?

gustl

Report

BlueLightning

11 years ago

I tried this out and after setting it up, it worked pretty well. Some ideas:

* When I first added it to the panel it started off yellow then went red. At this point however it was not configured, so I think it should really stay yellow.
* When running for the first time, look for the first available array device (/dev/mdX) and use that by default.
* It needs a configuration dialog even if it is very simple, so that you can select the array.
* Have a tooltip for the applet that shows the status and the device name ie. "/dev/mdX: Good".
* Later on, perhaps add KNotify support so that you can play sounds/show messages etc. if the array status changes (not too tricky, I did this myself for eventwatcher without too much trouble and I'm by no means an expert KDE developer).
* An icon rather than a block would be nice :)

What you have is a good start though :) Thanks.

Report

LouisRoederer

11 years ago

I haven't tried it yet, but I have a small suggestion. I work a lot with servers that use RAID, and what I always need is the ability to automatically send an email when a drive fails. Good luck with developing this; it could turn into a very handy utility.

Report

richlv

11 years ago

for servers just use mdadm in follow/monitor mode.
it already has this capability.
is see this more like something for workstations (where raid is becoming more common).

an idea for future - maybe this can be made more like a fronten for mdadm/smartmontools, thus enabling hdd monitoring for workstations ?

for servers we already have mdadm and smartd, but it would be pretty cool if users also could be nicely notified about hdd problems.

if this is possible, such a package should go in base kde distribution :)

Report

C

gustl

11 years ago

Using mdadm as backend was my first idea too. The problem with making KRaidMonitor a frontend for mdadm is, that mdadm is only available for root (or sudo). But I definitely wanted the tool to work for users without any previleges.

Allowing a user to mess around with mdadm seems to be quite dangerous, given the right type of user.

And making it a whole package with monitoring for users, and a sysadmin mode for managing the array is definitely out of my skill/time reach.

Report

richlv

11 years ago

a good point about root, but it could be solved by only intracting with it, not running it - have it run at system startup only.

it has two additional modes besides email :

-p, --program, --alert
Give a program to be run whenever an event is detected.

-y, --syslog
Cause all events to be reported through 'syslog'. The messages have facility of 'daemon' and
varying priorities.

-p probably is the best, as you could have a systray/plasma applet and a simple backend which would notify the visual part that "it's time to flash".

obviously, support for more arrays would be welcome (and easier to do with mdadm), as even workstations tend to have several arrays now (for example - /boot, /, /home)

i know, i know, coming here and going about about features might not be the most helpful thing, but i can't code ;)

besides, i really have wanted such a thing to put on workstations so that user can be notified in time about failures.

Report

C

gustl

11 years ago

Well, getting the status of a raid array without root rights or resorting to inter-process communication stuff (which is way too complex for me) is not the hard part.

In the /sys/.. filesystem tree you can find a directory for each raid array, and inside that the status files for each partition of the array. So all my applet does, is to wake up on a timerEvent, look what is written in the status files, and display a green button when the status is OK, and a red button in all other cases. (And when the array is not found, the button is yellow). Then set the timer to wake up the applet again in 10 seconds.

And now for something completely different:

To support more than one array is definitely one of my goals, I just need to find the time to do it. After all, I then could delete this one line under "shortcomings" :) .


Report

11 years ago

Changes in v0.5:

- Ported to KDE4
- No more Tooltip, and other niceities :(


Changes in v0.4:

- Supports monitoring of any amount of raid arrays.
- Autodetects still only the first found raid device.


Changes in v0.3:

- Added some autoconfiguring magic (upon first start, the first raid device is set to be monitored).
- Added a settings dialog.
- If a device is not found, the color is set to yellow instead of red.
- Added tooltips.


Changes in v0.2:

- Fixed monitoring behaviour bug: A raid array can have two healthy states, "clean" and "active". When "active", in v0.2 the button no longer switches to red.
- Replaced the GPLv2 in the COPYING file with the GPLv3

product-maker gohanz Jul 18 2011

product-maker 10 21

File (click to download) Version Description Packagetype Architecture Downloads Date Filesize DL OCS-Install
Pling
Details
license
version
0.5
updated Jul 17 2011
added Oct 27 2007
downloads today
0
page views today 0
System Tags app software