junegunn / redis-stat

(UNMAINTAINED) A real-time Redis monitoring tool
MIT License
2.02k stars 339 forks source link

cannot run redis-stat --server --daemon #48

Open softwarevamp opened 8 years ago

softwarevamp commented 8 years ago

/usr/lib/ruby/site_ruby/1.8/rubygems.rb:233:in activate': can't activate daemons (~> 1.1.9, runtime) for ["redis-stat-0.4.12"], already activated daemons-1.2.3 for ["thin-1.5.1", "redis-stat-0.4.12"] (Gem::LoadError) from /usr/lib/ruby/site_ruby/1.8/rubygems.rb:249:inactivate' from /usr/lib/ruby/site_ruby/1.8/rubygems.rb:248:in each' from /usr/lib/ruby/site_ruby/1.8/rubygems.rb:248:inactivate' from /usr/lib/ruby/site_ruby/1.8/rubygems.rb:1082:in `gem' from /usr/bin/redis-stat:18

junegunn commented 8 years ago

Looks like you're stuck with a very old version of ruby. Please provide more information about the system:

debbiswal commented 8 years ago

Hi, I have ruby 1.8.7 version. When I gave daemon with server option .. its not working. I am new to ruby language. When I saw the code I did not find any code which used 'daemon' gem. Could you please explain which part of the code makes the application daemon?

I am not finding any code which says 'Daemons.daemonize(...)'

junegunn commented 8 years ago

Ruby 1.8.7 is way too old, it was retired three years ago. Please upgrade your Ruby and see if it helps.

jimmyss04 commented 8 years ago

Hi,

It works with Ruby 1.8.7, but you will have to remove daemon 1.2.3, see below:

redis-stat

/usr/lib/ruby/site_ruby/1.8/rubygems.rb:233:in activate': can't activate daemons (~> 1.1.9, runtime) for ["redis-stat-0.4.13"], already activated daemons-1.2.3 for ["thin-1.5.1", "redis-stat-0.4.13"] (Gem::LoadError) from /usr/lib/ruby/site_ruby/1.8/rubygems.rb:249:inactivate' from /usr/lib/ruby/site_ruby/1.8/rubygems.rb:248:in each' from /usr/lib/ruby/site_ruby/1.8/rubygems.rb:248:inactivate' from /usr/lib/ruby/site_ruby/1.8/rubygems.rb:1082:in `gem' from /usr/bin/redis-stat:18

gem list|grep daemon

daemons (1.2.3, 1.1.9)

gem uninstall daemons --version 1.2.3

Successfully uninstalled daemons-1.2.3

redis-stat

Faraday: you may want to install system_timer for reliable timeouts ┌────────────────────────┬────────────────┐ │ │ 127.0.0.1:6379 │ ├────────────────────────┼────────────────┤ │ redis_version │ 2.6.17 │ │ redis_mode │ standalone │ │ process_id │ 2328 │ │ uptime_in_seconds │ 1848 │ │ uptime_in_days │ 0 │ │ role │ master │ │ connected_slaves │ 0 │ │ aof_enabled │ 0 │ │ rdb_bgsave_in_progress │ 0 │ │ rdb_last_save_time │ 1467106878 │ └────────────────────────┴────────────────┘

┌────────┬──┬──┬──┬───┬─────┬──────┬────┬─────┬─────┬─────┬──────┬─────┬─────┬─────┐ time us sy cl bcl mem rss keys cmd/s exp/s evt/s hit%/s hit/s mis/s aofcs ├────────┼──┼──┼──┼───┼─────┼──────┼────┼─────┼─────┼─────┼──────┼─────┼─────┼─────┤ 03:12:06 - - 1 0 837kB 1.59MB 0 - - - - - - 0B 03:12:08 0 0 1 0 837kB 1.59MB 0 0.50 0 0 - 0 0 0B 03:12:10 0 0 1 0 837kB 1.60MB 0 0.50 0 0 - 0 0 0B

Hope this helps :)