Skip to content

Instantly share code, notes, and snippets.

View skoef's full-sized avatar

Reinier Schoof skoef

View GitHub Profile
<?php
if ($device['os'] == 'dnos' || $device['os'] == 'ftos') {
echo 'DNOS CPU: ';
$descr = 'CPU';
if (preg_match('/.6027.1.3.[0-9]+$/', $device['sysObjectID'])) {
echo 'Dell S Series Chassis';
$usage = str_replace(' percent', '', snmp_get($device, 'chStackUnitCpuUtil5Sec.1', '-OvQ', 'F10-S-SERIES-CHASSIS-MIB'));
discover_processor($valid['processor'], $device, '.1.3.6.1.4.1.6027.3.10.1.2.9.1.2.1', '0', $device['os'], $descr, '1', $usage);
} elseif (preg_match('/.6027.1.2.[0-9]+$/', $device['sysObjectID'])) {

Keybase proof

I hereby claim:

  • I am skoef on github.
  • I am skoef (https://keybase.io/skoef) on keybase.
  • I have a public key ASATYaGd6xTEnO8QrOenmvI3p1LYmcUe-vhlB6SUx5zDiAo

To claim this, I am signing this object:

@skoef
skoef / check_pf_limits
Last active August 29, 2015 14:21
Nagios plugin for monitoring PF limits
#!/bin/sh
usage() {
cat <<- EOF
Usage: $(basename ${0}) [-h] -w warninglevel -c criticallevel
EOF
}
# parse command line arguments
if [ $# -eq 0 ]; then