~ubuntu-branches/ubuntu/wily/net-snmp/wily-proposed

« back to all changes in this revision

Viewing changes to agent/mibgroup/hardware/cpu/cpu.c

  • Committer: Bazaar Package Importer
  • Author(s): Chuck Short
  • Date: 2010-06-28 14:59:36 UTC
  • mfrom: (1.2.3 upstream) (1.1.12 sid)
  • Revision ID: james.westby@ubuntu.com-20100628145936-cbiallic69pn044g
Tags: 5.4.3~dfsg-1ubuntu1
* Merge from debian unstable.  Remaining changes:
  - Set Ubuntu maintainer address.
  - net-snmp-config: Use bash. (LP: #104738)
  - Removed multiuser option when calling update-rc.d. (LP: #254261)
  - debian/snmpd.init: LSBify the init script.
  - debian/patches/52_fix_snmpcmd_1_typo.patch: Adjust a typo in snmpcmd.1
    (LP: #250459)
  - debian/snmpd.postinst: source debconf before doing work, LP: #589056
  - debian/snmp.preinst, debian/snmp.prerm: kill any/all processes owned by
    snmp user before install/uninstall, LP: #573391
  - Add apport hook (LP: #533603):
  - debian/{snmp,snmpd}.apport: Added.
  - debian/control: Build-depends on dh-apport.
  - debian/rules: 
    + Add --with apport.
    + override_dh_apport to install hook on snmpd package only.
 * Dropped patches:
   - debian/patches/99-fix-ubuntu-div0.patch: Fix dvision by zero.. 

Show diffs side-by-side

added added

removed removed

Lines of Context:
15
15
static netsnmp_cache    *_cpu_cache = NULL;
16
16
 
17
17
void init_cpu( void ) {
 
18
    oid nsCPU[] = { 1, 3, 6, 1, 4, 1, 8072, 1, 33 };
18
19
    /*
19
20
     * If we're sampling the CPU statistics automatically,
20
21
     *   then arrange for this to be triggered regularly,
35
36
        if ( _cpu_head )
36
37
            _cpu_update_stats( 0, NULL );
37
38
    } else
38
 
        _cpu_cache = netsnmp_cache_create( 5, netsnmp_cpu_arch_load,
39
 
                                           NULL, NULL, 0 );
 
39
        _cpu_cache = netsnmp_cache_create( 5, netsnmp_cpu_arch_load, NULL,
 
40
                                              nsCPU, OID_LENGTH(nsCPU));
40
41
}
41
42
 
42
43
void shutdown_cpu( void ) {