Tuesday, June 4, 2013

tf101 usb battery

A while back I got this "Rechargeable Laptop Battery" from a brookstone outlet a few months ago for about 35$. Not bad since its 145.

http://www.brookstone.com/U2O-Battery-Laptop

So here is what I did to it to make it work for my tf101. The pictures are pretty self explanatory








Tuesday, May 21, 2013

Download a script and run it and log output



Run on box a
ssh root@carebears-hv-01.pony.com "wget http://unicorn.com/test " -O - | sh - 2>&1 | tee log_file.txt"


File on box b "unicorn"

##cat test
#!/bin/sh

echo "this is a test"





output on box c "carebears"
# cat log_file.txt
this is a test

Look its magic

Monday, May 20, 2013

ppc64 lpar vios stuff

 Vios stuff

shows state of lpars

lssyscfg -r lpar -F lpar_id,name,state


activate lpars
chsysstate -o on -b norm -r lpar -n name

find out the name of the managed system
 lssyscfg -r sys -F name

Change the name of a managed system
chsyscfg -r sys -m Server-8406-xx-SNxxxxx -i "new_name=xxxx-xxxxx-xx-01"


 ppc64 lpar vios nic settings

remove bad settings


    $ oem_setup_env
    # ifconfig enX down detach
    # rmdev -dl enX
    # rmdev -dl entX
    # rm dev -dl etX
    # cfgmgr


    find out your cards

     $ lsdev | head -n 28


    show your mapping to sea nics

    $ lsmap -net -all


    mkvdev -sea ent0 -vadapter ent4 -default ent4 -defaultid 1


    mkvdev -sea ent1 -vadapter ent5 -default ent5 -defaultid 123

    chdev -dev ent0 -attr state=up -restoreroute


    Use smit to start dhcp on the nic



    get macs


    entstat en3

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 .