Sep 24

Unzipping all Zip files in a directory

I don’t know why zip can’t handle multiple inputs, but it cant’. Gzip does just fine unzipping everything in a directory, I use this little “script” all the time on the command line to unzip all the files in a directory.

for file in $(ls *.zip) 
do 
  echo $file 
  unzip -o $file 
done

Its a small simple script, but it’s useful.

 

Jul 09

New Blades

I just got two additional block erupted blades today, they have been over clocked from 10GH/s to 13GH/s. By todays mining standards this isn’t much hashing power, but I got them very cheap. I had the backplane for these things, but have been having a hard time getting it to not overload the power supply I was using. I started to look online at what type of power supply you could put directly into the backplane, and it was a HP DL380. Ironicaly I just bought a HP DL380 G5 to be my new web server. In fact in a month or so, this website will be hosted on that server.

Since these are redundant power supplies, I just pulled one from the running server, and slapped it into the backplane, and I just upped my hashing power by ~26GH/s

Jul 03

Automating with Telnet

I have a stupid problem, I have a Bitcoin ASIC called a Hex miner. For some reason every 12 hours the thing slows down from 24GH/sec to 5GH/sec. The only way I have found to solve the problem is to power cycle the controller and the unit itself. This would be a pain since I have it in my basement. However I salvaged some old Bay Technologies PDUs in my rack, which means I can power outlets on and off through a telnet session.

I did a little searching and learned how to do some scripting with the unix program “expect”

This is a very specific script, but it did what I need it to do:

#!/usr/bin/expect
spawn telnet xxx.xxx.xxx.xxx 23
expect "Enter Selection>"
send 1\r
expect "RPC-3>"
send "off 1\r"
expect "Turn OFF HEX-WRT? (Y/N)>"
send Y\r
expect "RPC-3>"
send "off 2\r"
expect "Turn OFF HEX-PWR? (Y/N)>"
send "Y\r"
expect "RPC-3>"
send "on 2\r"
expect "Turn ON HEX-PWR? (Y/N)>"
send "Y\r"
expect "RPC-3>"
send "on 1\r"
expect "Turn ON HEX-WRT? (Y/N)>"
send "Y\r"
expect "RPC-3>"
send "menu\r"
expect "Enter Selection>"
send "6\r"

It blazes through resetting the outlets.

        RPC-3 Telnet Host
    Revision F 4.20a, (C) 1999
    Bay Technical Associates
    Unit ID: RPC3-2
  Option(s) installed:
  True RMS Current
  Internal Temperature


  RPC-3 Menu:

    1)...Outlet Control
    2)...Manage Users
    3)...Configuration
    4)...Unit Status
    5)...Reset Unit
    6)...Logout

  Enter Selection>1
  True RMS current:  2.0 Amps
  Maximum Detected:  2.3 Amps

  Internal Temperature: 36.0 C

  Circuit Breaker: On 

  Selection   Outlet    Outlet   Power
    Number     Name     Number   Status
      1       HEX-WRT     1       On 
      2       HEX-PWR     2       On 
      3       Outlet 3    3       On 
      4       Outlet 4    4       On 
      5       Outlet 5    5       On 
      6       Outlet 6    6       On 
      7       Outlet 7    7       On 
      8       Outlet 8    8       On 

  Type "Help" for a list of commands

  RPC-3>off 1

  Turn OFF HEX-WRT? (Y/N)>Y
  True RMS current:  2.1 Amps
  Maximum Detected:  2.3 Amps

  Internal Temperature: 36.0 C

  Circuit Breaker: On 

  Selection   Outlet    Outlet   Power
    Number     Name     Number   Status
      1       HEX-WRT     1       Off
      2       HEX-PWR     2       On 
      3       Outlet 3    3       On 
      4       Outlet 4    4       On 
      5       Outlet 5    5       On 
      6       Outlet 6    6       On 
      7       Outlet 7    7       On 
      8       Outlet 8    8       On 

  Type "Help" for a list of commands

  RPC-3>off 2

  Turn OFF HEX-PWR? (Y/N)>Y
  True RMS current:  0.6 Amps
  Maximum Detected:  2.3 Amps

  Internal Temperature: 36.0 C

  Circuit Breaker: On 

  Selection   Outlet    Outlet   Power
    Number     Name     Number   Status
      1       HEX-WRT     1       Off
      2       HEX-PWR     2       Off
      3       Outlet 3    3       On 
      4       Outlet 4    4       On 
      5       Outlet 5    5       On 
      6       Outlet 6    6       On 
      7       Outlet 7    7       On 
      8       Outlet 8    8       On 

  Type "Help" for a list of commands

  RPC-3>on 2

  Turn ON HEX-PWR? (Y/N)>Y
  True RMS current:  0.7 Amps
  Maximum Detected:  2.3 Amps

  Internal Temperature: 36.0 C

  Circuit Breaker: On 

  Selection   Outlet    Outlet   Power
    Number     Name     Number   Status
      1       HEX-WRT     1       Off
      2       HEX-PWR     2       On 
      3       Outlet 3    3       On 
      4       Outlet 4    4       On 
      5       Outlet 5    5       On 
      6       Outlet 6    6       On 
      7       Outlet 7    7       On 
      8       Outlet 8    8       On 

  Type "Help" for a list of commands

  RPC-3>on 1

  Turn ON HEX-WRT? (Y/N)>Y
  True RMS current:  0.7 Amps
  Maximum Detected:  2.3 Amps

  Internal Temperature: 36.0 C

  Circuit Breaker: On 

  Selection   Outlet    Outlet   Power
    Number     Name     Number   Status
      1       HEX-WRT     1       On 
      2       HEX-PWR     2       On 
      3       Outlet 3    3       On 
      4       Outlet 4    4       On 
      5       Outlet 5    5       On 
      6       Outlet 6    6       On 
      7       Outlet 7    7       On 
      8       Outlet 8    8       On 

  Type "Help" for a list of commands

  RPC-3>menu

  RPC-3 Menu:

    1)...Outlet Control
    2)...Manage Users
    3)...Configuration
    4)...Unit Status
    5)...Reset Unit
    6)...Logout
  Enter Selection>

[root@rackable1 scripts]# 

 

Jun 29

Simple Errors Take The Most Time To Find

If you haven’t noticed I like crypto currencies, I I was trying to get one of my computers to mine X11 coins on the CPU, just to play around with it, but could not get the client to install. I finally found this article:

https://github.com/ig0tik3d/darkcoin-cpuminer-1.2c/issues/3

I commented out two lines, and everything started working

 

[root@rackable1 darkcoin-cpuminer-1.2c]# ./minerd --algo=X11 --url=stratum+tcp://alts.give-me-coins.com:3340 --user=XXX
��������������������������������������������������ͻ
�  DarkCoin cpu-miner (v1.2c)                      �
�  author: ig0tik3d                                �
�  http://www.darkcoin.io                          �
��������������������������������������������������ͼ
Launching miner...

[2014-06-29 21:54:42] Binding thread 0 to cpu 0
[2014-06-29 21:54:42] Binding thread 2 to cpu 2
[2014-06-29 21:54:42] Binding thread 3 to cpu 3
[2014-06-29 21:54:42] Starting Stratum on stratum+tcp://alts.give-me-coins.com:3340
[2014-06-29 21:54:42] Binding thread 1 to cpu 1
[2014-06-29 21:54:42] 4 miner threads started, using 'X11' algorithm.
[2014-06-29 21:54:45] Stratum detected new block
[2014-06-29 21:54:45] thread 3: 87843 hashes, 40.49 khash/s
[2014-06-29 21:54:45] thread 1: 87834 hashes, 40.49 khash/s
[2014-06-29 21:54:45] thread 0: 87470 hashes, 40.31 khash/s
[2014-06-29 21:54:45] thread 2: 87917 hashes, 40.52 khash/s
[2014-06-29 21:54:58] thread 3: 551536 hashes, 40.47 khash/s
[2014-06-29 21:54:58] accepted: 1/1 (100.00%), 161.79 khash/s (yay!!!)

 

Mar 30

Complete Incompetence

My host managed to nuke EVERYTHING on my server. I have some backups but the majority of all my sites is lost. I will rebuild. They nuked me due to an accounting system error.

» Newer posts