AnonSec Shell
Server IP : 85.193.89.191  /  Your IP : 3.145.102.131
Web Server : Apache
System : Linux 956367-cx40159.tmweb.ru 3.10.0-1160.105.1.el7.x86_64 #1 SMP Thu Dec 7 15:39:45 UTC 2023 x86_64
User : bitrix ( 600)
PHP Version : 8.1.27
Disable Function : NONE
MySQL : OFF  |  cURL : OFF  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /proc/982/root/usr/share/munin/plugins/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME ]     

Current File : /proc/982/root/usr/share/munin/plugins/snmp__processes
#!/usr/bin/perl -w
# -*- perl -*-
# vim: ft=perl

=head1 NAME

snmp__processes - Munin plugin to monitor the number of processes
on an SNMP device.

=head1 APPLICABLE SYSTEMS

Any SNMP-capable device that reports the
HOST-RESOURCES-MIB::hrSystemProcesses.0 OID.

=head1 CONFIGURATION

As a rule SNMP plugins need site specific configuration.  The default
configuration (shown here) will only work on insecure sites/devices.

   [snmp_*]
	env.version 2
        env.community public

In general SNMP is not very secure at all unless you use SNMP version
3 which supports authentication and privacy (encryption).  But in any
case the community string for your devices should not be "public".

Please see 'perldoc Munin::Plugin::SNMP' for further configuration
information.

=head1 INTERPRETATION

The total number of processes currently operating on the system.

=head1 MIB INFORMATION

This plugin requires support for the HOST-RESOURCES-MIB (RFC 2790).  It
reports the contents of the hrSystemProcesses OID.

=head1 MAGIC MARKERS

  #%# family=snmpauto
  #%# capabilities=snmpconf

=head1 BUGS

None known.

Could be extended to report the value of hrSystemMaxProcesses if it
exists.

=head1 AUTHOR

Copyright (C) 2004 Jimmy Olsen, Dagfinn Ilmari Mannsåker

Documented and updated to use Munin::Plugin::SNMP by Matthew Boyle
in 2010.

=head1 LICENSE

GPLv2.

=cut

use strict;
use Munin::Plugin::SNMP;

if (defined $ARGV[0] and $ARGV[0] eq 'snmpconf') {
	# .iso.org.dod.internet.mgmt.mib-2.host.hrSystem.hrSystemProcesses.0
	print "require 1.3.6.1.2.1.25.1.6.0 [0-9]\n";
	exit 0;
}

if (defined $ARGV[0] and $ARGV[0] eq "config") {
	my ($host) = Munin::Plugin::SNMP->config_session();

	print "host_name $host\n" unless ($host eq 'localhost');
	print <<'EOC';
graph_title Number of Processes
graph_args --base 1000 -l 0
graph_vlabel number of processes
graph_category system
graph_info This graph shows the number of processes running on the system.
processes.label processes
processes.draw LINE2
processes.info The number of processes.
EOC
	exit 0;
}

my $session = Munin::Plugin::SNMP->session();
my $processes = $session->get_single('1.3.6.1.2.1.25.1.6.0');
print "processes.value ", defined $processes ? $processes : 'U', "\n";

Anon7 - 2022
AnonSec Team