September 2008 Archives

Flush DNS on MacOS X Leopard

| 0 Comments | 0 TrackBacks
dscacheutil -flushcache

Convert sar text to RRDTool Graphs

| 0 Comments | 0 TrackBacks

sar2rrd.pl by Jerome Delamarche converts the sar text to useful RRDTool graphs. Visit http://www.trickytools.com/php/sar2rrd.php to download the latest sar2rrd.pl and for more information about sar2rrd.

Network & System Monitoring with UNNOC

| 0 Comments | 0 TrackBacks

Here's a new network & system monitoring tool that I like for the simplicity.

Unnoc is a NOC network monitoring application that is designed to integrate traffic graphs (RRDTool) with SNMP host checking, monitoring and graphing. It uses native SNMP to monitor servers, Wireless Access Points, UPS's, routers, firewalls, network switches--anything SNMP-enabled, and will send out pages and email alerts if something is wrong.

Visit http://unnoc.org/ for more info or better yet visit http://unnoc.org/demo for a live demo.

 

Exclusive NIC for a Solaris Zone

| 0 Comments | 0 TrackBacks

By default, when you setup a Solaris Zone the ip-type will be set to shared.

Now, you can setup exclusive access to a Solaris Zone. This means only the Zone can communicate with the NIC. Even the global zone will NOT be able to communicate on the specified NIC.

You can use DHCP, static IPs and manage routing.

global# zonecfg -z myzone
zonecfg:myzone> set ip-type=exclusive
zonecfg:myzone> add net
zonecfg:myzone:net> set physical=bge1
zonecfg:myzone:net> end
zonecfg:myzone:>exit

Physical, Virtual & Locked Memory Settings for Zones

| 0 Comments | 0 TrackBacks

Physical Memory:


global# zonecfg -z myzone
zonecfg:myzone> add capped-memory
zonecfg:myzone:capped-memory> set physical=500m
zonecfg:myzone:capped-memory> end
zonecfg:myzone> exit

Same but while the zone is running:


global# rcapadm -z myzone -m 600m

Warning: Paging will occur if you over-subscribe.

Virtual Memory:


global# zonecfg -z myzone
zonecfg:myzone> add capped-memory
zonecfg:myzone:capped-memory> set swap=1g
zonecfg:myzone:capped-memory> end
zonecfg:myzone> exit

Same but while the zone is running:


global# prctl -n zone.max-swap -v 2g -t privileged -r -e deny -i zone myzone

Locked Memory:


global# zonecfg -z myzone
zonecfg:myzone> add capped-memory
zonecfg:myzone:capped-memory> set locked=100m
zonecfg:myzone:capped-memory> end
zonecfg:myzone> exit

Installing Solaris Package to Global Zone Only

| 0 Comments | 0 TrackBacks

When you install a package on the global zone, pkgadd will install the package to the global and non-global zones unless you use the -G attribute.

For example:


pkgadd -G -d SUNWtest

Installation of Collabnet Subversion on Solaris

| 0 Comments | 0 TrackBacks
  1. Download the Subversion Binaries for Solaris from Collab http://www.collab.net
  2. Download the certificate from Collab  wget http://www.collab.net/nonav/downloads/subversion/certificate/certificate.pem
  3. Install the certificate pkgadm addcert -ty certificate.pem
  4. Install the packages pkgadd -G -d CSVNclnt-1.5.2.1-sparc-local pkgadd -G -d CSVNsrvr-1.5.2.1-sparc-local pkgadd -G -d CSVNxtrs-1.5.2.1-sparc-local
Next, start the configuration by running /opt/CollabNet_Subversion/bin/Configure-CollabNet-Subversion

Satellite Radio Playlists

| 0 Comments | 0 TrackBacks

To find out the playlist of any satellite radio station, visit the following url below.


  1. http://www.mmr247.com/mmrweb/AllAccess/

  2. Select 7 Days Reports

  3. Select Station Playlists

Popular Stations:


  • "X081" for BPM (XM's BPM Station on 81)

  • "S036" (Sirius The Beat on 36)


Secure SNMP on the Cisco router

| 0 Comments | 0 TrackBacks

Below is an example where the router is only allowing host 10.10.10.20 to make snmp calls.


access-list 10 permit 10.10.10.20
snmp-server community public ro 10

Changing the default message size limit in Postfix

| 0 Comments | 0 TrackBacks

The default message size limit for postfix is 10 megabytes. Modify your main.cf file and use the message_size_limit = option.

Don't forget to reload postfix once your done.

Useful hotkeys in Terminal

| 0 Comments | 0 TrackBacks
ctrl a - beginning of the line 
ctrl e - the end of the line 
esc b - moves back one word 
esc f - forward one word 
ctrl b - back one character 
ctrl f - forward one character 
ctrl d - delete one character 
ctrl r - re-display a line 
ctrl v - erase a line 
ctrl w - erase a word 
ctrl z - exit config mode 
tab - completes partially entered command

Useful dmidecode commands

| 0 Comments | 0 TrackBacks
How many memory banks are used? 
dmidecode -t memory | grep -i size

Analyzing Switch Port Traffic with Cisco & Linux

| 0 Comments | 0 TrackBacks

To analyze switch port traffic, you need to mirror your switch port. This is also known as port mirroring or on Cisco Catalyst switches - Catalyst Switched Port Analyzer (SPAN).

On my switch, I mirror my switch port by running the following commands:


monitor session 1 source interface fa2
monitor session 1 destination interface fa6

Once that's done, I take the physical connection that is in fa6 above and plug in into the eth1 interface on my Linux box.

From my Linux box, I can run tcpdump or use tools like ipfm to analyze the traffic.

Configure NTP on the Cisco Router

| 0 Comments | 0 TrackBacks
clock timezone EST -5
ntp server 10.10.10.20

Verify by running:

show ntp status
show ntp associations 
show clock
show clock detail

Rename the Tabs in Terminal

| 0 Comments | 0 TrackBacks

Ever wish you could rename the tab in Leopard's Terminal program? Now you can by using SIMBL and Eric Anderson's Terminal.app Tab Namer. Instructions are below.


  1. Install SIMBL (Smart InputManager Bundle Locator), you can download the binary from http://www.culater.net/software/SIMBL/SIMBL.php

  2. Create a the necessary directories by running "mkdir -p ~/Library/Application\ Support/SIMBL/Plugins"

  3. Install Terminal.app Tab Namer, you can download the binary from http://ericanderson.us/2008/03/02/terminalapp-tab-namer-v01-alpha/

  4. Drop the TabNamer.bundle file into ~/Library/Application\ Support/SIMBL/Plugin

  5. Restart you Terminal application

  6. Open a new tab session

  7. Press shift-command-t

  8. Rename your tab!

Useful NetApp Commands

| 0 Comments | 0 TrackBacks
To go into the advanced mode: 
- priv set advanced (diag mode)

To read files on the console: 
- rdfile 

To read files from your machine: 
- Mount :/vol0 

To write files on the console: 
- wrfile (CTRL-C) 

Some useful disk commands (use -v for more info): 
- sysconfig -r (show disks) 
- aggr status 
- vol stat

vol options 
- nosnap 
- nosnapdirectory 
- no_i2p

vol create -s dist_vol origin:source_vol guarantee=none (thin provisioned) 

Security: 
- qtree security /vol/volume/qtree 
- options wafl 

Snapmirror:
- snapmirror status 
- snapmirror destinations 
- rdfile /etc/snapmirror.allow 
- vol create volumes -s none aggr0 100g (source) 
- vol create volume_dr -s none aggr1 110g (destination) 
- vol restrict volumes_dr 
- snapmirror initialize -s 5train:volumes volume_dr 
- snapmirror status 
- rdfile /etc/snapmirror.conf 

Exports: 
- exportfs -p 
- exportfs -a (if you do this with a file)