Script to monitor disk space usage

Here is a quick and easy script that you can add to your crontab to monitor disk space consumption. Once you hit 85% disk utilization, you automatically send an email to yourself # cat space-monitor.sh #!/bin/bash #This script runs nightly to check disk space usage ADMIN=”macky@supermaru.com” df -h | grep -vE ‘^Filesystem|tmpfs|cdrom’ | awk ‘{print … Read more

hot-add CPU and memory to Ubuntu guest in VMware

Virtualization has made our lives easier. We can spin up new resources for applications, dynamically add more disk space, migrate them, etc. In vSphere, we can dynamically add additional memory and vCPU to a guest VM without any downtime (assuming its been enabled prior to powering on). Now in Ubuntu 12.04, I had two production … Read more

vCSA 6.0 automated deployment

Doing the first batches of vCenter Server Appliance (vCSA) 6.0 deployment was kinda…rough. Playing around with the OVA and getting annoyed at the web-based deployment option kind of slowed us down. At my current job we prefer vCSA’s for our Test and Dev environments and dont want to deal with Windows Server. Fortunately VMware has given … Read more

Add drives without reboot on VMware Ubuntu guest

This post is on deploying a new Ubuntu VM, dynamically adding more disks, having the guest OS recognize the new drives and increasing its capacity without rebooting. This is really useful for critical production servers that cannot go down for reboots like a NFS server. Lets get started. OS: I’m using Ubuntu 12.02.4 LTS server OS … Read more

setfacl

This is a utility that sets Access Control Lists (ACLs) for files and directories for linux hosts.  I’m managing a Linux host on AWS and a design firm is working on the website itself. Even though the host itself is a sandbox webserver, I don’t want to give out root credentials – so we set … Read more

Linux tool: mssh

Are you a constantly managing multiple Linux nodes and doing a lot of copy/paste to 6+ terminal sessions? Wish you can just type and execute commands once and all your SSH windows get auto-magically filled? Enter: mssh. What is it? This tool connects to multiple servers and opens them up into one terminal window. You type … Read more