A real solution to PowerShell SSH Remoting
March 30, 2008 at 11:05 PM | categories: windows, security, microsoft, system administration | View CommentsCan't wait for us to ship PowerShell Remoting? Want remoting to use SSH? Why wait for us? /N software has just announced a beta of their NetCmdlets V2.0 which provides PowerShell remoting over SSH today! They've had this for a while and V2 updates (and improves) the usability of the cmdlets as well as adding a bunch of new and exciting commands. For example, chances are that you won't ever see Microsoft ship the [get/send]-s3 cmdlets but /N software V2 does. :-)http://blogs.msdn.com/powershell/archive/2008/03/27/powershell-remoting-using-ssh.aspx My blog post from 2006 is currently the #1 Google Result for PowerShell SSH, but finally there is a good solution out there from /N software. It also supports S3. Very cool :)
By the powers of two I command you to dial
November 13, 2007 at 09:31 AM | categories: random, humor, system administration | View CommentsHere in Alabama, USA we've just acquired the new area code "256" which means that some lucky (and probably unappreciative) bastard will get +1-256-512-1024 Which has simply got to be the coolest damn phone number I can imagine. -- David McNett Can i dial 1-255-255-255255 and make every phone in the world ring? -- Tanuki
Bash one liner to randomize lines in file
October 18, 2007 at 11:57 AM | categories: unix, system administration, linux | View Comments Discovered that the bash shell has a variable called $RANDOM, which outputs a pseudo-random number every time you call it. Sweet! Allowed me to randomize the lines in a file for a process I needed to do, thusly:for i in `cat unusual.txt`; do echo "$RANDOM $i"; done | sort | sed -r 's/^[0-9]+ //' > randorder.txtIn other words, put a random number on every line, sort the file, then take off the random numbers. Worked like a charm.
Hivearchive Downtime
October 05, 2007 at 05:45 PM | categories: system administration, linux | View Comments Had a bit of hardware trouble, with a hard drive failing today. However, due to my sysadmin ninja skills, no data was lost and the RAID 1 is rebuilding.[root@nexus ~]# cat /proc/mdstat Personalities : [raid1] md1 : active raid1 hdc1[2] hda1[0] 79360960 blocks [2/1] [U_] [>....................] recovery = 2.2% (1809408/79360960) finish=25.9min speed=49725K/sec md0 : active raid1 hdc2[1] hda2[0] 1052160 blocks [2/2] [UU] unused devices:If you need to do this:
# dd if=/dev/hda of=/dev/hdc bs=512 count=1 # mdadm --manage /dev/md0 --add /dev/hdc2 # mdadm --manage /dev/md1 --add /dev/hdc1In other words, copy the master boot record from the good drive to the new drive so you have the same partitions, then hot add the new partitions to your array. WARNING DANGER DANGER WARNING. Backup all your data first, and test your backups work. Change the partitions and drives to match your own situation. Failure to do so will cause you to hose your system... That is all. Now if only Linux could do all this automatically like other sane operating systems. Update: I'm getting a little suspicious that just copying the MBR from one hard drive to another, messed up something with Linux's software RAID. Sigh. This is exactly how I would do it in Solaris, but Linux has no great documentation on how to do it easily. Lazyweb? Update, 2 Aug 2008: I did this again and this time realized that copying the MBR will work fine with DD, but Linux needs to be explicitly told to rescan the partition table. I simply opened up the device with fdisk, checked the partitions looked how I wanted and then rewrote the partition table. Fdisk then calls the IOCTL to tell the kernel to rescan the partitions. Problem solved. :)
Upgraded to WordPress 2.3
September 25, 2007 at 10:13 PM | categories: wordpress, system administration | View Comments Surprisingly, the upgrade went pretty smoothly. While dinking around in the admin section, I noticed: Akismet has protected your site from 15,874 spam comments. Man, I hate spammers. The more popular my domains get, the more they get targeted. One of my other sites was used as a forged from address in a bunch of e-mails and I got all the bounces. Thanks for checking SPF everyone. :( Update: Ugh! Damn it.WordPress database error: [Table 'wp_post2cat' doesn't exist] SELECT cat_ID AS ID, MAX(post_modified) AS last_mod FROM `wp_posts` p LEFT JOIN `wp_post2cat` pc ON p.ID = pc.post_id LEFT JOIN `wp_categories` c ON pc.category_id = c.cat_ID WHERE post_status = 'publish' GROUP BY cat_ID WordPress database error: [Table 'wp_post2cat' doesn't exist] SELECT cat_ID AS ID, MAX(post_modified) AS last_mod FROM `wp_posts` p LEFT JOIN `wp_post2cat` pc ON p.ID = pc.post_id LEFT JOIN `wp_categories` c ON pc.category_id = c.cat_ID WHERE post_status = 'publish' GROUP BY cat_IDYes, I ran the update which supposedly updated my DB. Lovely. Update 2: Apparently I need to update my Google Sitemaps plugin as found in this thread: http://wordpress.org/support/topic/135564
VMWare VProbes (dtrace for all)
September 17, 2007 at 07:07 PM | categories: software, virtualization, system administration, troubleshooting | View Comments Keith Adams has an intriguing post about VMWare vprobes:VProbes attempts to provide a set of tools for answering the question, "What the heck is this computer doing?" It's an open-ended question, so vprobes is accordingly open-ended, as well. In its current form, it provides an interactive, safe way of instrumenting a running VM at any level: from user-level processes down to the kernel, and even into VMware's VMM and hypervisor, if need be.First, we are aiming to provide a Dtrace-like tool for other commercially important operating systems than Solaris. Second, VProbes can combine with other virtualization-based techniques in powerful ways. For example, VProbes and deterministic replay combine to make the most potent tool that I'm aware of for debugging intermittent performance anomalies.
NVidia Forcedeth Ethernet Full-Duplex
May 25, 2007 at 04:24 PM | categories: red hat, troubleshooting, system administration, linux | View Comments Just an FYI, the NVidia Gigabit Forcedeth Ethernet driver in Linux uses the ethtool command to get and set the duplex rate and not the mii-tool like many other web pages erroneously state.Next Page ยป