Blog Test

| 0 Comments | 0 TrackBacks

Blog Test


To change or update the information for your New York State Corporation, go to the NYS Department of State Website at http://www.dos.state.ny.us and enter 1556 in the search box. This should lead you to select a pdf formatted form #1556 (Certificate of Change Form).

Fill out the form accordingly and send in the form with a check for $30 payable to New York State Department of State.

Disclaimer: This information could change at any time, the information on this page should always be verified with the New York State Department of State Customer Service team.


Sun Solaris 10 Release Updates

| 0 Comments | 0 TrackBacks
Sun Solaris 10 has been around for over four years now. Over this period of time, Sun has released several updates for Solaris 10. It is often confusing to decipher which release “update” is tied to the “month & year” of Solaris 10. Below is a paragraph detailing the Solaris 10 Updates and their month/year.
  1. Solaris 10 - Update 1 - 1/06
  2. Solaris 10 - Update 2 - 6/06
  3. Solaris 10 - Update 3 - 11/06
  4. Solaris 10 - Update 4 - 08/07
  5. Solaris 10 - Update 5 - 05/08
  6. Solaris 10 - Update 6 - 10/08
  7. Solaris 10 - Update 7 - 05/09
  8. Solaris 10 - Update 8 - 10/09

Type `cat /etc/release` to figure out which OS release the server is currently running.
Remember, applying the latest patch cluster set to Solaris does not mean Solaris now has new features included with the latest OS release.

For example, if you want the newest features in Solaris 10 Update 8, you will need to install Solaris 10 Update 8 not install the latest patch cluster set on your currently running Solaris 10 Update 3 server.

Time Machine Backup Interval

| 0 Comments

Time Machine Backups internal is setup for every 3600 seconds/60 minutes/1 hour. To verify, change and confirm your Time Machine Backup Interval, here is what you need to do.

Check the current:

sudo defaults read /System/Library/LaunchDaemons/com.apple.backupd-auto StartInterval

Change to new interval every 5 hours:

sudo defaults write /System/Library/LaunchDaemons/com.apple.backupd-auto StartInterval -int 18000

Confirm:

sudo defaults read /System/Library/LaunchDaemons/com.apple.backupd-auto StartInterval
        

find exec mv

| 0 Comments
Everyday commands
find . -name *.zip -exec mv {} /tmp/. \;

Disable transmitting Bonjour service advertisements on Mac

| 0 Comments

Referenced: http://support.apple.com/kb/HT3789

---

Disable transmitting Bonjour service advertisements. You can use this advanced article if you are a network administrator who needs to disable Bonjour advertising service without disabling Bonjour queries and DNS.

Products Affected

Bonjour, Mac OS X 10.6, Bonjour

Important: Follow these steps carefully. A malformed or problematic mDNSResponder.plist file may prevent your Mac from starting up. As a precaution, perform a full backup of your system with Time Machine.

  1. Make a back up copy of the mDNSResponder.plist file as a precaution.
  2. Open the mDNSResponder.plist file in Terminal using your preferred text editor. Here is a sample command:
    sudo nano "/System/Library/LaunchDaemons/com.apple.mDNSResponder.plist"
  3. Add "<string>-NoMulticastAdvertisements</string>" to the array in the "ProgramArguments" section.

    In other words:
       <key>ProgramArguments</key>
  4.    <array>
  5.        <string>/usr/sbin/mDNSResponder</string>
  6.        <string>-launchd</string>
  7.    </array>

  8. becomes...
       <key>ProgramArguments</key>
  9.    <array>
  10.        <string>/usr/sbin/mDNSResponder</string>
  11.        <string>-launchd</string>
  12.     <string>-NoMulticastAdvertisements</string>
  13.    </array>

  1. Save the file.

    Important
    : If you edited the file using emacs, you must remove the emacs backup file (the file with a tilde at the end of the name, "/System/Library/LaunchDaemons/com.apple.mDNSResponder.plist~") or your Mac will not start up.
  2. Restart your Mac.


   or


launchctl unload -w /System/Library/LaunchDaemons/com.apple.mDNSResponder.plist

launchctl load -w /System/Library/LaunchDaemons/com.apple.mDNSResponder.plist


Additional Information

Prior to Mac OS X v10.6, the only way for a network administrator to disable Bonjour advertising of services was to completely disable the mDNSResponder process, which also disabled Bonjour discovery of services (such as discovering network printers).


Jumbo Frames & Oracle

| 0 Comments
Ethernet uses a Maximum Transfer Unit (MTU) of 1,500 bytes. This limits the maximum size of an Ethernet packet to 1,500 bytes. Larger I/O requests are split into multiple MTU-sized packets. Transmitting a large number of small packets impacts the host CPU by generating an excessive number of interrupts for each application I/O.
Typical database environments transfer data in 2KB to 32KB sizes which always require multiple 1,500 byte packets per database I/O. Jumbo frames increase the device MTU size to a larger value (typically 9,000 bytes) allowing I/O requests to more frequently fit in one physical packet and reducing the number of frames required for larger I/O requests.

Starting VMware Fusion from the Command Line

| 0 Comments
open /Applications/VMware\ Fusion.app/Contents/MacOS/vmware

Ping Success or Failure using Bash

| 0 Comments
#!/bin/bash

if ping -c 1 hostfoo > /dev/null
   then
	echo "ping success"
   else
        echo "could not ping hostfoo. exiting..."
fi

Automating SSH public key pushes with Perl

| 0 Comments

Automating SSH public key pushes to servers.

The code below uses Expect and SSH to create & permission the .ssh directory. Followed by SSH copying the local temp file as the authorized_keys file to the .ssh subdir on the target server .

Be sure to set StrictHostKeyChecking=no in the SSH client side config.

---

#!/usr/bin/perl

use strict;
use warnings;
use English;
use Expect;
use Net::Ping;
my $username = "USER";
my $password = "PASS";
my $homedir  = "\/export\/home\/$username";
my $ssh_dir  = "$homedir\/.ssh";
my $ssh_pub  = "
ssh-dss BLAH BLAH use your own public key file entry here.
";

if ( ! $ARGV[0] ) {
        print "$0  \n";
        exit
} 

my $host = "$ARGV[0]";
my $p 	 = Net::Ping->new();
if ( $p->ping($host) ) {
	print "Deploying public key to $host \n";
	create_ssh_dir();
	chmod_ssh_dir();
	push_ssh_key();
} else {
	print "Seems $host is not reachable \n";
}
$p->close();

sub create_ssh_dir {
my $ssh_cmd  = "/usr/bin/ssh $username\@$host 'mkdir $ssh_dir'";

my $timeout  = '5';
my $exp      = Expect->spawn($ssh_cmd) or die "Cannot spawn ssh command \n";
$exp->expect($timeout, ["Password:"]);
$exp->send("$password\n");
$exp->soft_close();
}

sub chmod_ssh_dir {
my $ssh_cmd  = "/usr/bin/ssh $username\@$host 'chmod 755 $ssh_dir'";

my $timeout  = '5';
my $exp      = Expect->spawn($ssh_cmd) or die "Cannot spawn ssh command \n";
$exp->expect($timeout, ["Password:"]);
$exp->send("$password\n");
$exp->soft_close();
}

sub push_ssh_key {
my $tmp_file  = "/tmp/authorized_keys.$$";
chomp $ssh_pub;

open  ( AUTHKEY, ">$tmp_file") || die ("Unable to create $tmp_file\n");
print AUTHKEY "$ssh_pub" . "\n";
close ( AUTHKEY );

my $scp_cmd  = "/usr/bin/scp $tmp_file $username\@$host:$ssh_dir/authorized_keys";

my $timeout = '5';
my $exp = Expect->spawn($scp_cmd) or die "Cannot spawn scp command \n";
$exp->expect($timeout, ["Password:"]);
$exp->send("$password\n");
$exp->soft_close();

unlink("$tmp_file");
}