Friday, February 10, 2017

Showing HP disk array health inside Linux


First you need to get the

hpssacli-1.50-4.0.x86_64.rpm

http://h20564.www2.hpe.com/hpsc/swd/public/detail?swItemId=MTX_b6a6acb9762443b182280db805

Then you can run things like this



[root@01 ~]# hpssacli controller slot=0 physicaldrive all show

Smart Array P410i in Slot 0 (Embedded)

   array A

      physicaldrive 1I:1:1 (port 1I:box 1:bay 1, SAS, 146 GB, OK)
      physicaldrive 1I:1:2 (port 1I:box 1:bay 2, SAS, 146 GB, OK)
      physicaldrive 1I:1:3 (port 1I:box 1:bay 3, SAS, 146 GB, OK)
      physicaldrive 1I:1:4 (port 1I:box 1:bay 4, SAS, 146 GB, Predictive Failure)
      physicaldrive 2I:1:5 (port 2I:box 1:bay 5, SAS, 146 GB, OK)
      physicaldrive 2I:1:6 (port 2I:box 1:bay 6, SAS, 146 GB, OK)
      physicaldrive 2I:1:7 (port 2I:box 1:bay 7, SAS, 146 GB, Predictive Failure)
      physicaldrive 2I:1:8 (port 2I:box 1:bay 8, SAS, 146 GB, Predictive Failure)


 [root@01 ~]# hpssacli ctrl slot=0 logicaldrive all show status

   logicaldrive 1 (546.8 GB, 1+0): OK


[root@01 ~]# hpssacli ctrl all show status

Smart Array P410i in Slot 0 (Embedded)
   Controller Status: OK

Wednesday, November 11, 2015

firefox 3.6 on fedora 23

I work on lots of legacy hardware that needs older browsers for ssl and plugins.

so I use a a old tarball of firefox 3.6 to get around most things.

#dnf install xulrunner-40.0-1.fc23.i686
#dnf install gtk2.i686

then

@WOPR1 firefox]$  su dracsucks
dracsucks@WOPR1 firefox]$ xhost +
dracsucks@WOPR1 firefox]$ cat /etc/redhat-release
Fedora release 23 (Twenty Three)
[dracsucks@WOPR1 firefox]$ LD_LIBRARY_PATH=/home/dracksucks/bin/firefox/ ./firefox-bin

(process:28971): GLib-CRITICAL **: g_slice_set_config: assertion 'sys_page_size == 0' failed

(firefox-bin:28971): Gtk-WARNING **: Unable to locate theme engine in module_path: "adwaita",

(firefox-bin:28971): Gtk-WARNING **: Unable to locate theme engine in module_path: "adwaita",

(firefox-bin:28971): Gtk-WARNING **: Error loading theme icon 'gtk-go-back-ltr' for stock: Icon 'gtk-go-back-ltr' not present in theme

(firefox-bin:28971): Gtk-WARNING **: Error loading theme icon 'gtk-go-forward-ltr' for stock: Icon 'gtk-go-forward-ltr' not present in theme

And boom

Update IBM System x3650 -[7979AC1]-

yum install libXtst.i686 -y 

BMC update

~]# yum install OpenIPMI ipmitool -y

 ~]# ./ibm_fw_bmc_ggbt59a_linux_i386.sh -s
IBM Flash Update Utility v1.167
Licensed Materials - Property of IBM
(C) Copyright IBM Corp. 2008  All Rights Reserved.

Initiating OpenIPMI connection
FULLFW.MOT:._................................_................................_____.......00:01 elapsed, 00:28 estimated remaining
................................................................................00:02 elapsed, 00:35 estimated remaining
................................................................................
00:44 elapsed, 00:01 estimated remaining
................................................................................00:44 elapsed, 00:00 estimated remaining
..................................
Rebooting BMC...
OEMDEF.CFG:BMC firmware flashed successfully

Bios update

~]# ./ibm_fw_bios_gge149a-1.19_linux_i386.sh -s
IBM Flash Update Utility v1.167
Licensed Materials - Property of IBM
(C) Copyright IBM Corp. 2008  All Rights Reserved.

Flash chipset:   Macronix 29LV320B
0064000.FLS: 280000 [80000]
Erasing block 2f: 280000 - 28ffff
Erasing block 30: 290000 - 29ffff
Erasing block 31: 2a0000 - 2affff
Erasing block 32: 2b0000 - 2bffff
Erasing block 33: 2c0000 - 2cffff
Erasing block 34: 2d0000 - 2dffff
Erasing block 35: 2e0000 - 2effff
Erasing block 36: 2f0000 - 2fffff
Programming block 2f: 280000 - 28ffff
Programming block 30: 290000 - 29ffff
Programming block 31: 2a0000 - 2affff
Programming block 32: 2b0000 - 2bffff
Programming block 33: 2c0000 - 2cffff
Programming block 34: 2d0000 - 2dffff
Programming block 35: 2e0000 - 2effff
Programming block 36: 2f0000 - 2fffff
PXEROM.BIN: 260000 [14000]
Erasing block 2d: 260000 - 26ffff
Erasing block 2e: 270000 - 27ffff
Programming block 2d: 260000 - 26ffff
Programming block 2e: 270000 - 27ffff
CMOSDEF.BIN: 220000 [4000]
Erasing block 29: 220000 - 22ffff
Programming block 29: 220000 - 22ffff
Primary BIOS flashed successfully

Tuesday, June 10, 2014

apartment up time

[root@freeze ~]# cat /proc/cpuinfo
Processor       : Feroceon 88FR131 rev 1 (v5l)
BogoMIPS        : 1191.11
Features        : swp half thumb fastmult edsp
CPU implementer : 0x56
CPU architecture: 5TE
CPU variant     : 0x2
CPU part        : 0x131
CPU revision    : 1

Hardware        : Seagate FreeAgent DockStar
Revision        : 0000
Serial          : 0000000000000000
[root@freeze ~]# uptime
 20:27:20 up 533 days,  5:03,  1 user,  load average: 1.08, 1.10, 1.16

[root@freeze ~]# uname -a
Linux freeze 3.4.2-3.fc17.armv5tel.kirkwood #1 Tue Jun 12 11:34:37 EDT 2012 armv5tel armv5tel armv5tel GNU/Linux

Sunday, February 23, 2014

imgODROID-U2 imgs

Just a listing of odroidu2 imgs

Android

From http://forum.odroid.com
http://forum.odroid.com/viewtopic.php?f=7&t=1322
http://oph.mdrjr.net/robroyhall/images/android/u2/

Couch potato img

Exynos-4412 BSP Android 4.0.4 Alpha-4.0 from http://com.odroid.com
http://com.odroid.com/sigong/nf_file_board/nfile_board_view.php?keyword=&tag=ODROID-U2&bid=144



Fedora

http://www.odroid.in/fedora-18/

Automation with odroidu2 and belkin WeMo



So I have been having trouble going to be because I have been staying up to late watching Netflix or watching stuff on xbmc. What I ended up doing was setting up a rule on my belkin WeMo switch to kill the power at 1




am.

Home theater setup

List of things in my setup



Living room
PANAMAX M4300-EX Home Theater Power Conditioner
LG Electronics NB3530A Sound Bar System
Xbox 360 4g with 1 32gb flash drive
Comcast DVR  DCX3400-M
WD live plus
FirmwareFW Base: 1.05.04Device: WDLXTV_PLUSLatest version: 0.5.1.1Current version: 0.5.1.1

Android remote  https://play.google.com/store/apps/details?id=com.osdmod.remote&hl=en
LG - 47" Class (44-9/10" Diag.) - LED - 1080p - 120Hz - HDTV Model: 47LS4500


Bed room



VIZIO 32" Class LED-LCD 720p 60Hz HDTV

Chromecast
Odroidu2 with android and xbmc
Android remote https://play.google.com/store/apps/details?id=org.leetzone.android.yatsewidgetfree&hl=en
 Comcast Digital Transport Adapter DCI105COM1

Wednesday, February 12, 2014

Random system info gathering with kickstarts

I started writing up little commands to get system info for when new hardware that comes in.


]# for i in $(cat /proc/net/dev | grep ':' | cut -d ':' -f 1); do echo "Interface : $i" "  $(ethtool $i | grep Link)"; done
Interface : lo          Link detected: yes
Interface : em1         Link detected: yes
Interface : em2         Link detected: no
Interface : em3         Link detected: no
Interface : em4         Link detected: no
Interface : p3p1        Link detected: no
Interface : p3p2        Link detected: no
Interface : p3p3        Link detected: no
Interface : p3p4        Link detected: no


01 ~]# for i in $(cat /proc/net/dev | grep ':' | cut -d ':' -f 1); do echo -e NIC  : $i $(cat /sys/class/net/"$i"/address); done 
NIC : lo 00:00:00:00:00:00
NIC : em1 00:00:00:00:00:00
NIC : em2 00:00:00:00:00:00
NIC : em3 00:00:00:00:00:00
NIC : em4 00:00:00:00:00:00
NIC : p3p1 00:00:00:00:00:00
NIC : p3p2 00:00:00:00:00:00
NIC : p3p3 00:00:00:00:00:00
NIC : p3p4 00:00:00:00:00:00


 ~]# service ipmi start
Starting ipmi drivers:                                     [  OK  ]
1 ~]# mac=$(ipmitool lan print | grep 'MAC Address' | cut -f 16 -d' ') && echo -e NIC : mgmt $mac
NIC : mgmt 00:00:00:00:00:00


01 ~]# dmidecode -t 1
# dmidecode 2.11
SMBIOS 2.7 present.

Handle 0x0100, DMI type 1, 27 bytes
System Information
        Manufacturer: Dell Inc.
        Product Name: PowerEdge pony
        Version: Not Specified
        Serial Number: xxxxxxxxxxxxx
        UUID: xxxxxxxxx-xxxxx-xxxx-xxxx-xxxxxxxxxxxx
        Wake-up Type: Power Switch
        SKU Number: Not Specified
        Family: Not Specified


What I ended up doing was putting this in the end my post section at the bottom of my kickstarts so I can capture all this info.

%post --interpreter=/bin/bash
(
# Turn on bash debugging for more meaningful output in logfile
set -x

service ipmi start
for i in $(cat /proc/net/dev | grep ':' | cut -d ':' -f 1); do echo "Interface : $i" "  $(ethtool $i | grep Link)"; done >> /root/host-info.log
for i in $(cat /proc/net/dev | grep ':' | cut -d ':' -f 1); do echo -e NIC  : $i $(cat /sys/class/net/"$i"/address); done  >> /root/host-info.log
mac=$(ipmitool lan print | grep 'MAC Address' | cut -f 16 -d' ') && echo -e NIC : mgmt $mac >> /root/host-info.log
dmidecode -t 1 >> /root/host-info.log

) &> /root/ks_output.log
%end

Saturday, October 26, 2013

HP 10.10 DVD Network boot




Here is my entry for my pxe menu

LABEL HP_FWDVD_10.10
MENU LABEL 6)  Automatic Firmware Update Version 10.10
KERNEL /hpcd/10v/vmlinuz
APPEND initrd=/hpcd/10v/hpfw-1010-initrd.img media=net rw root=/dev/ram0 d3bug ramdisk_size=782392 init=/bin/init loglevel=3 ide=nodma ide=noraid nopat pnpbios=off vga=791 splash=silent hp_fibre showopts noexec32=off numa=off nox2apic TYPE=AUTOMATIC iso1=nfs://IP/exports/hp/FW1010.iso iso1mnt=/mnt/bootdevice pci=bfsort


To fix the initrd

mkdir /tmp/initrd.fix
cd /tmp/initrd.fix
gunzip -c /data/kickstart/images/hpfw-1010/system/initrd.img | cpio -i
sed -i 's/NET_MODULES=.*$/NET_MODULES="e100 e1000 igb qlcnic tg3 bnx2 bnx2x"/' etc/initrd.functions
sed -i 's/dhcpcd -t 45/dhcpcd -L -t 30/' sbin/netconfig.sh
find . | cpio  --create --'format=newc'  | gzip > /data/kickstart/tftpboot/hpfw-1010-initrd.img


info from here 
 http://h30499.www3.hp.com/t5/ITRC-ProLiant-Deployment/PXE-Boot-Image-from-an-ISO/m-p/5681899#M9269




Here is a copy of the hpfw-1010-initrd.img patched

https://dl.dropboxusercontent.com/u/21180906/HP/10.10/hpfw-1010-initrd.img

Tuesday, October 8, 2013

Random single user mode stuff

How to boot s390x in single user mode


Connected to server x.x.x.x

zPXE MENU
---------
** Error connecting to server: no profiles found **
1. Exit to CMS shell [IPL CMS]

Enter Choice -->
or press to boot from disk [DASD 2xxx]

Booting from DASD 2xxx...
00: zIPL v1.8.2-36.el6 interactive boot menu
00:
00:  0. default (2.6.32-131.39.1.el6.s390x)
00:
00:  1. 2.6.32-131.39.1.el6.s390x.debug
00:  2. 2.6.32-131.39.1.el6.s390x
00:  3. 2.6.32-131.0.15.el6.s390x.debug
00:  4. linux-2.6.32-131.0.15.el6.s390x
00:
00: Note: VM users please use '#cp vi vmsg '
00:


#cp vi vmsg  1 single       // should do the trick



How to boot ppc64 in single user mode

When grub is used this part is pretty simple.
But when yaboot is used its a little different


Config file read, 1024 bytes

Welcome
Welcome to yaboot version 1.3.13 (Red Hat 1.3.13-14.el5)
Enter "help" to get some basic usage information
boot:


linux single  // should do the trick
                     // came across another time where selinux blew up . used enforcing=0



How to boot arm in single user mode

coming soon


Tuesday, September 3, 2013

Network boot HPS update cd

Here is what my working pxe entry looks like



LABEL HP_FWDVD_9.30
MENU LABEL 5)  Manual Firmware Update Version 9.30
KERNEL /hpcd/vmlinuz
APPEND initrd=/hpcd/initrd.img media=cdrom rw root=/dev/ram0 ramdisk_size=815744 init=/bin/init loglevel=3 ide=nodma ide=noraid nopat pnpbios=off vga=791 splash=silent hp_fibre showopts noexec32=off numa=off nox2apic TYPE=MANUAL iso1=nfs://yourhost/exports/hp/FW930.iso iso1mnt=/mnt/bootdevice

Friday, July 26, 2013

Network speed tests in house -- (edited)

Server Seagate dockstar 1GB port hosting 1GB file via http

Download command
 wget --output-document=/dev/null http://host/disk.img

Clients

T510 fedora Wired


 HTTP request sent, awaiting response... 200 OK
Length: 1073741824 (1.0G) [application/octet-stream]
Saving to: ‘/dev/null’

20% [===>  224,403,456 50.7MB/s  eta 16s


 T510 fedora wireless with airlink wireless N

 HTTP request sent, awaiting response... 200 OK
Length: 1073741824 (1.0G) [application/octet-stream]
Saving to: ‘/dev/null’

 0% [             ] 4,665,175    869KB/s  eta 19m 42

OLPC using usb 10/100 linksys


HTTP request sent, awaiting response... 200 OK
Length: 1073741824 (1.0G) [application/octet-stream]
Saving to: ‘/dev/null’

 0% [          ] 3,056,447    809KB/s  eta 22m 38s

Odroidu2 Wired (10/100 NIC)


HTTP request sent, awaiting response... 200 OK
Length: 1073741824 (1.0G) [application/octet-stream]
Saving to: ‘/dev/null’

 5% [=======>    ] 63,779,235  11.2MB/s  eta 86s

Rpie Wired (10/100 NIC)

HTTP request sent, awaiting response... 200 OK
Length: 1073741824 (1.0G) [application/octet-stream]
Saving to: `/dev/null'

 2% [==>   ] 29,108,451  6.22M/s  eta 2m 31s


Readynas Wired (GB NIC)

HTTP request sent, awaiting response... 200 OK
Length: 1073741824 (1.0G) [application/octet-stream]
Saving to: `/dev/null'

 0% [>     ] 8,814,592   1.79M/s  eta 9m 33s 


Netgear Stora Wired (GB NIC)

HTTP request sent, awaiting response... 200 OK
Length: 1073741824 (1.0G) [application/octet-stream]
Saving to: `/dev/null'

17% [===========>     ] 192,380,928 39.7M/s  eta 22s


wdlive wifi airlink wireless N ( went from 200k to 800K)
HTTP request sent, awaiting response... 200 OK
Length: 1073741824 (1.0G) [application/octet-stream]
Saving to: `/dev/null'

 1% [>         ] 13,298,607   569K/s  eta 32m 31s

wdlive hard wire (cat 6 cable)
HTTP request sent, awaiting response... 200 OK
Length: 1073741824 (1.0G) [application/octet-stream]
Saving to: `/dev/null'

 1% [                                       ] 11,470,775  1.08M/s  eta 15m 31s



What did all this tell me. That  my wifi card on airlink wireless N sucks, and that I need to tweak my wifi settings a lot. Another note the wdlive box has terrible network performance



Wednesday, June 12, 2013

Showing All nics with link using bash



 # for i in $(cat /proc/net/dev | grep ':' | cut -d ':' -f 1); do echo "Interface : $i" "  $(ethtool $i | grep Link)"; done
Interface : lo          Link detected: yes
Interface : virbr0-nic          Link detected: no
Interface : virbr0      Link detected: no
Interface : em1         Link detected: no
Interface : wlan0       Link detected: yes

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