PHP5 + Mostwanted
I’ve recently upgraded from PHP4 to PHP5 to allow me to test out a couple of web apps on the same machine that runs things blog. All in all it went well, had to specify timezone in a config file for some of the code I’ve done myself – and my TV recording system doesn’t do the full list of items to record (will fix at some point). It also borked the most wanted panel on this blog.
Anyway I have a fix for this now – simply call mostwanted using these two lines of php:
$mostwanted = new MostWanted;
$mostwanted->mostwanted(7, 30, true);
in replace of
MostWanted::mostwanted(7, 30, true);
December 9, 2006
Posted in: Software, bugs
Comments Closed
WUFTP Rule for fail2ban
I’ve put to gather a rule for wuftp for fail2ban v0.6 (ie the version in backports for sarge – http://backports.org/). The regexp is straight from the version available in debian unstable. Seems to do the trick.
[WUFTPD]
# Option: enabled
# Notes.: enable monitoring for this section.
# Values: [true | false] Default: true
#
enabled = true
# Option: logfile
# Notes.: logfile to monitor.
# Values: FILE Default: /var/log/auth.log
#
logfile = /var/log/auth.log
# Option: port
# Notes.: specifies port to monitor
# Values: [ NUM | STRING ] Default:
#
port = ftp
# Option: timeregex
# Notes.: regex to match timestamp in SSH logfile. For TAI64N format,
# use timeregex = @[0-9a-f]{24}
# Values: [Mar 7 17:53:28]
# Default: \S{3}\s{1,2}\d{1,2} \d{2}:\d{2}:\d{2}
#
timeregex = \S{3}\s{1,2}\d{1,2} \d{2}:\d{2}:\d{2}
# Option: timepattern
# Notes.: format used in "timeregex" fields definition. Note that '%' must be
# escaped with '%' (see http://rgruet.free.fr/PQR2.3.html#timeModule).
# For TAI64N format, use timepattern = tai64n
# Values: TEXT Default: %%b %%d %%H:%%M:%%S
#
timepattern = %%b %%d %%H:%%M:%%S
# Option: failregex
# Notes.: regex to match the password failures messages in the logfile.
# Values: TEXT Default: (?:Authentication failure|Failed (?:keyboard-interactive/pam|password)) for(?: illegal user)? .* from (?:::f{4,6}:)?(?P
failregex = wu-ftpd\[\d+\]:\s+\(pam_unix\)\s+authentication failure.* rhost=(?P<host>\S*)
December 2, 2006
Posted in: Debian, Linux
Comments Closed
GVIM/Ubuntu/Debian Syntax Highlighting
It appears in the Edgy Eft and Debian Etch that Syntax highlighting in gvim has been switched off by default.
To add it back add the following line to /etc/vim/gvimrc
" Also switch on highlighting the last used search pattern.
if has("syntax") && (&t_Co > 2 || has("gui_running"))
syntax on
set hlsearch
endif
November 20, 2006
Posted in: Debian, Howtos, Ubuntu
Comments Closed
Ubuntu + Printing (lp etc)
It appears when when I created the first printer in ubuntu it didn’t set it as default and hence nothing that used the likes of lp would print.
Easy to fix – log on. Goto system > administration and set a default printer. Still you’d have though that when I only have one printer, and its the first printer I added it would be the default, by well default
October 1, 2006
Posted in: Software, Ubuntu
Comments Closed
Cacti Update
Well that was easy. I’ve just moved two tables to the type Memory/Heap and cacti runs like it used to (in fact a hell of a lot better than it has been doing recently.)
The two tables moved are: snmp_counter64* and poller_output. Both these tables can afford to loose the data on restart – they hold data before it is moved into the rra and holds at most 5 mins worth of data (IE one cycle).
It also improves the situation if the server restarts as if data is left in the poller_output table it can push the the php poller over its memory limit and stop it working properly, so its a good idea to start with it empty.
Snmp_counter64 also needs emptying every now and again – as when you remove devices from cacti it does not get removed from here
The SQL code to achieve this is:
alter table cacti.snmp_counter64 engine=heap;
delete from cacti.poller_output;
ALTER TABLE cacti.poller_output MODIFY COLUMN output VARCHAR(255);
alter table cacti.poller_output engine=heap;
Warning
Some graphs may stop updating if the script used to generate data for the output more the 255 characters If you use MYSQL 5, then you can use something like VARCHAR(1024) instead.
This may cause data to be lost from the current run.
The server now copes pretty well. I haven’t tried anything new to it yet, but it generally appears to be working better then it has done for past couple of months. I would like to re do the disk structure, but for now this will do.
*This table is from a patch – most people won’t have this table.
September 17, 2006
Posted in: Networking, Software
Comments Closed
Cacti
Well our age’ed Dell server has finally hit a limit with cacti.
Currently it has:
Hosts:354 Data-Sources:16943 RRDs Processed:8744
And has hit a limit with Disk i/o.
What I plan to do is: Move it onto a temp virtual server. Completely rebuild the old dell with two RAID 1 sets each on 2 disks – One for the RRA and one for the DB and see how it put up with that. The rebuild should help on the disk layout too – due to all the network changes and low disk space its likely the disk could have a few few frags.
If this doesn’t work and it still struggles, then I’ll use one of the various other spare dells (might have to be one without a raid card – so it’ll be software raid) and stick the database and possibly front end on it.
Once we have it stable again – I suppose I better look into a better way of coping with gigabit Ethernet cards in windows – currently we use the SnmpProxy2.pl hack – may just be a case of limiting it to Windows servers some how and not all 64bit Ethernet counters.
September 12, 2006
Posted in: General, Networking, Software
Comments Closed
What I want from a linux TV Application
Unfortunately there appears be a lack in applications that use some of the best features of DVB in the uk. What I want from a TV application is:
- Ability to record digital TV as it is broadcasted without any additional compression
- Ability to record more than one channel at once (preferably more than 2 some times)
- Ability to overlap program recording where needed
- Ability to Record radio stations
- Backend front end system where by I can schedule/view/control the system from another computer
- Ability to record one, two or more channels on any mux using one TV card (there’s no point having to use two TV cards to record channels on the same frequency.
- Do this all in the background on a Debian Sarge (+ selected extra apt-get sources) System
- A TV like interface I could fire up. I don’t mind if I can schedule or tune from this interface, but I’d like to see now and next info, change channel, pause live TV, hit record etc. I don’t need the ability to play games nor watch DVDs etc from it. I just want to channel surf sometimes or fire it up to watch something at the spur of a moment.
- Scheduling would be nice, but as long as there some easy to use interface, I could plug in my current scheduling system
I currently use DVB Daemon + webdvbd (with some changes to give me a webinterface I can hook my scheduling program up to) + DigiGuide (via wine).
Its a bit of a bodge but gives me the most important features and is relatively stable (I do occasionally have scheduling issues even with two cards) and about >1% of the time I get a duff recording (picture drops out before the end or picture is too scrambled to watch), but this may be a driver issue.
What the current system lacks is clash detection (I can tell if I’m paying attention – but only for manually one time only added programs – they won’t appear if there’s a schedule problem). It also lacks a GUI and TV live interface. I can watch TV live but its not easy to do (I have to use dvbstream and mplayer – so can’t change channels using my remote). If I had more time, and more experience in this I may be tempted into making and interface, but I suspect MythTV will finally put up with the pain of breaking things and written in decent dvb support first.
August 2, 2006
Posted in: General, Software
Comments Closed
LugRadio – Sunday
Sunday – woke up with a minor hangover, but a shower and breakfast sorted this out. This time I got chance to have some toast and coffee. Got down to the SU in plenty of time.
On sunday I listened to the following talks:
- John Leach – Everyone Loves Eric Raymond
Another one of the talks I’d knew would be quite funny. Pretty informative too - Matthew Garrett – Linux and Laptops
I have a laptop and linux, so hey might and well listen to this one. Turned out to be one of the funiest talks of the weekend too. By the way don’t buy an Acer…… - Richard Moore (IBM) – IBM and Open Source
We have quite a lot of IBM stuff at work, so I thought I might pop along. It would appear IBM and Microsoft have defiently switched place, IBM is the company that is listening and doing lots of interesting things while Microsoft is the company telling customers what they want and how they should do things. - The Hour of Power — short demos of cool stuf
Basically interesting stuff to look at. - Mike Hearn – Packaging and Autopackage
I liked the sound of this to start with, but the more I herd the more I disagreed. Yes we do need to make things easier to install in linux, but not without loosing all the advantages. Nearly all the improvements auto packager offers could easily be implemented in the likes of apt. - The LugRadio team – Thankyou and goodbye
The end of the show. Left wanting more as everything good thing should.
At the end we went back to the hotel, wasted a few hours then went down to the bar. Started outside, but then grew too big and moved inside when the Lug Radio presenters joined the rest of the people at the Quality Chin. A good night of drinking, talking and the odd glass of champagene. Another late night and off to bed tired and drunk again, once the last of the presenters had gone, and nearly everyone else had called it a night.
July 31, 2006
Posted in: General, Thumbs Up
Comments Closed
Ghostscript Issues
Ghostscript in etch produces dodgy pdf files (at least on the 3 or 4 I’ve made). Current version is 8.15.1. PDF files work fine in Linux but not using acrobat reader on windows.
However sarge seems fine. Ghost script version in sarge is 7.07.1
Hmm wondering if its a fault with GS 8, will have to keep an eye on this.
July 30, 2006
Posted in: Software, bugs
Comments Closed
LugRadio Live – Saturday
Saturday was the first day of the “Official” event. I eventually got up from simply lying down in the bed for a while (I did get some sleep, but the heat of the room woke me up quite early), went for a shower and then for some breakfast. Sward wanting to get there early so I rushed and just had some cereal and orange juice. Then spent about 30min sitting around waiting for some other people who wanted to go down. Could have had a proper breakfast
Anyway when we did get down there we where waiting in a small queue and then into the venue. It was a reasonably sized student union, although as its actually part of the rest of the uni building and not a separate building it was hard to gauge it size. The bar was open and plasma screen where displaying some pictures and a now and next off what was to come. A small intro from the Lug Radio team and the event kicked off.
There where 5 room – The main room and bar, with the 2 BOF points and lan gaming off to the sides, and exhibition room which forms the rest of the bar (if it was open), The Chin and Beard rooms (for smaller talks) and the third and last bof point. The talks I attendants on Saturday where
- Gervase Markham – How to Destroy the Free Software Movement
An entertaining talk on well how a fictional company was working on Destroying to free software movement - Matthew Somerville – MySociety and Pledgebank
I did try and see Ewen Spences talk, but he never turned up so I went to see the MySociety talk. It was quiet interesting – especially as I’d already used part of the site and not realised - Stephen Lamb (Microsoft) – Microsoft and Security
Should have really gone to another talk to be honest – felt a bit lectured to and bored during this one - Lunch – Unfortunately we turned up on mass to a very busy and understaffed Varsity and missed the mass debate, but it was decent enough food at least
- Des Burley (Mills & Reeve) – A lawyer on open source
Interesting talk on the problems facing open source law wise - Matthew Bloch (Bytemark) – Virtualisation
An interesting talk on a technology I’d like to play with but haven’t found a reason (The stuff we could use virtulisation for at work unfortunately is all done on Microsoft stuff) - Ian Lynch – The OpenDocument Fellowship
Some details on the way the OpenDocument Fellowship is working. Would be nice to switch to an Open format at work – but need to wait for Microsoft to get their word pluggins sorted first. Assuming they do one for all the version of office we use. - Bruno Bord – This Talk May Contain Swearing
AKA LugRadio Live and Unleashed warm up talk
An excellent talk, especially given English isn’t the speakers first language.
- LugRadio Live and Unleashed
All in all a great day. The Bar was well used, the aircon was a little ineffective but it wasn’t too warm. Its colder than my office at work anyway.
After the main event we all got very wet walking back to the hotel, stayed wet while a few of us got a KFC. Showered changed then off to the party.
Party – Was better than I was expecting, attendance was down from the main event of course, but still pretty well attended. Unfortunately the bar eventually ran out of Guinness, Cider and Grolsch so I ended up having to have a pint of Stella at one point, but at least been a Student union it was cheap. The DJ wasn’t bad – but given he was a club DJ was lacking in the wide range of Music demanded by the crowd, so the dance floor remained fairly empty most of the time. His rock selection was worst of all having to resort to repeating a few tracks. Next year I’ll pay attention and bring a cd with a few decent tracks (No Rammstein I promise – unless anyone else wants some played). The SU tried to kick us out early, but Jono sorted that out and we stayed till just before 2 and headed back to the hotel for a quick chat with a few people then off to bed for the night.
July 30, 2006
Posted in: General, Thumbs Up
Comments Closed
