about summary refs log tree commit homepage
path: root/lib/raindrops/linux.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/raindrops/linux.rb')
-rw-r--r--lib/raindrops/linux.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/raindrops/linux.rb b/lib/raindrops/linux.rb
index fe2af09..a198253 100644
--- a/lib/raindrops/linux.rb
+++ b/lib/raindrops/linux.rb
@@ -8,6 +8,8 @@
 # Instead of snapshotting, Raindrops::Aggregate::LastDataRecv may be used
 # to aggregate statistics from +all+ accepted sockets as they arrive
 # based on the +last_data_recv+ field in Raindrops::TCP_Info
+require 'pathname'
+
 module Raindrops::Linux
 
   # The standard proc path for active UNIX domain sockets, feel free to call
@@ -41,6 +43,7 @@ module Raindrops::Linux
     else
       paths = paths.map do |path|
         path = path.dup
+        path = Pathname.new(path).realpath.to_s
         path.force_encoding(Encoding::BINARY) if defined?(Encoding)
         rv[path]
         Regexp.escape(path)