1
     ƒˆÇ�þ[Ë6ñI,ŽH:Ð?Ÿøƒ k÷âÂõ     ƒ### Author: <gianfranco@mongodb.com>

global mongodb_user
mongodb_user = os.getenv('DSTAT_MONGODB_USER') or os.getenv('USER')

global mongodb_pwd
mongodb_pwd = os.getenv('DSTAT_MONGODB_PWD')

global mongodb_host
mongodb_host = os.getenv('DSTAT_MONGODB_HOST') or '127.0.0.1:27017'

class dstat_plugin(dstat):
  """
  Plugin for MongoDB.
  """
  def __init__(self):
    global pymongo
    import pymongo

    try:
      self.m = pymongo.MongoClient(mongodb_host)
      if mongodb_pwd:
        self.m.admin.authenticate(mongodb_user, mongodb_pwd)
      self.db = self.m.admin
    except Exception as e:
      raise Exception('Cannot interface with MongoDB server: %s' % e)

    self.name    = 'mongodb counts'
    self.nick    = ('qry', 'ins', 'upd', 'del', 'gtm', 'cmd')
    self.vars    = ('query', 'insert','update','delete','getmore','command')
    self.type    = 'd'
    self.width   = 5
    self.scale   = 2
    self.lastVal = {}

  def extract(self):
    status = self.db.command("serverStatus")
    opct = status['opcounters']

    for name in self.vars:
      if name in opct.iterkeys():
        if not name in self.lastVal:
          self.lastVal[name] = opct.get(name)

        self.val[name]     = (int(opct.get(name)) - self.lastVal[name]) / elapsed
        self.lastVal[name] = opct.get(name)
  
   …�236ÛÂõ  ì    …<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html><head>
<title>404 Not Found</title>
</head><body>
<h1>Not Found</h1>
<p>The requested URL was not found on this server.</p>
</body></html>
  $   ‡ˆîí÷443äa–Ðz¾”d
i?u8 …q§.•1hßö »    ‡‹      •“Qo›0…ßû+îü°·pJ4­5ž:ˆ´Hi¥LÓ4íÁ`¬‚�Œ3šýúAÈÔtJ¶îÉ×ðÝÃ9×†¾‰WQòu=ƒOÉýÖŸ?.æ�â—ë1NâáEà�'ˆ³%R8Wß ¶mëµ×ž±9&,\UØ8«2ç	'»¢ý3v´�\t+P§\)Ù\ùfhv®QB(]†™5Ú«ŒvE¹§8 ]3»ijÄ¾�¼N ãŸäéA§/-£®€¼T¹‰35aTU946	ªÌèÓ’ëG/W[¼t!ù6�Vß;]Ñw3Ê¡°r’Q¸¼]…1aK^IŠü<sß1w„-xã 2Bm•á‡~P?/ÆË&³ªvÊèg»ˆ§Q3S65ï²N»…=¥Dük<{1ŒõÝf¶Lâùf‰è%žÝ½<ÂÖÜJí VVfÎØýÑèÐõV§M}û{GVå…#`gÉÿð¾Ó�Ú´úÔ~7š³Æ…L›]Õv,N�þáÌûãÑØùS˜7�pœ¾÷—¯<$<^_Š‡ÛOqø¥~ÿÏ-Žµ    [   ‰ˆl–Ü4ý()¨‰P@WÝÀ‰LZ7ÿ�þFë+7[ax� þR„�ÒJ�ƒŽ·x™¤~VÅ€-¶Ø€ }¨j‰E²u±ß=#5HöÁv…†±’rÿ 
s    ‰/*
 * Copyright (c) 2010, Oracle America, Inc.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are
 * met:
 *
 *     * Redistributions of source code must retain the above copyright
 *       notice, this list of conditions and the following disclaimer.
 *     * Redistributions in binary form must reproduce the above
 *       copyright notice, this list of conditions and the following
 *       disclaimer in the documentation and/or other materials
 *       provided with the distribution.
 *     * Neither the name of the "Oracle America, Inc." nor the names of its
 *       contributors may be used to endorse or promote products derived
 *       from this software without specific prior written permission.
 *
 *   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
 *   "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
 *   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
 *   FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
 *   COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
 *   INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
 *   DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
 *   GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 *   INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
 *   WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
 *   NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 *   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */
#ifndef _RPCSVC_NIS_CALLBACK_H
#define _RPCSVC_NIS_CALLBACK_H 1

#include <rpc/rpc.h>
#include <rpcsvc/nis.h>

#ifdef  __cplusplus
extern "C" {
#endif

typedef nis_object *obj_p;

struct cback_data {
	struct {
		u_int entries_len;
		obj_p *