Change timezone on Ubuntu server (CLI only)
Using the command line, you can use dpkg-reconfigure tzdata.
Follow the instructions to reconfigure the timezone. This was taken from the ubuntu wiki article
Cheers, Mark
Using the command line, you can use dpkg-reconfigure tzdata.
Follow the instructions to reconfigure the timezone. This was taken from the ubuntu wiki article
Cheers, Mark
A quick google later and I found the solution, a program called 'tr', posting here for next time:
Obviously you could convert from Unix to Mac by reversing it.
Cheers, Mark
During out load testing we came across a major issue with the web services when the application was under load which caused the ColdFusion application server to crash very badly.
The problem was caused by the fact that the web service calls typically took about 1 second to complete whereas pages that didn't need to use a web-service completed in about 100ms.
When we put the application under load if the number of requests that needed web-services ran at a sustained high rate then very soon all the running requests would be doing web service calls. This meant that all 25 java threads were getting swallowed up the "long running" web-service calls.
This caused all the other threads to queue up and very shortly the application fell over in a heap.
Initially we looked a using cflock tags to handle it but this would essentially serialize all web service requests and only one web-service thread would run at any one time. This meant that the application would not be able to handle the required load.
After a bit of a brainstorming session we came up with the idea to develop a semaphore type object which would limit the amount of threads that could get tied up with long running web-service requests.
Ideally it works like this:
However, if the system is busy it works like this:
In order to use the semaphore you need to set it up in a shared scope - typically application or server scope. We use it in our webservice wrapper CFC which is stored in the application scope.
Here is a code example of how this looks in practice:
Note: One of the issues that we came across during the implementation of this was that when long running requests were caught by the long running request timeout the releaseThread function would not get called as the webservice code was timing out and it was getting killed before it hit the releaseThread line. To work around this we implemented an internal garbage collection mechanism to ensure that we didn't leak threads, or when we did we could recover from it.
This has allowed us to manage the number thread by limiting the number of long running requests so as the server gets busy it will now reject web service calls before it runs out of memory.
You can get the full code for the Semaphore object from our Opensource CF Library
We weren't intentionally doing these queries but they were coming from somewhere. A bit of detective work via google found a very enlightening article about this problem.
A quick read of this explained:
It turns out ColdFusion was asking Connector/J for the metadata on every field, which in turn triggered a SHOW FULL COLUMNS query for every varchar and text column returned.
It also went on to say that is had been fixed as of Connector/J 5.07.
On reading the release notes it mentions that the
Driver detects when it is running in a ColdFusion MX server (tested with version 7), and uses the configuration bundle coldFusion, which sets useDynamicCharsetInfo to false (see previous entry), and sets useLocalSessionState and autoReconnect to true.
However, from my testing it wasn't doing it as we were still seeing the problem. However, we are running the MultiServer version of ColdFusion which sits atop Jrun4.
So I added the parameter directly to the querystring:
This has stopped the problem, and given a significant performance gain. On one of the sites I was load testing it gave a 12% throughput increase and on another one which had less queries it gave a 4% increase.
Hope it helps.
Cheers, Mark
With a little bit messing about I managed to get it doing exactly what I needed.
I created the following little script which connects to 4 remote servers and monitors the log files (file names and server names have been changed to protect the innocent).
Now with a single command I can monitor the log files across the entire cluster.
Happy days. Cheers, Mark
A bit of googling turned up this Technote from Adobe which mentioned the same problem on RedHat Linux.
The redhat solution is also documented on Talking Tree but it doesn't cover Ubuntu.
For Ubuntu it's very simple - you need to install 3 libraries and you are good to go - one single line.
This will install a dozen or so packages - then restart ColdFusion and you have a shiny working install.
Cheers, Mark Lynch
My HP nc8430 also runs particularly hot by default - but I've spent a bit of time hunting down tips for reducing the power usage and heat produced from the laptop to get a longer battery life. I'm sure there are a lot more ways that power can be saved and I suspect that future versions of Ubuntu will catch up and produce the same level of battery life or even longer than windows.
Here is what I am using so far:
If anyone has equivalent code for other video cards please let me know and I'll add it here.
From powertop: 'hal' is the component that auto-opens a window if you plug in a CD but disables SATA power saving from kicking in.
Apparently the usb 1.1 driver does frequent polling and prevents the processor from staying in low power states for any length of time.
From powertop: This wakes the disk up less frequenty for background VM activity.
This is a very extreme measure and I haven't measured how much extra battery life it gives - but it is a bit cool to be able to turn it on and off if you have a dual core or dual CPU machine.
How cool is that?
Let me know if you come across any more tips. Cheers, Mark
Updated 17/Mar/07: Fixed commands based on feedback from Neil. Thanks Neil.
The reason that apache doesn't already know about it is that the Adobe AIR format has only just been released.
To fix up a Ubuntu server all you need to do is add the following line to the /etc/mime.types file:
Then restart apache with:
All done. I'm sure that the mime type will be included going forward so this won't be a problem.
This occurs when you are already using a particular port for another port forward. Eg in this case I might be trying to forward port 2000 to two different machines. However, I came across this great and simple way to prevent this.
The basic theory is to use a unique local ip address for each portforward host you wish to connect to instead of using localhost (127.0.0.1) for each.
I've chosen the .fwd extension to remind me what they are for.
When you connect to these systems the port forwards will now be set up.
You can access the port forwards by using system1.fwd or system2.fwd instead of localhost.
Eg: http://system1.fwd/ or http://system2.fwd/
Nice, thanks for the tip Cameron.
For a default asterisk install on Ubuntu do the following:
You then need to edit the following files three files:
Hope this helps you get going with Asterisk. Cheers, Mark