These are various scripts I've written in the past for tracing through memcached
LICENSE
The MIT License (MIT)
Copyright (c) 2013, Matt Ingenthron
Permission is hereby granted, free of charge, to any person obtaining a copy
| /* | |
| * Copyright (C) 2011 Couchbase, Inc. | |
| * All rights reserved. | |
| */ | |
| package com.couchbase.demo; | |
| import com.couchbase.client.CouchbaseClient; | |
| import java.util.ArrayList; | |
| import java.util.Random; | |
| import java.util.concurrent.ExecutionException; |
| package com.couchbase.demo; | |
| import com.couchbase.client.CouchbaseClient; | |
| import java.io.IOException; | |
| import java.net.URI; | |
| import java.util.Arrays; | |
| import java.util.List; | |
| import java.util.concurrent.TimeUnit; | |
| import java.util.concurrent.atomic.AtomicInteger; | |
| import java.util.concurrent.atomic.AtomicReference; |
| require 'formula' | |
| def with_libev_plugin? | |
| ARGV.include?('--with-libev-plugin') | |
| end | |
| def without_libevent_plugin? | |
| ARGV.include?('--without-libevent-plugin') | |
| end |
| brew uninstall libcouchbase | |
| brew uninstall libcouchbase | |
| brew uninstall libev | |
| brew uninstall libevent | |
| # pass one, test with default libevent | |
| brew install https://github.com/couchbase/homebrew/raw/stable/Library/Formula/libcouchbase.rb && \ | |
| cbc cp ~/.bashrc && cbc view _all_docs?stale=false | head && \ | |
| brew uninstall libcouchbase && brew uninstall libevent && \\ | |
| # pass two, install with just libev | |
| brew install --with-libev-plugin --without-libevent-plugin https://github.com/couchbase/homebrew/raw/stable/Library/Formula/libcouchbase.rb && \ |
| set -xe | |
| server=192.168.1.200 | |
| curl --data "ns_config:set({node, node(),{timeout, ns_memcached_outer}},300000)." -u Administrator:password http://$server:8091/diag/eval | |
| curl --data "ns_config:set({node, node(),{timeout, memcached_recv}},300000)." -u Administrator:password http://$server:8091/diag/eval | |
| curl --data "ns_config:set({node, node(),{timeout, memcached_stats_recv}},300000)." -u Administrator:password http://$server:8091/diag/eval | |
| curl --data "ns_config:set({node, node(),{timeout, ns_memcached_outer_heavy}},300000)." -u Administrator:password http://$server:8091/diag/eval | |
| curl --data "ns_config:set({node, node(),{timeout, ns_memcached_outer_very_heavy}},600000)." -u Administrator:password http://$server:8091/diag/eval | |
| curl --data "ns_config:set({node, node(),{timeout, ebucketmigrator_connect}},1200000)." -u Administrator:password http://$server:8091/diag/eval |
| /** | |
| * Copyright (C) 2013 Couchbase, Inc. | |
| * | |
| */ | |
| package com.couchbase.demo; | |
| import java.util.Date; | |
| import net.spy.memcached.CachedData; |
| /** | |
| * Copyright 2013, Couchbase, Inc. All rights reserved. | |
| */ | |
| package com.couchbase.demo.vbucketlookup; | |
| import java.io.IOException; | |
| import java.net.URI; | |
| import java.net.URISyntaxException; | |
| import java.util.ArrayList; |
These are various scripts I've written in the past for tracing through memcached
LICENSE
The MIT License (MIT)
Copyright (c) 2013, Matt Ingenthron
Permission is hereby granted, free of charge, to any person obtaining a copy
| --------- | |
| Copyright 2010-2013 Couchbase, Inc. | |
| Learn more at <http://www.couchbase.com/communities/c>. |
| /** | |
| * Copyright (C) 2009-2013 Couchbase, Inc. | |
| * | |
| * Permission is hereby granted, free of charge, to any person obtaining a copy | |
| * of this software and associated documentation files (the "Software"), to deal | |
| * in the Software without restriction, including without limitation the rights | |
| * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
| * copies of the Software, and to permit persons to whom the Software is | |
| * furnished to do so, subject to the following conditions: | |
| * |