Monday, March 18, 2013

How to get serial numbers from a sun box


How to get serial numbers from a sun box


bash-3.2# smbios -t SMB_TYPE_SYSTEM
ID    SIZE TYPE
1     159  SMB_TYPE_SYSTEM (system information)
  Manufacturer: Sun Microsystems
  Product: Sun -----
  Version:                                
  Serial Number:xxxx                    
  UUID: ff200008-ffff-ffff-ffff-xxxxxxxxx
  Wake-Up Event: 0x6 (power switch)
  SKU Number: xxxxxxxxx        
  Family: Sun ---

Another good command 

prtdiag -v

Thursday, March 14, 2013

dns and dhcp loops of death



 dhcp loop fun

for i in {1..2};do  index=$(($i+28-1)); echo -e "\t\thost war-vm-$i.super.mega.ultra.pony.com {\n\t\t\thardware ethernet xx:xx:xx:xx:xx:$index;\n\t\t\tfixed-address war-vm-$i.super.mega.ultra.pony.com;\n\t\t}"; done

Give you this sexy output


host war-vm-1.super.mega.ultra.pony.com {
                        hardware ethernet xx:xx:xx:xx:xx:28;
                        fixed-address war-vm-1.super.mega.ultra.pony.com;
                }
                host war-vm-2.super.mega.ultra.pony.com {
                        hardware ethernet xx:xx:xx:xx:xx:29;
                        fixed-address war-vm-2.super.mega.ultra.pony.com;
                }

dns fun

if you want to generate entry's from war-vm-1 to 60 but your ip dose not start at 1.
its time do have your dns server do some math


super.mega.ultra.pony.com

 $GENERATE       7-67    war-vm-\${-6,0} A 66.66.66.$

66.66.66

$GENERATE       7-67   $       PTR     war-vm-\${-6,0}.super.mega.ultra.pony.com.

Saturday, March 2, 2013

Stereo Fun with Sony MEX BT2700

About 5 months ago I installed my Sony MEXBT2700  in my 2011 Nissan Altima. And its working great. However I lost my steering wheel controls. So I just ordered the Axxess Metra ASWC-1 Universal Steering Wheel Control Interface which is listed compatible with my car. Unfortunately it is not so sent it back. Maybe I'll look for another product another time.

UPS on Netgear ReadyNas Duo

On the Netgear ReadyNas Duo you can add a UPS to prevent data loss.
But how do you manage that with out being present or able to login to your ready nas.
With the cli of course. First you have to setup the webui to handle the connection.
To do this you must login to the readynas
Click System
   >> Power
  >>> Under UPS Configuration you can select Enable network monitoring of attached UPS
      >>> Now you can enter your Ip of the host you want to check the ups status.


Here is what the output looks like

~]# upsc UPS@172.x.x.x
battery.charge: 100
battery.chemistry: PbAc
battery.runtime: 1688
battery.voltage: 27.6
driver.name: hidups
driver.parameter.lowbatt_pct: 0
driver.version: 2.0.5
ups.mfr: APC
ups.model: Back-UPS XS 1500 LCD
ups.serial: JB0648006890  
ups.status: OL

take your battery.runtime and / 49 and you get your time in mins
so mine is 
$ bcalc 1688/49
34.4489
34 mins of run time 

hmc clean up things


show disk stats
monhmc -r disk -n 0


Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/sda2             16121184   8686268   6616004  57% /
udev                   1036752       132   1036620   1% /dev
/dev/sda3              6040320   1775564   3957916  31% /var
/dev/sda7              8056524    158620   7488652   3% /dump
/dev/sda8             32297564    203056  30453872   1% /extra


Zero out
chhmcfs -o f -d 0

Watch for /var filling up past 50%

If /var ever fills up past 50% you will have trouble logging in via the web or ssh .