This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$payload = 'hello world'; | |
$stream = stream_socket_client("tcp://127.0.0.1:5555", $errno, $errstr); | |
if (!$stream) { | |
echo "{$errno}: {$errstr}\n"; | |
die(); | |
} | |
fwrite($stream, $payload); | |
stream_socket_shutdown($stream, STREAM_SHUT_WR); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// keep N-day worth of data | |
var days=7; | |
// change to false to have the script to really exclude old records | |
// from the database. While true, no change at all will be made to the DB | |
var dryrun=true; | |
var now = new Date().getTime(), | |
time_criteria = now ; | |
time_criteria_in_seconds = time_criteria / 1000; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# A simple PowerShell script for retrieving the RAID status of volumes with help of diskpart. | |
# The nicer solution would be using WMI (which does not contain the RAID status in the Status field of Win32_DiskDrive, Win32_LogicalDisk or Win32_Volume for unknown reason) | |
# or using the new PowerShell API introduced with Windows 8 (wrong target system as our customer uses a Windows 7 architecture). | |
# | |
# diskpart requires administrative privileges so this script must be executed under an administrative account if it is executed standalone. | |
# check_mk has this privileges and therefore this script must only be copied to your check_mk/plugins directory and you are done. | |
# | |
# Christopher Klein <ckl[at]neos-it[dot]de> | |
# This script is distributed under the GPL v2 license. |