Raindrops 0.5.0 - TCP/UNIX listen queue stats for Linux

Raindrops is a real-time stats toolkit to show statistics for Rack HTTP
servers. It is designed for preforking servers such as Rainbows! and
Unicorn, but should support any Rack HTTP server under Ruby 1.9, 1.8 and
Rubinius on platforms supporting POSIX shared memory. It may also be
used as a generic scoreboard for sharing atomic counters across multiple
processes.

Changes: More Linux extras!

Portable changes:

  • Raindrops are now resizable within the limits of system page size
  • Raindrops::Middleware proxies +to_path+ in response bodies
  • More documentation

Linux-only changes:

  • Raindrops::LastDataRecv[1] Rack application
  • Raindrops::Watcher[2] Rack application
  • Raindrops::TCP_Info[3] class for capturing TCP connection stats
  • IPv6 support for inet_diag
  • faster inet_diag stats for multiple sockets

There is also a demo server running the Watcher and Middleware
components. It’s capped to 30 concurrent users, so go easy on
it:

Raindrops::Watcher: http://raindrops-demo.bogomips.org/
Raindrops::Middleware: http://raindrops-demo.bogomips.org/_raindrops

[1] http://raindrops.bogomips.org/Raindrops/LastDataRecv.html
[2] http://raindrops.bogomips.org/Raindrops/Watcher.html
[3] http://raindrops.bogomips.org/Raindrops/TCP_Info.html

Polishing up the last (0.5.0) release

Raindrops is a real-time stats toolkit to show statistics for Rack HTTP
servers. It is designed for preforking servers such as Rainbows! and
Unicorn, but should support any Rack HTTP server under Ruby 1.9, 1.8 and
Rubinius on platforms supporting POSIX shared memory. It may also be
used as a generic scoreboard for sharing atomic counters across multiple
processes.

Changes:

Following up the huge 0.5.0 release, 0.6.0 makes
some minor improvements:

  • minor UI/UX improvements for Watcher Rack app
  • set close-on-exec by default for inet_diag sockets
  • inet_diag build fixes for newer GNU libc6
  • –with-atomic_ops-dir= build option added

See “git log” for a full list of changes.

Hi Eric,

On Mon, Mar 21, 2011 at 2:54 PM, Eric W. [email protected]
wrote:

Raindrops is a real-time stats toolkit to show statistics for Rack HTTP
servers. It is designed for preforking servers such as Rainbows! and
Unicorn, but should support any Rack HTTP server under Ruby 1.9, 1.8 and
Rubinius on platforms supporting POSIX shared memory. It may also be
used as a generic scoreboard for sharing atomic counters across multiple
processes.

Once upon a time (v0.4.1) raindrops would build on osx. At the time I
noticed that the docs said that I’d get a bunch of extra features on
Linux, which made me think that it was supported on other platforms
but in limited form.

I’ve just tried 0.6.0 (and 0.5.0, and 0.4.0…) and I can no longer
build it on osx. Here’s a gist: https://gist.github.com/880329
This is problematic as I want it in my app’s bundle for when I deploy
on Linux, but I can’t do that if I can’t build it on my osx dev boxes.
I’m sure I can figure something else out if it simply can’t be built
on osx, but considering that it once could I expect it’s an oversight.

Any ideas?

Thanks,
Ben

On Mon, Mar 21, 2011 at 3:22 PM, Eric W. [email protected]
wrote:

Oops, looks like I forgot to guard the TCP_INFO stuff properly
on non-Linux. The following patch should fix it, prerelease gem
available here:
http://raindrops.bogomips.org/files/raindrops-0.6.0.1.gdbfe.gem

I’ll roll 0.6.0.1 if you can confirm that fixes it, thanks for the
report!

It does fix it! Thanks for the quick turnaround!

Ben

Ben B. [email protected] wrote:

It does fix it! Thanks for the quick turnaround!

No problem, thanks for the report. I just pushed out 0.6.1

Ben B. [email protected] wrote:

I’ve just tried 0.6.0 (and 0.5.0, and 0.4.0…) and I can no longer
build it on osx. Here’s a gist: https://gist.github.com/880329
This is problematic as I want it in my app’s bundle for when I deploy
on Linux, but I can’t do that if I can’t build it on my osx dev boxes.
I’m sure I can figure something else out if it simply can’t be built
on osx, but considering that it once could I expect it’s an oversight.

Oops, looks like I forgot to guard the TCP_INFO stuff properly
on non-Linux. The following patch should fix it, prerelease gem
available here:
http://raindrops.bogomips.org/files/raindrops-0.6.0.1.gdbfe.gem

I’ll roll 0.6.0.1 if you can confirm that fixes it, thanks for the
report!

From dbfe01c60d0d231f42e18768cbb8b23612f281fc Mon Sep 17 00:00:00 2001
From: Eric W. [email protected]
Date: Mon, 21 Mar 2011 15:17:21 -0700
Subject: [PATCH] tcp_info: mark this as Linux-only

We can’t even pull in linux/*.h headers to check
for TCP_INFO.

ext/raindrops/linux_tcp_info.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/ext/raindrops/linux_tcp_info.c
b/ext/raindrops/linux_tcp_info.c
index 1a2048c…ce1c2d3 100644
— a/ext/raindrops/linux_tcp_info.c
+++ b/ext/raindrops/linux_tcp_info.c
@@ -1,3 +1,4 @@
+#ifdef linux
#include <ruby.h>
#include <sys/socket.h>
#include <netinet/in.h>
@@ -168,3 +169,4 @@ void Init_raindrops_linux_tcp_info(void)
TCPI_DEFINE_METHOD(total_retrans);
}
#endif /* TCP_INFO /
+#endif /
linux */

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs