Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Ruby > [ANN] Ruby/Watchcat 1.0.1 and Ruby/Watchcat-pure 1.0.0

Thread Tools

[ANN] Ruby/Watchcat 1.0.1 and Ruby/Watchcat-pure 1.0.0

Andre Nathan
Posts: n/a

I'm pleased to announce a new release of Ruby/Watchcat. This release
includes a fix to a possible descriptor leak in the C extension and also
a pure-Ruby version of the library, which makes it usable in other Ruby
implementations. RDoc documentation is now available too.

Ruby/Watchcat is an extension for Ruby for the development of
watchcatd-aware applications.

Watchcatd is a watchdog-like daemon in the sense that it takes actions
in situations where a machine is under heavy load and/or unresponsive.
However, watchcatd isn't as drastic as the usual watchdog systems, which
reboot the machine. Instead, all it does is sending a signal to a
registered process (which by default is SIGKILL) if the process doesn't
send it a heartbeat before a user-specified timeout.

Ruby/Watchcatd allows you to register ruby applications with watchcatd.

Install it with

gem install ruby-watchcat


gem install ruby-watchcat-pure


require 'watchcat'

# Create a new cat.
cat = => 10, :signal => 'KILL',
:info => 'killing from ruby')
loop do
# Here you do something that could exceed the timeout
sleep 9 + rand(3)
cat.heartbeat # we're still alive
cat.close # clean the cat's litter box

You can also use a block, in which case the cat cleans its own litter

require 'watchcat' do |cat|
loop do

For more details, please refer to the README file in the distribution
and in the project's homepage at

Best regards,
Andre Nathan

Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
if and and vs if and,and titi VHDL 4 03-11-2007 05:23 AM