package playne

imports "programmer"

Tag: sysadmin

  • PHP: for vs foreach

    So this week I was asked the question on which was quicker in PHP – A for loop or a foreach loop. It turns out that my assertion that they were both about the same performance was about right. Here are my test results jason@server:~/php$ php speedtest.php Starting test: Test for loop data length=4000000 Mem:…

  • rm: Too Many Files

    Ever come across a folder you need to delete but there are too many files in it? Basically the shell expansion of * attempts to put everything on the commandline – so: jason@server:~/images/# rm * turns into jason@server:~/images/# rm image1.jpg image2.jpg image3.jpg image4.jpg… and there is a limit (albeit rather large) on the length of…

  • Why is my Quad Core VPS Running Slowly?

    Or how a host schedules CPU cycles.

  • The case for turning it off and on again

    So the other day we started having issues with our mail server. The symptom was the mail queue showing hundreds of emails with a message like “SMTP Server rejected at greeting”. Amavis (the mail scanner / coordinator) was rejecting mail and ClamAV was not working properly. We found that simply restarting the Amavis daemon and…

  • Using varnish as a HTTP Router

    A Layer 7 Routing Option

  • Why does windows 8 not accept my password?

    When long passwords attack! the case of the cut off passwords during setup and the any password length box at login

  • when rescan-scsi-bus.sh fails to notice disk size increases

    So usually when I am doing online capacity expansions of vmware/raid devices I use a tool called “rescan-scsi-bus.sh” and it works. It detects the size increase on the disk and then I run a resize2fs /dev/sdb or something like that. Well, I have come across a time when this tool does not work and I…

  • MD Raid 5 with 2 dropped disks

    How to reassemble a degraded array after a power failure.

  • Samba veto and .DS_Store OS X files

    So i have a samba file share that is accessed by several macs here at work. and since I do not like their .DS_Store files, I have added a couple of lines to the smb.conf to make my live easier! In the [global] section, add these lines: veto files = /.DS_Store/._.DS_Store/ delete veto files =…

  • western power is fun!

    *yay* power outage… good enough time to try doing this portable hotspot thing through the android phone. Let’s just say that the vodafone Edge network is laaaaaaaggyy Reply from 110.173.227.121: bytes=32 time=936ms TTL=47 Reply from 110.173.227.121: bytes=32 time=1664ms TTL=47 Reply from 110.173.227.121: bytes=32 time=3786ms TTL=47 Reply from 110.173.227.121: bytes=32 time=9418ms TTL=47 Reply from 110.173.227.121: bytes=32…