Technorama
An omnibus of tech posts by a Futurologist on
software development primarily.
Saturday, 29 January 2011
How to kill a defunct process
PID USER NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 1856 jon 20 0 0 0 0 Z 101 0.0 6:56.59 transmission (defunct)
^ This process is defunct, using 101% of my dual core CPU machine.. Ubuntu 10.10 (x86).
The process is unkillable.
kill -9 1856#
pkill -9 transmission
killall -9 transmission
Solaris has a command for this situation:
preap - force a defunct process to be reaped by its parent
Just need to find out if there is something similar for GNU+Linux
The parent PPID is 97.. which is no longer running. So I can't even kill that, doh!
jon@note:~$ pstree -p 1856
transmission(1856)───{transmission}(1857)
jon@note:~$ kill -9 1157
bash: kill: (1157) - Operation not permitted
System->Administration->System Monitor shows the process in "futex_wait_queue_me" state. That is a function in the kernel/futex.c file
After reboot, same issue:
$ ps aux |grep tran
jon 30979 5.9 0.0 0 0 ? Zl 22:56 2:06 [transmission]
Labels: GNU+Linux
Saturday, 22 January 2011
OpenOffice landscape bug
OpenOffice v3.2.1 (soon to be renamed LibreOffice!) has a bug that prevents changing printer settings before printing.
Steps to reproduce:
A) Open spreadsheet attachment in OpenOffice. (this opens read-only)
B) Need to change to landscape to print.
C) See that Format->Page is greyed out!
Workaround is, always save the attachment, to be able to see the Format->Page options.
MS Office doesn't have this problem, users are free to edit read-only files that have been opened. Surprising OpenOffice still has such an obvious bug.
Labels: Office
Thursday, 20 January 2011
Mortgage miss-selling come back?
Considering the number of people who could not afford a mortgage.. but were given one by banks.. and now are having homes repossessed, and being declared bankrupt... there seems to be scope for some sort of miss-selling investigation/compensation. Putting the people right who have been put out, and lost their homes.
Mortgage provider should at the least pay for rented accom for 12 months, and cover all removal, and storage fees.
Labels: Economy
Wonderfully useful tool. Logs GNU+Linux bootup, and produces a picture of the boot process. I saw the 10 sec lag after trying "preload", decided against using it, as a fast boot up is more useful.
Labels: GNU+Linux, Ubuntu
Wednesday, 19 January 2011
Do we need a new "general tax evasion" rule? Would save the need to challenge, and rule out each notional scheme or structure that tax evaders use (loans to employees that never get paid back etc!)
Labels: Tax
http://linux.die.net/man/8/execstack is a useful too, toggling if a program can run code from the stack. Some code will require it, like nested-jumps. Tricky, it needs temp space, only at run-time, so wouldn't make sense to add to .text (program code) section.
Likewise, googled, and see SELinux already has an execheap! Not many cases for needing to execute on the heap.. and avoids malware containing program code overflowing heap.
Labels: programming
Tuesday, 18 January 2011
Ubuntu 10.10 startup timings
Test environment
Vanilla install of Ubuntu 10.10
HW: Acer 3820T, 500GB HDD, 4GB RAM
No swap partition.
Description Timestamp
BIOS: 6 seconds
Login screen: 33 seconds
Functioning desktop (wifi established): 46 seconds
Not that bad, under a minute, but not ideal.
Ubuntu 10.10 uses Grub2. Config file /boot/grub/grub.cfg has some odd things:
menuentry 'Ubuntu, with Linux 2.6.35-24-generic-pae' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod part_msdos
insmod ext2
set root='(hd0,msdos1)'
^^ Why load msdos? or even set the root as msdos. All the other menuentry are the same.
Change the timeout to 1 sec.
Edit /etc/default/grub as root. change to:
GRUB_TIMEOUT=1
Run update-grub to apply the changed setting.
From System->Preferences->Startup Applications -> un-tick the gnome login sound. Likewise for Ubuntu One, Visual Assistance + Update User Folder names to locale.
Next steps, remove packages:
modem
ppp (lots installed packages, only used by a modem)
pcmcia
moving /tmp to RAM in /etc/fstab:
tmpfs /tmp tmpfs defaults,noexec,nosuid 0 0
apt-get --purge remove mono-runtime
Lots more
posts like this
Edit /etc/X11/Xsession.options and comment out #ssh-agent
This is like a ssh keyfob, and not really needed.
Edit /etc/default/avhi-daemon and add:
AVAHI_DAEMON_DETECT_LOCAL=0
AVAHI_DAEMON_START=0
or even apt-get --purge remove avhi-daemon
apt-get --purge remove modemmanager
Labels: Ubuntu
printf %lu or %llu? Use PRIu64!
#include
#include
// Use the PRIu64 to compile down to the right format code for a 64bit type (supports building on both 32bit and 64bit arch)
void myfunc()
{
uint64_t i = 5;
printf ("%" PRIu64 "\n", i);
}Labels: C99, programming
Thursday, 13 January 2011
Firefox unicode fix
Firefox defaults to let pages specify font sizes.. this causes a problem on ubuntu builds that use the real DPI of the display (rather than Windows style fix up based on 96 DPI).
Firefox unicode "Other languages" in the UI for some reason..!
Add to Firefox user.js or about:config to fix:
user_pref("font.minimum-size.x-unicode", 16);
user_pref("font.default.x-unicode", "sans-serif");
user_pref("font.default.x-western", "sans-serif");
user_pref("font.minimum-size.x-western", 16);
Labels: Mozilla
Wednesday, 12 January 2011
Register of Residential and Commercial landlords
Rental property market would be much safer if Residential and Commercial landlords needed to register, and be checked that they are legit annually to retain authority to let!
Scotland already has this
landlord policy, so let's adopt it.
Labels: Property, UK
Sunday, 9 January 2011
jon@facebookmail.com
How long till I can register jon@facebookmail.com !? FB has already registered and set up facebookmail.com.. so it must be coming soon ;-)
Labels: email, facebook
So the Tories have come clean. VAT (regressive tax, that hits everyone equally like a poll tax)
will stay @ 20%.
At the same time, means-tested
50% rate of income tax which comes in only on earnings above the 150k threshold (at least Tories did not put this band up in real-terms for 2011-12 !) is to be scrapped, saving all the rich a lorra lorra tax.
N.B. Remember that the "Employees' primary Class 1 rate" drops from 12% -> 2% on income above the threshold (£42,475) -- baring that in mind, going from (20% IT rate + 12% NI)[thus 32%] -> (40% IT rate + 2% NI)[thus 42%] isn't such a big leap. Likewise when going up to (50% IT rate + 2% NI)[thus 52%]. For more info read
Reform of UK Taxation proposalsLabels: Tax, UK
Ubuntu 10.10 Acer 380T 13" configuration
Set DPI for the display (default is 96dpi)
Screen size is 1366x768 pixels, (11.5 x 6.5 inches). 1366/11.5=118. 768/6.5=118
System->Preferences->Appearance.
Click on Fonts tab.
Click Details
Enter Resolution "118" dots per inch.
This fixes the Gnome desktop, and all application File and Window text sizes (just need to restart applications, or log out and back in)
Firefox uses the value returned by Xorg (check with xdpyinfo). I've not found any of the ways successful to change this. Mozilla
DPI page didn't help.
Felix Miata has a very useful site, check his
browser dpi link (this now reports DPI as 118).
However Firefox still has small fonts. Therefore set dpi in Firefox:
about:config
layout.css.dpi (defaults to -1), change to 118.
It is possbile to start X in the correct DPI, which xdpyinfo will then report:
startx -- -dpi 118
Unfortunately this means removing the gdm login, as that does not allow specification of the DPI!
Better Firefox workaround is to install the
NoSquint add-on and set it to zoom text, but not images. My DPI is 1118, divide that by 96 and I get the zoom level I need (122%)
Labels: DPI, GNU+Linux, Ubuntu
Saturday, 8 January 2011
Ubuntu 10.10
After being an avid Ubuntu Netbook Remix user on my old Compaq 10" 702EA Intel Atom I'm pretty disappointed with what 10.10 is! The simplicity is gone, what made it ideal!
Now on my Acer 13" 3820T I'm appreciating the standard Gnome desktop once more ;)
Labels: GNU+Linux, Ubuntu
sda is apparently in use by the system; it's not safe to run badblocks!
root@ubuntu:~# badblocks -b 4096 -c 512 -s -v -w /dev/sda
/dev/sda is apparently in use by the system; it's not safe to run badblocks!
Checking the output of "mount" I see none of the partitions are mounted. However, using the command "swapon -s" I see the swap partition was in use:
root@ubuntu:~# swapon -s
Filename Type Size Used Priority
/dev/sda5 partition 12285948 0 -1
root@ubuntu:~# swapoff /dev/sda5
root@ubuntu:~# badblocks -b 4096 -c 512 -s -v -w /dev/sda
Checking for bad blocks in read-write mode
From block 0 to 122096645
Testing with pattern 0xaa: 0.32% done, 0:20 elapsed
2.97% done, 3:11 elapsed
Previous log
=======
root@ubuntu:/# mount
aufs on / type aufs (rw)
none on /proc type proc (rw,noexec,nosuid,nodev)
none on /sys type sysfs (rw,noexec,nosuid,nodev)
fusectl on /sys/fs/fuse/connections type fusectl (rw)
none on /dev type devtmpfs (rw,mode=0755)
none on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=
0620)
/dev/sdb1 on /cdrom type vfat
(rw,relatime,fmask=0022,dmask=0022,codepage=cp437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro)
/dev/loop0 on /rofs type squashfs (ro,noatime)
none on /sys/kernel/debug type debugfs (rw)
none on /sys/kernel/security type securityfs (rw)
none on /dev/shm type tmpfs (rw,nosuid,nodev)
tmpfs on /tmp type tmpfs (rw,nosuid,nodev)
none on /var/run type tmpfs (rw,nosuid,mode=0755)
none on /var/lock type tmpfs (rw,noexec,nosuid,nodev)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc
(rw,noexec,nosuid,nodev)
gvfs-fuse-daemon on /home/ubuntu/.gvfs type fuse.gvfs-fuse-daemon
(rw,nosuid,nodev,user=ubuntu)
root@ubuntu:/# badblocks -b 4096 -c 512 -s -v -w /dev/sda
/dev/sda is apparently in use by the system; it's not safe to run badblocks!
Labels: GNU+Linux, Ubuntu
Ubuntu 10.10 partitioning not considered harmful
Just installed Ubuntu 10.10 on my new sweet Acer 3820T ;-)
What is strange, I selected "use whole disc" but Ubuntu has added a Swap partition, and even put it in the extended area (also making it 6GB!). Swap isn't needed these days, especially as the machine has 4GB RAM. Adding it to the extended partition is only going to make the move to EFI boot firmware more difficult:
Device Boot Start End Blocks Id System sda1 * 2048 952197119 476097536 83 Linux sda2 952199166 976771071 12285953 5 Extended sda5 952199168 976771071 12285952 82 Linux swap / SolarisSolution, re-install, after partitioning myself as single sda1 partition ;-)
Don't forget to run
fsck on all new hard drives! better to find out now than 3 months later when files are corrupted or it fails to boot.
Labels: GNU+Linux, Ubuntu
Saturday, 1 January 2011
Big society == open source working?
Is the UK's Big Society simply what free software/open source developers have been doing for the software world for the last 20 years?
Wikipedia donation company Wiki UK Limited accounts overdue
Is the money donated from Wikipedia though Wiki UK Limited likely to be lost if the company were struck off? accounts and return are both overdue according to Companies House:
Next Accounts Due: 05/08/2010 OVERDUE
Last Return Made Up To: 05/11/2009
Next Return Due: 03/12/2010 OVERDUE
Wiki UK Ltd is a not-for-profit Company Limited by Guarantee registered in England and Wales, Registered No. 6741827.
The Registered Office is at 23 Cartwright Way, Nottingham, NG9 1RL, United Kingdom.
I'll hold off making a donation until I hear back from them!
Labels: Wikipedia
Archives
February 2003
March 2003
April 2003
August 2004
September 2004
December 2004
May 2005
June 2005
December 2006
January 2007
February 2007
March 2007
April 2007
July 2007
August 2007
September 2007
October 2007
November 2007
December 2007
January 2008
February 2008
March 2008
April 2008
May 2008
June 2008
July 2008
August 2008
September 2008
October 2008
November 2008
December 2008
January 2009
February 2009
March 2009
April 2009
September 2009
November 2009
December 2009
January 2010
April 2010
September 2010
October 2010
November 2010
December 2010
January 2011
February 2011
March 2011
April 2011
May 2011
June 2011
July 2011
August 2011
September 2011
October 2011
November 2011
December 2011
January 2012
February 2012
March 2012
April 2012
May 2012
June 2012
July 2012
October 2012
December 2012
March 2013
May 2013
August 2013
September 2013
October 2013
November 2013
March 2014
May 2014
June 2014
July 2014
September 2014
October 2014
December 2014
January 2015
February 2015
March 2015
April 2015
May 2015
June 2015
July 2015
August 2015
September 2015
October 2015
November 2015
December 2015
March 2016
April 2016
May 2016
July 2016
August 2016
September 2016
October 2016
November 2016
December 2016
January 2017
February 2017
March 2017
April 2017
May 2017
June 2017
July 2017
August 2017
September 2017
November 2017
March 2018
April 2018
May 2018
June 2018
August 2018
October 2018
December 2018
January 2019
March 2019
May 2019
August 2019
September 2019
March 2020
April 2020
May 2020
September 2020
October 2020
February 2022
June 2022
July 2022
October 2022
December 2022
February 2023
April 2023
September 2023
October 2023
May 2024
June 2024
July 2024
Subscribe to Posts [Atom]