Audio CentOS

Posted in Uncategorized on July 9th, 2009 by Ronald Prettyman

If you go about creating a new user in CentOS you will probably find that your audio does not work.

Now this is because the audio is by default not assigned to a group, as far I could tell. I searched but didn’t find any such group that audio was incorporated into.

Now CentOS 5.3 has incorporated udev to populate the /dev directory.
So create a group called audio

groupadd audio

then find the rule that applies to your audio system

cd /etc/udev/rules.d
grep alsa *

on my system the file to edit was 50-udev.rules
so

vi 50-udev.rules

at the end of the alsa rules add

GROUP="audio"

and at the end of the sound rules add

GROUP="audio"

Now just add yourself to the group

$ export PRIM=`id|awk ‘{print$2}’|sed ‘s/gid=//’|sed ‘s/[0-9]//g’|sed ‘s/(//’|sed ‘s/)//’`
$ export GROUPY=`groups|sed y/’ ‘/,/|sed s/$PRIM,//’
$ usermod -G $GROUPY,audio $USER
Tags:

Its a pitty

Posted in Uncategorized on July 8th, 2009 by Ronald Prettyman

The more I learn about Solaris the more Virtualization seems like a big shit pile. I’ve never been a fan of it, and never really saw it as a realistic way to lower TCO or maximize resources. If anything it raises TCO and lower resources consumption. I’ll explain why I believe Virtualization is bullshit and just a toy that is not needed in the real world AND how I pray it will be abandoned. Its done nothing but cause problems in my experience.

1 When the cluster goes down ALL the clients go down and everything they control

2 People who virtualize DNS should be shot. WTF if that cluster goes up in flames or has a conflict with your storage or an update or volurnability I mean virtualization even today isn’t the most stable thing. EVERYTHING your DNS controls can go down. Especially when you replicate within a cluster. I mean come on.

3 Virtualization is great for development if you hate your developer. You can turn any cheap workstation into a dev server with very little effort and no extra license and get better performance and won’t have to use up space in your datacenter.

4 You have to pay for virtualization?????

5 Resource manegement. WHY most o/s’s have this built in, not to mention Solaris, you have containers, just the whole nature of solaris allows you to have multiple servers on a single machine and have resources controlled. you can modify resource allocation on a time basis and don’t need to pay extra for the license to do it

6 Next time you get the call that X cluster has gone down, just think to yourself, if only you hadn’t been so worried about impressive technology and just focused on what works and what is the most productive. Fire the lazy bastard that recommended and hire someone who knows what their doing.

You might as well just keep telling yourself that its lowering TCO and making better use of resources but in all reality all the capabilities have always been their and their are much better way to deploy them. Their are very few instances were virtualization is a good idea and more then likely its not. The days of "hot" words needs to end. I think we’ve come far enough with technolgy that we need to look at what excist before we go about reinventing the wheel. Though reinventing the wheel seems to be the highest priority of the companies I’ve worked for.

Enough of my rant, in the end, if your writing my check. I’ll power wash the motherboards at 9000psi if you realy want me to, I’ll just let you know before hand that its going to break it. But in the end their not mine, and I’m just paid to do a job.

Tags: , ,

MOVING

Posted in Uncategorized on July 8th, 2009 by Ronald Prettyman

This server is totally jaked, I’m moving my hosting, so their be some interupts but their already are so I doubt anyone will know the differnce ;-) . Should have the data and sql moved tonight

Tags:

Diskless freebsd

Posted in Uncategorized on July 7th, 2009 by Ronald Prettyman

PXE install or Diskless systems
Whats needed
NFS tftp DHCP
Set your dhcp server to point to your NFS tfp server(this methods requires that you have nfs and ftp on the same server)
Share a directory with tftp
Create /pxeroot
share it with nfs

Get your freebsd cd, the livefs works good for this
Mount it, copy all the contents to /pxeroot
copy /boot/pxeboot to your tftp share
point your dhcp bootfile to your pxeboot
boot your client and boot pxe
your mileage may vary
But i had to create the /etc/resolv.conf on the server /pxeroot
And mount it rw
but once its up it provides a nice admin enviroment for my laptop, which has slowed due to an old harddrive, it also lowered the temps on it a bit
its not hot to the touch any more.
Though a more expensive easier approach would be to just switch to an SSD

any way if your install freebsd though here
the command is
sysinstall

Tags: , , , , ,

Graphics Card Appreciation

Posted in Uncategorized on July 6th, 2009 by Ronald Prettyman

Now I’d normally be the first to say to just turn down the resolution and get a better frame rate. But honestly when its my systems I like a really high resolution, as high as I can go, and have a hard time going down. Now to the normal user it just makes everything tiny. But in all reality its actually making everything huge, which in turn makes things appear small. When you’ve spent as much time, or as large a chunk of your life as me sitting in front of a computer monitor, you get a taste of for certain color and sharpness.(unrelated but firefox thinks color is spelled wrong, it also thinks firefox is spelled wrong??????).

With the new life I brought into some old hardware I am now realizing how much you need a graphics card on a modern pc, or at least a decent Chipset. With the board in question have a VIA chipset with a crap video chip. A  chrome 9, which makes me wonder if their was a chrome 1-8. Now I’ve had a dedicated graphics card as long as I can remember. Since the days when drive controllers weren’t built onto the mother board. Now this is the first time I’ve setup one of my systems with out a graphics card, beyound a bios post. Now its not to say I’ve not run systems with out them, but I have never seen one so slow with graphics.

 Now it runs fine if I turn down the resolution, or when accessing it remotely. I getting a better frame rate remotely then locally, if you can believe that. Just strange. I’ll probably end up picking up a cheap pci-expres card for it once my fiancial crap is taken care of. But its just interesting in the mean time to play with, and try different o/s’s to see how they handle.

WELL I FOUND SOMETHING INTESTING

In ubuntu based distro’s the driver installed is the OpenChrome drive, which well I don’t know about. I could read it up, but 99% sure what I’ll find. So in SuSe where I’m getting better performance its using the framebuffer vesa. Which is just a generic driver. And getting better performance then openchrome. Well I found some actually drivers from VIA so I’m about to compile them on Suse and take em for a test drive.

http://www.viaarena.com/default.aspx?PageID=420&OSID=25&CatID=2580&SubCatID=164

I’ll report my findings.

Now I remember why I hate compiling other people code, all the drivers were out of date, looking for non-existent X libraries. In the end I found a better fix. Opensuse uses the framebuffer for graphics. The frame buffer is defined by grub at system load. Changed it from 1900×1440 to 1600×1200 and now everything is fine, the screen loads fine, videos play and full screen works.

Note:I still get a better frame rate remotely. Its sad that the network has more pep then the local graphics. Eh.

Tags: , , , ,

Daath

Posted in Uncategorized on July 5th, 2009 by Ronald Prettyman

I recently picked up Daath’s latest album "The Concealers" I can’t say I liked  it at all. Just sounded to blan and mundane. A quick google search revealed they changed singers. Well their you go, when will they get it, the singer is the front man for a reason the singer gets the credit for a reason, when you change singers you change the band. I searched somemore and found that the same singer was on their first album too and that they had changed singers after the release of the second album "The Hinders." The Hinders is probably one of my most favorite albums of all time and so had to check out their first one "Futility."

Its much more experimental then "The Hinders" but has the same edge and incredimibal sound, makes me wonder if their original singer will start his own project. Hopefully so, I’d be really interested in hearing anything he puts out. Cause Listening to all three albums its a appearant he brought more then just his vocals to the table. And loosing him destroyed the band for me.

Tags:

MSI K9VGM-V Bios Restore

Posted in Uncategorized on July 5th, 2009 by Ronald Prettyman

So I blew the bios out of the water on this, I forgot the argument when restoring, probably back 2 3 months ago. I had already ordered some new components so I wasn’t that worried about it.

Well last night I got bored and started to wonder if I could fix it. I read some things about floppy booting and thought I’d try it will a USB drive. Now I had wiped the bios with nothing so when I threw some old parts together into a new machine and booted it up and heard the single beep post I thought I’d hook up the monitor. Well nothing, just a white screen. But the single beep was promising.

 So I created a dos usb drive and autoexec.bat the bios flash and connected it to the machine and rebooted it a couple times. Still nothing. So I checked for a cmos flash jumper thinking it wouldn’t hurt. Couldn’t find one, one jumper on the whole board and its labeled SYSTEM FAN PWD. So I removed the battery and turned it on again with the usb drive. Removed the power and battery and let it sit for a few minutes. Then powered it on and Award Bios running memory check, Bios check failed Press F1 to conintue or Del for setup.

Needless to say it worked. I’m not positive but I think removing the battery was what actually fixed it. I guess it has the factory bios in ROM and the bios flashes to FLASH so when I removed the battery it wiped the flash and restored the ROM. Only bad thing is I never realized how much work my nvidia cards do until I build a machine with out them. Wow its slow when it comes to graphics. I mean access speeds, boot speeds, calculation and cpu intensive activity is really peppy on its, with a AMD X2 4200 but I really notice the hit running with the built in Via Chrome 9.

Tags: , ,

Sun Oracle Future of Linux

Posted in Uncategorized on July 4th, 2009 by Ronald Prettyman

Anyone using Linux on the desktop is probably use to using sun products like their going out of style. Now they are getting bought out by oracle.(See http://www.sun.com/third-party/global/oracle/). Now I’m no legal expert. But I know I love Sun. And I’m said to see them bought out by oracle. Now this could be good, if they stuck to business as is. But I doubt they will. This is coming from the people behind Oracle OS. Redhat with oracle logo’s. I mean I never liked oracle and I’m fairly certain I have nothing from them on my system. Fairly sure, I don’t know what they’ve contributed to linux. I’ve never heard the discussion or read anything saying. "Written by Oracle released under GPL" or what ever. I don’t even think they have any opensource products. Now my biggest worry is the products from Sun that aren’t opensource. What will happen to them. I’m fairly certain the days of Solaris being free are over.

 I’m also thinking Glassfish, Netbeans, Sun Web Server are going to be dropped or have an end to the days of free and start the days of torrent hunting and serial cracking. Now I can see charging business’s. Business’s make money. I just hope they only change their policies on the commercial side. Sorta how when Nokia bought qt, they kept it opensource and charged for commerical use. I image their are other options out their to Sun products and I’ll just have to migrate to them if the need arises. Hopefully it won’t. Hopefully it will get better, and the products will continue to flow out. Just with a better sales team or marketing campaign. Sun products will be used in datacenters as long as admins, engineers and developers know how to use them.

 But then again, microsoft charges and their’s no shortage of users on that front, though that may be bacause of their massive desktop market and most people know how to use windows.

Tags: , , , , , ,

Add ssh to tty

Posted in Uncategorized on July 4th, 2009 by Ronald Prettyman
For this example I'll use tty2
The script to exectute this is here

/usr/local/bin/sshlogin

#!/usr/bin/perl
   use strict;
    use warnings;
    system("clear");

    sub check{
        my($hname,$uname) = @_;
        if ($hname =~ m/[';`%*|~"]/ or $uname =~ m/[';`%*|~"]/){
            return 0;
        }
        else {
                return 1;
            }
    }
    print "Username: ";
    my $username = <STDIN>;
    chomp $username;
    print "Host Name: ";
    my $hostname = <STDIN>;
    chomp $hostname;
    if (check($hostname, $username)){
        if($hostname and $username) {
            exec("/usr/bin/ssh $username\\@$hostname");
        }
    }
    else {
        print "Try again";
    }

save this script as /usr/local/bin/sshlogin. And give it executable permissions.
In ubuntu you edit  /etc/event.d/tty2 in other distribution it may be in your /etc/inittabs
Find the line with /sbin/getty and change it as follows for /etc/event.d/tty2

exec /sbin/getty -n -l /usr/local/bin/sshlogin 38400 tty2
and for /etc/inittab
2:2345:respawn:/sbin/getty -n -l /usr/local/bin/sshlogin 38400 tty2
note your verison of getty could be mingetty, mgetty or agetty and your want to look though the main file for the equivlent -n and -l for no login and use other login program. Or just verify that you have /sbin/getty or install it. The version used in this example was agetty called by /sbin/getty
Tags: ,

Sun Web Server 7

Posted in Uncategorized on July 3rd, 2009 by Ronald Prettyman

I just migrated my Apache 2 server to a Sun Web Server 7. Version 7 has a really nice control panel, with slightly more functionality then 6. Some interesting things, were their choose to disable htaccess files by default. Its an easy fix but none the less questionable. Response time is slightly faster when accessing large playlist. The time between tracks is much smothers and the playlist update quicker. I did some test though some remote proxies to get a better idea of response time outside my lan and it worked well. Total migration took about an hour with the learning curve of 7 on solaris sparc. And a hiccop with php. But it works great now, and with a little more tweaking I’ll be happy with it.

Here are the benchmarks of Sun-Java-System-Web-Sever vs Apache 2 on a

Sun Blade 1000 – 2x 900Mhz Sparc – 4 gigs of memory, Same exact file, and settings

Server Software:        Sun-Java-System-Web-Server/7.0
Server Hostname:        music.ronaldprettyman.com
Server Port:            80

Document Path:          /test.txt
Document Length:        15 bytes

Concurrency Level:      5
Time taken for tests:   3.647 seconds
Complete requests:      10000
Failed requests:        0
Write errors:           0
Total transferred:      2640000 bytes
HTML transferred:       150000 bytes
Requests per second:    2742.29 [#/sec] (mean)
Time per request:       1.823 [ms] (mean)
Time per request:       0.365 [ms] (mean, across all concurrent requests)
Transfer rate:          707.00 [Kbytes/sec] received

Server Software:        Apache/2.2.9
Server Hostname:        music.ronaldprettyman.com
Server Port:            80

Document Path:          /test.txt
Document Length:        15 bytes

Concurrency Level:      5
Time taken for tests:   5.813 seconds
Complete requests:      10000
Failed requests:        0
Write errors:           0
Total transferred:      3500000 bytes
HTML transferred:       150000 bytes
Requests per second:    1720.42 [#/sec] (mean)
Time per request:       2.906 [ms] (mean)
Time per request:       0.581 [ms] (mean, across all concurrent requests)
Transfer rate:          588.04 [Kbytes/sec] received

Tags: , , , , , , , ,