View rp_cg_rep_stats.sh
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
RP="192.168.100.101" | |
out="./cg_stats.out" | |
groups="./groups.in" | |
#plink -l admin -pw admin $RP "get_groups" | egrep -v "Production|DRSite|Copies|Groups" | sed -e '/^$/d' | awk -F\: '{print $1}' | sed '$d' > $GroupTmp | |
echo "CGName,JournalUsage,JournalLag,ReplicationLag,CurrentProtectionWindow,PredictedProtectionWindow" | |
echo "CGName,JournalUsage,JournalLag,ReplicationLag,CurrentProtectionWindow,PredictedProtectionWindow" > $out | |
for name in `cat $groups`; do | |
#JournalTotal=`plink -l admin -pw admin $RP "get_group_statistics $name" | egrep "Total:" | tail -n1 | awk '{for (i=2; i<NF; i++) printf $i " "; print $NF}'` |
View 0_reuse_code.js
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
View check_datastore_cap.ps1
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
#PowerShell script to check datastore capacity | |
add-pssnapin VMware.VimAutomation.Core | |
Connect-VIServer -Server 'vcenter' -User 'domain\user' -Password 'password' | |
#HTML formatting | |
$a = "<style>" | |
$a = $a + "BODY{background-color:white;}" | |
$a = $a + "TABLE{border-width: 1px;border-style: solid;border-color: black;border-collapse: collapse;}" | |
$a = $a + "TH{border-width: 1px;padding: 5px;border-style: solid;border-color: black;foreground-color: black;background-color: LightBlue}" |
View ddreport.bat
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 ON | |
@echo off | |
:: DD Report Generator | |
:: 3/12/2014 | |
:: Rich Bocchinfuso | |
::setlocal EnableDelayedExpansion | |
:: ----- Requires ----- | |
:: plink | |
:: blat |
View ghettoVCBmgmt.bat
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 ON | |
@echo off | |
:: ghettoVCB Management | |
:: 3/12/2014 | |
:: Rich Bocchinfuso | |
::setlocal EnableDelayedExpansion | |
:: ----- Requires ----- | |
:: plink | |
:: blat |
View nwgetclientss.pl
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
#!/usr/bin/perl | |
BEGIN { eval { require bytes; }; } | |
use strict; | |
no strict "vars"; | |
## Switch will be used to test the field value and build the csv file | |
use Switch; | |
use Data::Dumper; |
View parsemminfoxml.pl
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
#!/opt/ActivePerl-5.16/bin/perl | |
use XML::Simple; | |
use Data::Dumper; | |
use IO::File; | |
open (OUTFILE, '>parsed_mminfo.csv'); | |
print OUTFILE "filename,client,name,level,sum-size\n"; | |
# create object | |
$xml = new XML::Simple (KeyAttr=>[]); |
View mergenar.ps1
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
#mergenar.ps1 | |
$TempFile = "c:\temp\nar_out\Temp.nar" | |
$OutputFile = "c:\temp\nar_out\NAR_Merge.nar" | |
$NarFiles = Get-Childitem "c:\temp\nar_in" | |
$count =0 | |
$count = $NarFiles | Measure-Object | select -ExpandProperty count | |
$filecount = 0 |
View hubot.sh
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/sh | |
USER="hubot" | |
USER_HOME="/home/$USER" | |
HUBOT_ROOT="$USER_HOME/hubot" | |
HUBOT_HOME="$HUBOT_ROOT/node_modules/hubot" | |
DAEMON="$HUBOT_HOME/bin/hubot" | |
PIDFILE=$HUBOT_ROOT/hubot.pid | |
case "$1" in |
View hubotAlive.sh
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 | |
# Add to crontab | |
# */5 * * * * ~/hubotAlive.sh hubot | |
hubotName=$1 | |
hubotPID=$(ps -aux | grep -w node | grep -w ${hubotName} | grep -v grep | awk '{print $2}') | |
echo "hubot PID: ${hubotPID}" |
OlderNewer