Monday, March 16, 2015

Multiple domain search linux

A line in /etc/resolv.conf with multiple domains, separated by spaces, works for me, e.g.:

search dom1.hooya.edu dom2.hooya.edu hooya.edu



http://forums.fedoraforum.org/showthread.php?t=80062

Tuesday, April 29, 2014

CPU Load Test (100%) Linux

#!/bin/bash
# Simple CPU stress test script

# Read the user's input
echo -n "Number of CPU threads to test: "
read cpu_threads
echo -n "Duration of the test (in seconds): "
read cpu_time

# Run an endless loop on each thread to generate 100% CPU
echo -e "\E[32mStressing ${cpu_threads} threads for ${cpu_time} seconds...\E[37m"
for i in $(seq ${cpu_threads}); do
    let thread=${i}-1
    (taskset -cp ${thread} $BASHPID; while true; do true; done) &
done

# Once the time runs out, kill all of the loops
sleep ${cpu_time}
echo -e "\E[32mStressing complete.\E[37m"
kill 0

Friday, April 25, 2014

AWS Workspace howto

Part 1 - AWS Workspaces with On-Premise Directory +
OpenVPN Server (How-to)

Part 2 - AWS Workspaces with Cloud Directory (How-to)

Workspace

Sunday, April 13, 2014

Yum proxy

/etc/yum.conf
 
# The proxy server - proxy server:port number
proxy=http://mycache.mydomain.com:3128
# The account details for yum connections
proxy_username=yum-user
proxy_password=qwerty

Thursday, April 10, 2014

OpenVPC - AWS VPC Guide

http://www.whiteboardcoder.com/2012/12/amazon-aws-vpc-setting-up-openvpn-server.html

http://dbsgkhvbz3k7m.cloudfront.net/AmazonVPC/AmazonVPC.html

Tuesday, November 26, 2013

MAC address filter Linux DHCP

/etc/dhcpd.conf
-----------------

ddns-update-style interim;

allow booting;
allow bootp;

authoritative;

ignore client-updates;
set vendorclass = option vendor-class-identifier;
 

# VDI Vcenter IPs
class "private-hosts" {
        match if substring(hardware,1,4) = 00:50:56:84;
}

subnet 192.168.100.0 netmask 255.255.255.0 {
     option routers             192.168.100.1;
     option domain-name-servers 192.168.100.1;
     option domain-name         "example.com";
     option subnet-mask         255.255.255.0;
     filename                   "/pxelinux.0";
     default-lease-time         2419200;
     max-lease-time             2419200;
     option ntp-servers         192.168.100.1;
     pool {
                range dynamic-bootp     192.168.100.200 192.168.100.255;
                deny members of "private-hosts";
        }
}

group {
    host test.example.com {
        hardware ethernet 00:23:7D:DE:97:E4;
        fixed-address 192.168.100.2;
        option host-name "test.example.com";
        option routers 192.168.100.1;
        filename "/pxelinux.0";
        next-server 156.132.110.119;
    }
}

------------------
Additional info:

http://petuu.org/?e=22

Sunday, November 17, 2013