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
# | |
# copied some parts of this script from | |
# https://gallery.technet.microsoft.com/office/e0bb250e-e699-4c6c-a5be-f1af245a2219 | |
# | |
#$queueThreshold=$args[0] | |
$queueThreshold=50 | |
#$domainUser=$args[1] | |
#$domainUser= |
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
rem compatible from windows version 2003. Ejemplo C:,3000000 (bytes) | |
@echo off | |
set drive=%1 | |
shift | |
set threshold=%1 | |
shift | |
rem woooojojojo! todo esto solo para obtener el espacio libre . | |
for /f "usebackq delims== tokens=2" %%x in (`wmic logicaldisk where "DeviceID='%drive%'" get FreeSpace /format:value`) do set FreeSpace=%%x |
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
var exec = require('child_process').exec; | |
var drive = process.argv[2]; | |
var threshold = process.argv[3]; | |
var cmd = 'fsutil volume diskfree ' + drive; | |
var defaultPercentage = 0.2; // 20% | |
console.log('checking drive ' + drive + ' free space. running => ' + cmd); | |
exec(cmd, function(err, stdout, stderr){ |
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
echo off | |
set url=%1 | |
shift | |
set threshold=%1 | |
shift | |
set datetime=%date:~-4%_%date:~-7,2%_%date:~-10,2%_%time:~0,2%_%time:~3,2%_%time:~6,2% | |
set logname=..\tmp\responseTime%datetime%.txt | |
..\mingw64\bin\curl -o /dev/null -s -w %%{time_total} %url% > %logname% |
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
var exec = require('child_process').exec; | |
var dir = process.argv[2]; | |
var limit = process.argv[3]; | |
var cmd = 'powershell -noprofile -command "(ls -r ' + dir + ' |measure -s Length).Sum"'; | |
exec(cmd,function(err,stdout,stderr){ | |
if(err){ | |
console.log(err); | |
console.log(stderr); | |
return console.log('failure'); |
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
@echo off | |
set currentdir=%1 | |
echo %currentdir% | |
shift | |
set targetdir=%1 | |
echo %targetdir% | |
shift | |
set filename=%1 | |
echo %filename% |
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
var exec = require('child_process').exec; | |
var url = process.argv[2]; | |
var threshold = parseFloat(process.argv[3]); | |
var cmd = 'c:\\theeye\\theeyecore\\mingw64\\bin\\curl.exe -o /dev/null -s -w %{time_total} ' + url; | |
console.log('running ' + cmd); | |
console.log('checking response time for ' + url + ' is below => ' + threshold); | |
exec(cmd, function(err, stdout, stderr){ |
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
echo off | |
set arg1=%1 | |
set arg2=%2 | |
shift | |
shift | |
..\mingw64\bin\curl -o /dev/null -s -w %%{time_total} %arg1% > ..\tmp\rtime2.txt | |
set /p VAR=<..\tmp\rtime2.txt | |
del ..\tmp\rtime2.txt | |
IF %VAR% GEQ %arg2% ( | |
echo Response time alto! %VAR%, expected %arg2% |
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
#!/bin/bash | |
which expect > /dev/null | |
if [ "$?" -eq "1" ];then echo FAILURE | |
else | |
if [ -z "$1" ] || [ -z "$2" ] || [ -z "$3" ];then echo FAILURE Some var is undefined set PASS $1 POOL $2 ipAndPort $3;exit;fi | |
PASS=$1 | |
POOL=$2 | |
ipAndPort=$3 | |
tempFile=/tmp/resultado | |
#Variable |
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
#!/bin/bash | |
which expect > /dev/null | |
if [ "$?" -eq "1" ];then echo FAILURE | |
else | |
if [ -z "$1" ] || [ -z "$2" ] || [ -z "$3" ];then echo FAILURE Some var is undefined set PASS $1 POOL $2 ipAndPort $3;exit;fi | |
PASS=$1 | |
POOL=$2 | |
ipAndPort=$3 | |
tempFile=/tmp/resultado | |
#Variable |
OlderNewer