Secret Waffle Labs

You were never here… You didn't see anything….

June 17th, 2011

nvidia-settings Syntax Change

No Comments, Code, Hardware, Linux, by andarius.

A while back I wrote a script to use nvidia-settings to get the core and ambient temperatures from the three GTX465 video cards in my system. All the way up until today it has worked great and is currently tied in with conky to show the temps. Today when I upgraded my nvidia module and the corresponding package the script broke.

After much poking around I found the syntax had changed slightly. Using the old syntax to get the temperature from say thermalsensors:0 I would have used:

nvidia-settings -t -q kaon:0[thermalsensor:0]/ThermalSensorReading

With the new nvidia-settings the syntax is:

nvidia-settings -t -q [thermalsensor:0]/ThermalSensorReading

It seems it now chokes on the inclusion of the display (kaon:0 in this case) yet the documentation and man page still refer to its usage. To wrap things up since I was making changes I decided to directly address the gpus instead of the thermal sensors. This should keep my data more in line and reliable to what I think it correlates to. Here is the finished product:

# Get and return GPU and ambient temp readings from the 3 Nvidia cards
arrayTEMP=( $(nvidia-settings -t \
	-q [gpu:0]/GPUCoreTemp \
	-q [gpu:0]/GPUAmbientTemp \
	-q [gpu:1]/GPUCoreTemp \
	-q [gpu:1]/GPUAmbientTemp \
	-q [gpu:2]/GPUCoreTemp \
	-q [gpu:2]/GPUAmbientTemp \
	2> /dev/null) )

	echo -e "GeForce GTX465 0"
	echo -e "      Core  ------------ ${arrayTEMP[0]}"
	echo -e "      Ambient ---------- ${arrayTEMP[1]}"
	echo -e "GeForce GTX465 1"
	echo -e "      Core  ------------ ${arrayTEMP[2]}"
	echo -e "      Ambient ---------- ${arrayTEMP[3]}"
	echo -e "GeForce GTX465 2"
	echo -e "      Core  ------------ ${arrayTEMP[4]}"
	echo -e "      Ambient ---------- ${arrayTEMP[5]}"

June 16th, 2011

Xorg –nolisten tcp & slim

No Comments, Linux, Security, by andarius.

It is a long standing practice on a Linux desktop system that runs X to disable the TCP listening port which defaults to 6000. This port is by default enabled and a potential security risk, a nasty one since most people never access their X server via network.

On my desktop I run slim as my login manager so all the how-tos and stuff I read simply did not do the trick. I had to resort to some hard core reading. In the end it was more simple than I though. Most methods use the display manager, such as xdm, gdm or kdm to pass the “-nolisten tcp” option to the server which disables it. Since I use none of these I resorted to reading the docs on slim. Turns out slim also supports this via its config file.

The slim config file has a line which is commented out by default for “xserver_arguments”. I un-commented this line and made it read:

xserver_arguments -nolisten tcp

A restart of the X server and port 6000 was closed.

May 19th, 2011

Thunar and thumbnails

No Comments, Linux, by andarius.

I being an XFCE user upgraded to 4.8 shortly after release. Somewhere in there Thunar stopped giving me thumbnails for images and a few other things that it used to have built in thumbnailers for. This of course is a bit annoying specially when you are looking for new wallpapers. Yes, I know, my motivations are whacky…

A bit of research and I found that Thunar now depends on tumbler for its thumbnail generation. tumbler is pretty straight forward and simple to install. I wrote a dirty little basic Pkgfile for it which I need to clean up later, but it works for now.

May 15th, 2011

claws-mail & startup-notification = segfault

No Comments, Linux, by andarius.

I got home tonight and as usual after loggin in I tried to check my mail. To my dismay my email client crashed. I have been a long time user of claws-mail and have yet to have any real problems so this was of course a bit of an attention getter.

I tried updating from 3.7.8 to 3.7.9 which is the latest release with no luck. So I turned to the oracle seeking answers. I came across two pages with mention of startup-notification being related to the mess, one said to enable and another was just a bug report. Explicitly enabling it was of no help, where disabling cleared things right up. So, for now I have added “–disable-startup-notification” to my Pkgfile for claws-mail. A simple fix till the real problem is resolved I think.

May 5th, 2011

The sound of failure

1 Comment, Hardware, by andarius.

So, what does failure sound like? I am not sure but I think I know what impending failure looks like, like this:

end_request: I/O error, dev sda, sector 844726271
sd 0:0:0:0: [sda] Unhandled error code
sd 0:0:0:0: [sda]  Result: hostbyte=0x04 driverbyte=0x00
sd 0:0:0:0: [sda] CDB: cdb[0]=0x28: 28 00 32 58 e9 1f 00 00 38 00

This is what I found in the dmesg output on my server tonight after a large copy failed. When the copy failed I started poking around and the entire /home partition went read-only on me and then right after went off line completely. Talk about getting worried… I checked the logs of course and saw the above nastiness.

On reboot the drive came back up just fine. The problem is of course the failure is a sign of bad things to come. I shut down the server to preserve any life the drive may have left until I can secure a replacement. I simply have no place to store 824 GB of data right now and don’t want to run the chance of burning up what little life it has left till I do.

Of course since I have to shut the thing down what better time to work out an upgrade. Nothing like a little scare to remind one that RAID is a good idea. I am pricing the parts for a pair of 2 TB HDs for /home, two 640 GB HDs for / and such and a replacement 1.5 TB HD to replace the failing unit. That would put all the drives into pairs for RAID1 in all cases. At the same time I can go ahead and install the hot swap cages.

Now to cross my fingers and hope the drive can survive an 824 GB data transfer before it dies…

May 4th, 2011

New Firewall Hardware

No Comments, Hardware, by andarius.

My firewall has been upgraded yet again. I managed to get all the pieces through various events such as birthdays and Christmas to build a proper machine for firewall duties. The main thing lacking before on the Intel D945GCLF2 based system was the ability to easily have more than two NICs without going broke. As multi-port cards are rather high dollar.

Enter the Jetway NF96FL-510-FL Motherboard. This little thing is configured to take an add-on daughter board. They have several NIC boards, two which are three port gigabit models, one powered by Realtek and the other by Intel. The full assembled hardware compliment is:




May 3rd, 2011

The DustWall

No Comments, Hardware, by andarius.

Perhaps I should say firewall, as that is what it was supposed to be. My mom recently asked me to check her firewall which had stopped working. It had been making a grinding noise for a while then just up and died.

The firewall is a PC based firewall running Endian Community Edition. When I got to it the machine would not boot at all. I tore it apart to find this:

OMG Dust!

OMG Dust!


March 22nd, 2011

WordPress and PHP Configuration

No Comments, Code, by andarius.

You may or may not know that this site is powered by wordpress. It is a very powerful and flexible CMS that makes the management and upkeep of a site like this very easy.

This particular install is relatively new being only a few months old. The content that dates back farther than that came from one of my older sites that is doomed to the .com graveyard very soon. While this install of wordpress is new and up to date I was having some problems with the CMS behavior in general. Automatic updates would not work, fields would not load, random things simply would not work. This was driving me crazy, at least until tonight it was.

I started poking around and testing for the break point. It hit me like a slap in the face when I finaly got the configuration page for SI Caption to load and it warned me about my web host not having upgraded to PHP 5 from PHP 4. I knew this was not the case as they offer support for both via a line in the .htaccess. Upon checking low and behold the line to enable PHP 5 was not in the .htaccess file for this sites root. Shame on me for missing that.

I thought it worthy to share this information as I found several threads on the net about similar behavior and none of the solutions provided worked for me. Some may wonder why not post this to those threads as well, to which I reply I would love to but lack the motivation required to go find them again.

In the end the moral is make sure you are using what you should be using. WordPress seems to be happiest on PHP 5 and some features & plugins flat out require it. I wager this is in a readme or how-to somewhere but I missed it.

For those of you using 1&1 for their hosting needs, you must have the following in your .htaccess to make things go boom:

AddType x-mapp-php5 .php
AddHandler x-mapp-php5 .php

March 22nd, 2011

No Comments, Code, by andarius.

I am now motivated to share a very simple script. This is what I use when I want to listen to my (current) favorite shoutcast station, I call it


# This is a simple script to start playing Chronix Radio
# (or something else) from the cli using mplayer.

function play() {
mplayer -ao alsa -msgcolor -msglevel global=0:network=0:afilter=0:decaudio=0:netst=2:statusline=6:identify=2:ds=2:stream=2:cplayer=3 $(curl -s $url | grep http | cut -d = -f 2)

case "$1" in
		# This is a catch all for screwups
		echo "You forgot to specifiy a channel man..."

Simply run “ $station” to fire things up. For example to play the Grit station:
./ grit

Pages: Prev 1 2 3 4 5 6 7 8 9 10 ... 15 16 17 Next