Miscellaneous Knowledge

Howto

ffdshow Bypassing Xonar’s Control Panel and Settings

by KingJ on May.24, 2010, under Howto

I recently bought an Asus Xonar DX as I was getting fed up of the interference on my onboard sound card. However, as I use headphones I often need to use the soundcard’s functions to boost the bass a bit if I want to hear it. While most applications would go via the Xonar control panel and boost the bass, ffdshow would bypass it and not boost the bass. Hence, any movies I played where distinctly lacking bass.

To solve this, simply set Audio Channel to something other than “2 Channels” on the main section of the control panel. Don’t worry, the Xonar card automatically handles downmixing back to 2 channels (or whatever your Analogue Out is set as) for the actual output. This is simply the interface it presents to programs such as ffdshow. Now, ffdshow should go via the Xonar control panel and apply all the effects you’ve set, such as bass boosting.

Leave a Comment :, , more...

Installing KDE on Ubuntu

by KingJ on May.03, 2010, under Howto

Ever felt like trying out the KDE desktop interface, but didn’t fancy downloading Kubuntu and installing from scratch? Good news! You can easily install KDE from your current Gnome-based Ubuntu install and it’s dead simple.

Open up Synaptic Package Manager and search for “kubuntu” in the quick search, in the list of results select kubuntu-desktop and then click apply. Synaptic will then download and install all the files for KDE.

However, how do you switch to KDE from Gnome once it’s installed? Simply log out and then click your username as usual, at the bottom of your screen click Session and select KDE and then log in as normal. This time, instead of Gnome you’ll get the KDE desktop interface. If you want to switch back to Gnome just log out and select Gnome under session.

Now you can try out a new desktop interface without going through a lot of hassle.

Leave a Comment :, , , , more...

Out of memory on the Nokia E71?

by KingJ on Jan.16, 2010, under Howto

Recently, my phone has been complaining that it is out of memory, and hence disables automatic retreival of email amongst other things. Try as I might, I just couldn’t free up any extra space – I install programs to the memory card and keep all of my files on there. I couldn’t see anything on the phone I could delete.

However, all it seems all messages (Text and Email) are stored on the phone’s main memory, for someone who has a lot of emails and never deletes text this amounts to a surprising amount of data.

Thankfully, it’s possible to move the messages from the phone on to the memory card. Simply go Menu > Communication > Messaging > Options > Settings > Other and set “Memory in use” to Memory Card. You’ll then be asked if you want to copy over the messages, select Yes and your messages will be copied to your memory card and all future messages will be stored there. Doing this freed up a whopping 55MB of space on the phone memory!

Leave a Comment :, , , more...

Votekicking Admins on Left 4 Dead

by KingJ on Mar.28, 2009, under Howto

I run several Left 4 Dead servers which I play on regularly, these are all public servers with unrestricted access. Unlike previous Valve games, Left 4 Dead includes a built in vote kick system, which is sensible since due to the server sizes, it’s unlikely you will have an admin player playing, hence the voting system is used for removing any troublemakers.

However, it is frequently abused, players will randomly votekick another player without warning because they want a friend to come on, without even asking. In many cases, they’ve even votekicked me, the owner and admin.

While they soon realise this is a huge mistake on their behalf (as they become permanently banned from all my servers), it is somewhat annoying to have your gameplay interruped by a votekick.

Thankfully, due to the power of SourceMod, someone has written a plugin that obeys the admin immunity system built into sourcemod – normally used to prevent lower-level admins from abusing higher-level admins. By default, all players have an immunity of 0, as a “Full Admin” I have given myself an immunity of 100. Hence, when anyone tries to votekick me, the vote instantly fails. Not only this, it shows me who it is, for all votes.

By default, the plugin only grants full admins veto ability and displays who is votekicking who. I recommend you edit the /left4dead/cfg/sourcemod/sm_plugin_votemanager2.cfg file as follows; (if it does not exist, create it)

l4d_vote_kick_immunity 1
l4d_vote_log 1

This will turn on the admin immunity system and also log all votekick attempts to the SourceMod log.

Players beware, never kick the admin.

1 Comment :, , , , more...

Network Time Protocol (And the NTP Pool)

by KingJ on Feb.22, 2009, under Howto

The Network Time Protocol is, as the name implies, a standard for syncronising time across networks. This is extremely useful as it allows all computer clocks to be syncronised to a common, correct time rather than being “around” a certain time. It’s especially useful on servers, where co-ordinating events or tracing failures needs precision and accuracy.

So how can you sync your computer with a NTP time server? It’s actually quite simple;

  • Windows – Windows XP and higher already sync out of the box to time.windows.com, however time.windows.com may be very far from you and hence there is a delay in the time making it less accurate. If you want to change the server, double click the clock (XP, on Vista double click and select “Change Time and Date Settings”), then click the Internet time tab, enter the server (XP, on Vista click Change Settings) and click Update Now to sync.
  • Linux – Use the command ntpdate followed by the NTP server you want to sync with

So, how do you go about choosing a better NTP source for windows and a source for linux? Enter the NTP Pool.

There are quite a few “Stratum 1″ NTP servers, which get their time directly from cesium clocks or GPS satelits, these are the most accurate sources of time available. However, if we all synced with a stratum 1 server, they would quickly be overloaded. Most people don’t need that kind of precision, so enter “Stratum 2″ servers. Stratum 2 servers NTP sync with “Stratum 1″ servers, so while they are not as exact as they are, they are only different by a few milliseconds – hadrly a problem. Hence, you should sync with a “Stratum 2″ server. But how do you find one? The NTP pool is a pool, a collection of NTP servers intended for the masses to sync with. Either use 0.pool.ntp.org as your NTP sync source, or if you want extra accuracy select your continent, then country from the right to get a server closer to you. Now you can enjoy accurate time!

However, the demands upon the NTP pool grow daily, but not it’s supply of pooled servers. If you have a server with some spare bandwidth and a static ip address that is available 24/7, donate a server to the pool. You can adjust the amount of NTP traffic you get by setting your bandwidth in the control panel, even home users can participate as long as they meet the requirements!

Leave a Comment :, , , , more...

Mail Host (SSL): mail.root

by KingJ on Feb.11, 2009, under Howto

On my cPanel server, I noticed that users where being given the incorrect FQDN (Fully Qualified Domain Name, e.g example.com) for mail.root as the SSL address for the mail server. This is odd, since there is no where to actually configure the SSL host address. After a bit of poking around, it seems it sets the address based upon the address of your SSL cert. In my case, I was using a Wildcard SSL certificate from CACert (free SSL certificates). However, as the certificate was a wildcard certificate, it had no idea what the actual FQDN you wanted was! After purchasing a cheap RapidSSL cert for £10 and installing it, the SSL Host FQDN displayed correctly for users. Plus they won’t get any certificate warnings any more!

Leave a Comment :, , , more...

suphp

by KingJ on Feb.08, 2009, under Howto

SuPHP is an option during compiling PHP to run all scripts under the owner of the folder. Traditionally on shared hosting accounts, PHP scripts are run as “nobody” to prevent them from causing havoc with the system. However, this still leaves a few vulnerabilities where a PHP script from one user might be able to access other user’s files. By running the script as the owner, the Linux user permissions system is correctly invoked – users can only edit and effect their own files.

However, having recently recompiled PHP and Apache on cPanel to enable suexec support, I came across a problem where pages would give an internal server error (Error 500). This was caused by one of the following;

  • php_flag in .htaccess
  • php_value in .htaccess
  • Permissions on PHP scripts not set to 644
  • Permissions on public_html folder not set to 771

Due to the nature of suexec, php_flag and php_value will not work! Instead you need to set suPHP_ConfigPath in your htaccess to the path where your own php.ini can be found (Note, this is just the path to php.ini, not the full location of php.ini).

suexec will also not execute any scripts with insecure permissions, such as 777. Set all PHP scripts to 644.

Once you’ve taken into account these issues, your PHP should be running in a more secure fashion. Under cPanel/WHM you can enable suphp by going to the EasyApache option which will recompile PHP and Apache – this is not a task to be taken lightly ensure you know what you are doing before, during and after using EasyApache to recompile PHP and Apache. If after recompiling you encounter errors caused by the above you can temporarily set the PHP handler to dao on cPanel instead of suphp.

1 Comment :, , , , more...

ST4120P – Not working in portrait mode

by KingJ on Jan.11, 2009, under Howto

A while ago, I picked up a ST4120P, a Fujitsu Tablet PC.  It’s quite dated, having a blazing fast 933Mhz Pentium 3 Mobile Processor, a maximum of 512MB RAM, integrated 802.11b wireless and so on. However, it’s still a tablet and works fine for writing notes in programs such as OneNote (or Paint, for those that can’t afford office!).

I upgraded the drive to a 120GB Segate drive, which is quieter, uses less power and has 6x the capacity of the previous one. In other words, this tablet is all ready to go.

Or not. I encountered a small problem where the screen would work perfectly in landscape mode, but if you switched to portrait, the pen would be 90 degrees out of sync. This is odd, having installed all the drivers correctly. Google wasn’t much help – one other user reported this problem and solved it by installing from SP0, and removing certain parts of the SP2 install – not something I was prepared to do. I went back to Fujitsu’s driver site and found one driver I had overlooked, the “Pen User Mode” components. I downloaded and installed these and portrait now worked perfectly. Excellent, this tablet, which cost me around£150 total after upgrades, is now ready to go. Perhaps the best bit of it is the battery life – an amazing 6hr 30min even though it’s 5 years old – this is a real world test with the tablet idle, but screen on full brightness. The only downside is that a full charge takes 24hr, but otherwise a perfect, affordable tablet.

As things tend to disappear from Fujitsu’s site, you can download the Fujitsu Stylistic ST4120P Pen User Mode Components from us. Use at your own risk of course, works for me, unlikely to break your system but in this cover-your-ass world I have to have some disclaimer just in case something goes awry and I get the blame…

Leave a Comment :, , , , more...

Dropping out of Google

by KingJ on Jan.04, 2009, under An Interesting Find, Howto, Me

Around mid december, I noticed that traffic for my Left 4 Dead Servers page dropped sharply – from 100 unique visitors a day to 5, at most.

Traffic Graph for www.l4dservers.net

Traffic Graph for www.l4dservers.net

Most of my traffic comes from search engine referrals, so to have a drop off like this must have something to do it Google.

Cue Google’s Webmaster Tools, a handly place for you to view all statistics about your site. On their diagnostics section I was getting a lot of “Network Unreachable” errors on the robots.txt. Basically, Google couldn’t access my site to read the robots.txt – nothing wrong with the actual robots.txt at all, it was a web server problem. After having a look around, I came across some information on diagnosing the issue, no help from Google itself on this matter of course. The information listed here indicated that certain software was blocking google for making too many requests the to the server, in a DoS attack fashion. This site is hosted on reseller hosting, however it shares the machine with a lot of other websites. In which case, Google has been accessing many sites on this server generating a high number of requests. Therefore, the software on the machine automatically blocked Google falsely beleiving that it was attacking sites on the machine.

This blog was also hosted on this reseller account, and traffic figures showed a similar decline. I’ve recently bought a dedicated cPanel server to replace the reseller and moved the blog onto there – bingo! This blog now appears back in search engine listings. If we look at Google’s Webmaster Tools, we can see the amount of pages crawled by it.

Google Crawl Statistics for Miscellaneous Knowledge

Google Crawl Statistics for Miscellaneous Knowledge

Right after moving it off the reseller hosting and onto the server, loads of pages are instantly and successfully crawled. The blog is back in the Google index.

www.l4dservers.net is still pending move to the new hosting, but I expect to see similar results once I have completed the move, just waiting on the DNS to be updated for it.

So what can you do if you experience this issue? First, read this excellent article and make sure that your lack of Google listing isn’t your fault. If you are not at fault, contact your hosting provider and point them to the article, ask them if they have any firewalls that block multiple requests such as the Googlebot. I would also highly suggest signing up to Google’s Webmaster Tools to help diagnose any problems Google has accessing your site. While they where not particually helpful in this incident, it did help to get me started on the diagnosis. Not only this, but it allows you to submit sitemaps which vastly improve your ranking and help make sure that every page is in Google’s index. Sitemaps are checked very often and any new URLs are quickly crawled helping you get any content into Google quickly.

From the more technical side, this article might be of interest. It details how ConfigServer Firewall might be a culprit in this.

Leave a Comment :, , , , , more...

Improving Mobile Broadband Speed

by KingJ on Sep.07, 2008, under Howto

I recently got mobile broadband from Voadafone UK (3GB/mo for £15/mo). Now, while they advertise “upto” 7.2mbit/sec, I appreciate that you will never recieve it – the same with Wireless Networks, you never receive 54mbit/sec, even right by the WiFi point you will probably get just 30mbit/sec at most.

Anyway, you should expect to get around 2mbit/sec from your mobile broadband if your modem for it supports 3.6mbit rate or higher. However, I have heard complaints from some that they are getting extremely slow internet.

If your Mobile Broadband Access Program (e.g Vodafone Mobile Connect) is showing GPRS connection, then you are on the 2G standard of mobile internet access, giving you a speed similar to that of a dial up modem. GPRS is the “fallback connection”, when there is not enough signal for a relibable 3G or better connection.

Therefore, to get a faster speed, you need to get a better signal. The best way to do this is to relocate your modem. Many MBB modems now are based off USB, so you can buy an inexpensive USB Extension cable to move your modem to a better location. If indoors, try moving the modem to a windowsil. Do not put it outside at all, no matter what you wrap it in!

You can also look (in the UK) at SiteFinder, the UK’s database of Mobile Phone towers. You can then see where your local tower is and position the modem best.

Hopefully these steps will help you to get a faster speed – enjoy!

Leave a Comment :, , , , , , , , more...

How to use FTP

by KingJ on May.17, 2008, under Howto

One thing i’ve come across while hosting games is the number of people that don’t know how to use FTP, or use a very bad method (i.e web based 3rd party FTP sites). So, i’m going to show you how to use FTP properly.

This tutorial is aimed at Windows users, those that use other operating systems will probably be able to follow these instructions with a bit of alteration.

First thing is to select your FTP client, which enables you to connect to the FTP server. While most operating systems have one, it’s quite lacking – it works but you’re going to have fun getting it to do that. Therefore, I recommend FileZilla, a free FTP client that works on most operating systems (Windows / Mac / Linux). I use FileZilla and hence it’s going to be the basis of this tutorial. Download it here. I’m going to assume you know how to use an installer.

Once installed, simply run FileZilla. On Windows, you will find it in Start > All Programs > FileZilla FTP Client > FileZilla. You should then be presented with the following screen;

FileZilla\'s Starting Screen

Lets go over the basic functionality of this screen. The boxes at the top that read “Host”, “Username”, “Password” and “Port” are where you enter the details of the FTP server you want to connect to, then click QuickConnect to connect to it.

The currently empty box under this will show you the status of the FTP, the messages it shows might not be understandable by you, but if you’re having problems with your FTP, the host will need to see this to help with your problem.

The box on the left shows your local files, on your computer. When connected, the box on the right will show the contents of the remote server.

Finally, the box at the bottom will show you the progress of your transfers, if you have any.

So, enter in the FTP information that your host gave you and click quickconnect. You can leave the port box blank unless your host has told you to use a port other than 21.

FileZilla Connected to the FTP

So, you’ve now connected, the box on the right is now filled with the contents of the remote server, if you’ve just got FTP access there might not be anything there – hence you have to upload files. The screenshot above shows me connecting to the FTP site for this blog, hence all the blog files are seen on the right side.

Now, I want to upload a picture, so I simply browse to the location of the picture on my computer on the left and drag the file I want to transfer over to the remote site on the right. Now at the bottom you can see that there is a progress bar showing how the transfer is going, along with an estimated time. If you transfer multiple files, then you will see multiple file transfers reported.

FileZilla During Transfer

It is that simple, and the process can work in reverse too, you can copy files from remote to local. FileZilla has many other features too, such as detecting when a local file is changed and prompts you to upload it. No matter what your needs, FileZilla can probably fufill them, plus it’s free!

I highly recommend FileZilla over any other solution, while others might have better features such as Synchronisation, they are not exactly free. If you’re currently using your operating system’s inbuilt FTP or another client which isn’t working for you, get FileZilla now.

Leave a Comment more...

CSRSS & CPU Usage

by KingJ on May.05, 2008, under Howto

Customers of my Game Server Company may have noticed recently that we moved to a new server (if you didn’t notice, you probably didn’t get the several emails I sent out informing you of progress every step of the way!). Anyway, I noticed today that between them, CSRSS.exe and Hardware Interrupts where taking up 25% of the total processing power, which is exactly one core (it’s a quad core server and since CSRSS isn’t multi core aware it can only max out 1 core).

Normally, CSRSS uses less than 1% of total CPU, and Hardware Interrupts only uses a lot of CPU if there is a problem (such as your disk drive being put into PIO mode). I adjusted the affinity of CSRSS so that it only used one core, and all of the hardware interrupts also happened then on that core. CSRSS was defiantly at fault here.

A quick bit of Googling lead me to MS KB 934330. This describes an instance where CSRSS uses more than 50% of CPU resources when connected via remote desktop, which is the problem I was experiencing (i’m assuming they are using just the 1 core). While there is no official patch, they have a hotfix available, and recently Microsoft have started being a bit more generous with Hotfixes, you don’t have to contact support any more – just get it sent straight to your email.

I applied the hotfix, rebooted and the problem had gone away – no more CSRSS using lots of CPU. If you also have this problem i’d reccomend applying the hotfix rather than let CSRSS waste your CPU cycles.

Oh, if you’re wondering how I viewed Hardware Interrupt CPU usage, I use Process Explorer – an excellent replacement for task manager, showing CPU to 2 decimal places, and lots of other handy features. Plus it’s regularly updated and free.

Leave a Comment :, , , , , , more...

Easy Equations in MediaWiki

by KingJ on Mar.25, 2008, under An Interesting Find, Howto

If you’ve ever set up MediaWiki, you will probably know how difficult it is to get equations (or LaTeX rendering / math tags) working. Under windows, it requires a lot of tweaking, ImageMagick support, a full LaTeX install and in quite a few cases fails to work. While trying to get equation rendering working on my personal (read, private!) wiki, I came across an interesting solution to this problem. Simply put, it is in extension which interprets <tex> tags and then sets the image URL to that of an image generated by a CGI-Script on another page. This means that no LaTeX or ImageMagick support is needed on the localhost.

The full details of how to get this working are documented here. It is very simple to set up, with the only drawback being that you have to use <tex> tags instead of <math> tags.

If you are interested in the script itself, perhaps to use it for something other than a Wiki, you can visit the creator’s site here. If you have a large wiki or other project however, it is recommended that you host the CGI script yourself to reduce the load on the server that provides this free LaTeX equation rendering.

1 Comment :, , , more...

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!

Visit our friends!

A few highly recommended friends...