Always Remember: With Gusto Comes Data Loss.

SSH and SCP Guide

SSH

This guide is going to provide an overview of how to use SSH and SCP to connect to remote computers, run commands, and transfer files to and from them. ssh allows you to have command-line access to other computers over a relatively secure connection. scp lets you copy files to and from another computer over that same secure connection. Continue reading

My Custom Bash Profile

This post is a little different than the rest of the items on this site, but I figured I would share. Below is the content of my .profile file that customizes the look of your bash prompt. I do not take credit for everything in it, but I can’t attribute it properly as I have been using this for years and honestly just don’t remember where I pulled all the various bits from. Feel free to use as much or as little of this as you want. I have tried to comment as helpfully as possible.
Continue reading

Python Script For Grabbing Log Files Remotely

Below is a Python script I wrote to quickly harvest various logs from remote systems. This is a very simple script that was written for a very specific setup, so if you want to use it you will likely need to modify it. What it does is allow the user to enter an IP address, then uses scp to transfer the specified logs to the user’s system at the specified location. I don’t claim this is the best way, or even the correct way, to do this, but it solved a need that I had quickly and easily – your milage may vary.

This script was designed to work in an environment where every system that is being administered is accessible to the machine running it, via ssh, without a password. In the future I’ll likely post a guide on how to set up this sort of thing, but for now you’ll have to Google that.

To run the script you simply type:

./harvestLogs --ip <IP Address>

If you intend to use this script, be sure to change everything within the < > – and, of course, remove the brackets. I have pasted it here with example settings to show you the proper formatting.

##########################
# Created by: Josh Gold  #
# Created on: 03/28/2012 #
##########################

import os, subprocess, optparse

# Allow the program to accept the input of the --ip option
parser = optparse.OptionParser('Usage requires --ip ')
parser.add_option('--ip', dest='systemIP', type='string', help='specify IP address')
(options, args) = parser.parse_args()

# If no option and arguement are added return the usage instructions
if (options.systemIP == None):
	print parser.usage
	exit(0)

# Otherwise set systemIP equal to the user's input
else:
	systemIP = options.systemIP

# Gathers the DNS hostname from the IP
harvest_dns = subprocess.check_output(['ssh', '<josh@>' + systemIP, ' hostname']).strip()
print('Connected to: ' + harvest_dns)

# Sets the locations for the logs to gather
harvest_sys = str('<josh@>' + systemIP + '<:/var/log/system.log>')
harvest_sec = str('<josh@>' + systemIP + '<:/var/log/secure.log>')

# Uses scp to transfer the remote logs to the local system at the specified location
os.system("scp " + harvest_sys + " " + harvest_dns + "")
os.system("scp " + harvest_sec + " " + harvest_dns + "")

print('Done!')

Bonjour Devices Not Seen on Ruckus Wi-Fi

This is a known issue that affects ZoneFlex 7363’s. This does not present under all conditions, and Ruckus is still working on figuring out exactly what the cause is. In the meantime there is a work around that fixes this issue. To implement this workaround follow these instructions:

1. Connect to the Ruckus unit via SSH

2. Run the command:

set qos <ifname> directed multicast disable

Where you see <ifname> replace this with the interface name. You can figure this out by running:

get ssid wlan0

then

get ssid wlan1

…and so on until you locate the SSID of the network you are trying to get bonjour working on. By default, the first 2.4GHz SSID has the ifname wlan0 and the first 5GHz SSID has the ifname wlan8.

3. Exit SSH

4. Reboot the Ruckus

Proper CrashPlan Memory Allocation

Below are the instructions for allocating additional memory for CrashPlan Clients. This becomes necessary as the client is expected to backup larger datasets. This holds true for all versions of the client (Plus, PRO, PROe). Please reference the chart below for the values you should be setting.

+--------------------------------+
|  BACKUP SIZE  |  RAM REQUIRED  |
|---------------|----------------|
|    <=500 GB   |      512 MB    |
|---------------|----------------|
|   .5-1 TB     |      768 MB    |
|---------------|----------------|
|    1-3 TB     |     1024 MB    |
|---------------|----------------|
|    3-5 TB     |     2048 MB    |
|---------------|----------------|
|    >=5 TB     |     2560 MB    |
+---------------|----------------+

1.  Stop the backup engine by typing this into the Terminal application:

sudo launchctl unload /Library/LaunchDaemons/com.crashplan.engine.plist
2.  Run this command to edit the backup engine:
sudo nano /Library/LaunchDaemons/com.crashplan.engine.plist

3.  In /Library/LaunchDaemons/com.crashplan.engine.plist, find this line:

-Xmx512m
4.  Edit that line to something larger (the value from the chart above) E.g.:
-Xmx1024m
5.  Hold the Control key and tap the x key to exit. Choose “y” to confirm it.

 

6.  You’ll see the prompt “File Name to Write.” Hit enter to save to the existing location.

 

7.  Start the backup engine by typing:
sudo launchctl load /Library/LaunchDaemons/com.crashplan.engine.plist