Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
#A set of disks to ignore from partitioning and formatting
BLACKLIST="/dev/sda|/dev/sdb"
is_partitioned() {
OUTPUT=$(partx -s ${1} 2>&1)
egrep "partition table does not contains usable partitions|failed to read partition table" <<< "${OUTPUT}" >/dev/null 2>&1
if [ ${?} -eq 0 ]; then
return 1
#!/bin/sh
#
# Script Name: sles11_trak_init.sh
# Author: Tony Pepper
# Version: 0.1
# Last Modified By: Murray Oldfield
# Description:
# This script configures kernel parameters in preparation for a TrakCare installation.
# This script has been tested on SLES11SP4 and designed for Azure deployment provisioned via JSON template.
#
@murrayo
murrayo / lvmsetup.sh
Created October 7, 2015 05:13
lvm setup in azure
#!/bin/bash
# The MIT License (MIT)
#
# Copyright (c) 2015 Microsoft Azure
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
#get-mean-max.awk
#awk -F ',' -v COL=3 -v column="Glorefs" -f minmax.awk inputfileName
# Metric, peak, average
( NR > 1 ) {
if(max=="")
{
max=0
#!/bin/sh
# What do we want to plot?
mgstat=""
perfmon=""
vmstat=""
includeSnap="N"
Usage="Usage: $0 [-m] [-p] [-v|-a [-6]|-b] [-n] [-s] [-c] -d directory ... -[w] windows_perfmon_dir \n\tselect one or more of -d directory_to_work_on -[m]gstat, -[p]erfmon, -[v]mstat -[a]ix_vmstat -[6]aix 6 vmstat -[n]o_time -[s]napshot_graphs -[c]sv_filesonly -[w]indows perfmon template"