I am intimately familiar with the interaction of light with matter as a result of having been an avid Amateur Telescope Maker [geometricvisions.com] and Amateur Astronomer since the tender age of twelve.
This led to my acceptance to study Astronomy at Caltech in the Fall of 1982, where I was privileged to attend a non-credit class called "Physics X" that was taught by The Immortal Richard Feynman. You could ask him any question you wanted - it didn't have to be about Physics even - but the ensuing discussion had to be purely conceptual. Questions that would require Feynmen to work out equations on the chalkboard were not permitted.
One afternoon I pointed out to him that the phenomenon that light slows down as it passes through a medium just had to be wrong. When one examines any medium at a subatomic scale, it is mostly empty vacuum with some rare particles that have all been either proven or are suspected to be geometric points. (While Protons and Neutrons have a non-zero diameter, they are each composed of three quarks, which themselves are thought to be point particles.)
"Surely," I pointed out to Feynman, "When light passes through all this vacuous space inside a piece of glass, it always travels at precisely C! How could Snell's Law" - which yields the angle of refraction when light passes through the surface of a medium - "possibly be correct!"
I knew damn well that Snell's Law was correct, as Snell himself experimentally demonstrated the law hundreds of years ago. While he did not measure what the Speed of Light had to do with refraction, we have been able to measure light's speed for over a century.
Feynman replied that when light passes through matter, the charged particles in that matter oscillate in sympathy with the oscillations of the light's electomagnetic field. But because they are all in a bound state, and because accellerating charged particles causes them to emit light of their own, thereby carrying away energy and so dampening their sympathetic oscillation, the movements of the charged particles in matter is not quite in phase with the waves in the light passing through the medium.
Feynman concluded, "The light emitted by the charge particles in matter interferes with the light passing through the medium" - that is, wave peaks add to wave peaks, and so with troughs, while peaks and troughs together cancel each other - "so that the resulting combination of light waves only appears to move slower than C."
Thus the Photons are always moving at a constant velocity of C, but all the Photons in the medium interact so that passing a Photon through the medium will result in the exit Photon being delayed from the timing you would expect from when the entrance Photon entered the front surface. They key to understanding all this is that the entrance and exit Photons are NOT THE SAME PHOTON!
Feynman discusses this in a really lucid way, with rigorous mathematics, in Volume II of The Feynman Lectures on Physics. Volume II covers Electricity and Magnetism, Volume I covers Classical Mechanics - Newton's Laws of Motion and such - while the third volume does Quantum Mechanics. The set of three is expensive but are easy to read, even if you don't know much Calculus, and would be a good investment for any Slashdotter.
I was mortally embarrased to realize years later that I had asked Feynman a really basic, purely conceptual question whose completely rigorous answer led to him sharing the 1965 Nobel Prize with Tomanaga of Japan! Their Quantum Electrodynamics describes the interaction of light with electric charge with complete precision.
Feynman's formulation uses a conceptual drawing called a Feynman Diagram as a calculational and explanatory device. I don't know how Tomanaga formulated his Quantum Electrodynamics, but my understanding as that at first no one could understand why the two theories seemed quite different but always yielded the same numerical results. Some time later Freeman Dyson - Esther Dyson's father - published a paper that demonstrated that their two theories were in fact equivalent. I expect that it was Dyson's paper that clinched their Nobel.
Everyone who knew anything about Dick Feynman - not just us Tech students, as he was at Cornell before Caltech - considered him a heaven-sent deity because throughout his life he considered it far more important to teach Physics than to understand it. The Feynman Lectures resulted from a year he spent teaching Freshman Physics. Some of his lectures were filmed; I expect you could buy DVDs, or maybe find them on YouTube.
Over the West entrance of the Dabney Student House at Caltech is an elaborate, fantastical sculpture of Heaven. God's face looks just like Feynman's!
Some of the happiest memories of my whole life are of the times I spent not just being taught by Dick Feynman, but getting to know him as a person. Such an opportunity doesn't come to many. For having had that opportunity I am truly priveliged.
Friday, September 30, 2011
Comment on slashdot about speed of light by MichaelCrawford
Wednesday, September 28, 2011
Friday, September 23, 2011
Neon Indian "Polish Girl"
Neon Indian "Polish Girl" from Dot & Effects on Vimeo.
A Retrospective of Woody Allen Surrogates
If you have liked woody allen movies, you will like this
A Retrospective of Woody Allen Surrogates from FilmDrunkDotCom on Vimeo.
Thursday, September 22, 2011
Mathieu Santos - I Can Hear The Trains Coming
Thin Film Transforms Any Surface Into a Massive Multitouch Screen
It would be good to have both gesture and touch integration for these screens. With larger screens it gets difficult to reach all corners, so a *minority report* style interface and touch interface together could make a great tool.
TOKYO SLO-MODE
TOKYO SLO-MODE from alex lee on Vimeo.
Comment about how current financial system is being run
In Ireland, there were only around 40 or so company directors amongst all the major bank, company and state boards. Most of these were also businessmen, CEOs, or managers. As you can imagine, nest padding was a primary activity. When the state property agency NAMA was created, one of the first acts of the board was to increase the chairman's salary by 70% [www.rte.ie]. I imagine similar outrages occur in the US.
The proper here isn't "doofus factors" or anything to do with individual boards. The problem is that the entire business and governance culture of the western world is no longer functioning properly. It has become mired in corruption, greed, fraud, and mismanagement. Yet still we tolerate crooks and doofuses because seemingly everyone agrees that this is the best way to run things. Our prevalent financial worldviews are unable to explain or understand why things aren't working anymore.
Personally, I feel that a "financial reformation" is needed in our society. Something literally of the magnitude of the Protestant reformation in the 1500s. We need to turn away from the corrupt established church of business and economics and find new business philosophies. We need to find a system which prevents doofuses, grubbers, and psychopaths from running our companies. We need a system in which shareholders are investors instead of gamblers.
We need a new way of doing business, and even of thinking about and understanding business. Otherwise we'll end up with companies like Yahoo, Microsoft, NASA, and Bank of America being run into the ground by directors, managers,and shareholders who at best have no idea what they're doing, and who at worst will actively destroy the company for personal gain.
Another wonderful comment http://tech.slashdot.org/comments.pl?sid=2433280&cid=37432878
What you have just described is the fundamental career philosophy behind the MBA. To state it another way, the default MBA business strategy is: "Ramp up short-term profitability by whatever means is necessary/convenient, regardless of long-term consequences for the company, because by the time those consequences arise, you will have been hired away to work at a different company, at a higher pay grade, and dealing with those consequences will have become somebody else's problem.
The problem for the Western economy is that, ever since the Reagan administration (or the Thatcher administration, or the Mitterand administration, or ... but you get the picture), MBAs have progressively grown in influence to a position of utterly dominating corporate governance in every country outside of China. It is they who are responsible for exporting the bulk of Western industrial production to developing countries, it is they who were responsible for creating and marketing poisonous mortgage-backed derivative securities (and thereby crashing the global economy - a process that is only now reaching its middle, rather than ending), and it is they who dominate corporate boardrooms.
It's not so much that they are psychopaths. It's that they have been trained to be psychopaths by the most prestigious business schools in the Western world. And this all in the name of delivering maximum value to shareholders.
The problem with the MBA philosophy is that the only shareholders that matter - because they are by far the largest shareholders - are institutional shareholders: insurance companies, pension funds, banks, and so on. And these shareholders' investment portfolios are run by - you guessed it - MBAs, who have absolutely no loyalty to anyone or anything except themselves. They'll kick a fundamentally-sound stock to the curb in a heartbeat, so long as their spreadsheets tell them that a company down the block is offering higher short-term profits, regardless of how unsound that new company's long-term outlook might be, because they don't invest for the long term.
Which, incidentally, is why Wall Street and its fraternal counterparts have been experiencing day-to-day mood swings like a bipolar teenager with PMS. In fact, that phenomenon is a result of the MBA-mediated migration to algorithmically-based automated trading systems, which, by intent completely ignore long-term value in favor of short-term gains produced by, essentially, day-trading on a massive scale.
And, short of outlawing MBAs and hanging all existing holders of the degree, I see absolutely zero chance that this utterly broken system that rewards only MBAs will - or, for that matter, can - change for the better any time in the forseeable future.
Wednesday, September 21, 2011
Bill Maher is so funny on this one you have to take your hat
Tuesday, September 20, 2011
The Art of Corporate Mind Control
Just watched this video, not the best but decent. Corporate world currently controls media and lets us know exactly what they want us to know. This is similar to the religion system we had before, religious institutions controlled the content discussed among people, expressing opinions against the religion was prohibited. All the form of communication we are exposed are designed to lead us into believing something that may not be true, it was religion before, now its corporate world. We just gave control form religion -> govt -> corporates.
There are a lot of scenes from *V for Vendetta*, from one of my favourites.
There are a lot of scenes from *V for Vendetta*, from one of my favourites.
How to eat your Apple
How to eat your Apple from Erick Oh on Vimeo.
Are you lucky ?
I must be "lucky" to have noticed this:
http://ca.lifehacker.com/5791032/improve-your-luck-by-relaxing-keeping-an-open-mind-and-paying-attention-to-the-world-around-you?skyline=true&s=i
http://ca.lifehacker.com/5791032/improve-your-luck-by-relaxing-keeping-an-open-mind-and-paying-attention-to-the-world-around-you?skyline=true&s=i
Monday, September 19, 2011
Monday, July 11, 2011
Sharing is inherent to human beings
http://idle.slashdot.org/comments.pl?sid=2311798&cid=36708580
Wednesday, July 6, 2011
Patent prior art validity
One of the comments on slashdot talks about having a review time after a patent is requested. This seems to be good idea, patent office does not really care to check for prior art, so if the request patent is published publicly then anyone who thinks there could be a prior art or it is too obvious can they comment accordingly for the patent.
Sunday, July 3, 2011
Get out of NFS mount hang
When nfs is mounted without 'intr' option, it has the habit of hanging if the server is not responding. This is how the linux NFS works, the kernel continuously keeps retrying the request and does not return.
If the nfs server is down and you fire 'df -h', then it would hang while listing the nfs mount, it won't respond to any signals as it is stuck inside kernel.
The simplest solution is to force umount the mount point
XXX:/tmp # umount -f /tmp/test
But it you just want your hung process to return without removing your mount, then you can just plumb the server ip on the localhost
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
debugfs on /sys/kernel/debug type debugfs (rw)
udev on /dev type tmpfs (rw)
devpts on /dev/pts type devpts (rw,mode=0620,gid=5)
/dev/sda5 on /opt type ext3 (rw,acl,user_xattr)
/dev/sda6 on /var type ext3 (rw,acl,user_xattr)
/dev/sda7 on /tmp type ext3 (rw,acl,user_xattr)
10.10.10.10:/test on /tmp/test type nfs (rw,addr=10.10.10.11)
The simplest way is to plumb the server ip 10.10.10.11 on the localhost that would give the nfs client the impression that is talking to the server. Once you start nfs server on the localhost, it will be able to talk to it and find out that the share is not exported by this server and come out
On the client machine you need to start the NFS service and plumb the server ip
Now any process hanging while reading data from nfs should come out of kernel
If the nfs server is down and you fire 'df -h', then it would hang while listing the nfs mount, it won't respond to any signals as it is stuck inside kernel.
The simplest solution is to force umount the mount point
XXX:/tmp # umount -f /tmp/test
But it you just want your hung process to return without removing your mount, then you can just plumb the server ip on the localhost
XXX:/tmp # df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/sda1 14413312 12154924 1526228 89% /
udev 8187884 336 8187548 1% /dev
/dev/sda5 23711000 5215016 17291516 24% /opt
/dev/sda6 5676464 2786656 2601444 52% /var
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/sda1 14413312 12154924 1526228 89% /
udev 8187884 336 8187548 1% /dev
/dev/sda5 23711000 5215016 17291516 24% /opt
/dev/sda6 5676464 2786656 2601444 52% /var
/dev/sda7 5676464 1496004 3892096 28% /tmp
XXX:/tmp # mount
/dev/sda1 on / type ext3 (rw,acl,user_xattr)proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
debugfs on /sys/kernel/debug type debugfs (rw)
udev on /dev type tmpfs (rw)
devpts on /dev/pts type devpts (rw,mode=0620,gid=5)
/dev/sda5 on /opt type ext3 (rw,acl,user_xattr)
/dev/sda6 on /var type ext3 (rw,acl,user_xattr)
/dev/sda7 on /tmp type ext3 (rw,acl,user_xattr)
10.10.10.10:/test on /tmp/test type nfs (rw,addr=10.10.10.11)
The simplest way is to plumb the server ip 10.10.10.11 on the localhost that would give the nfs client the impression that is talking to the server. Once you start nfs server on the localhost, it will be able to talk to it and find out that the share is not exported by this server and come out
On the client machine you need to start the NFS service and plumb the server ip
XXX:# /etc/init.d/nfs start
XXX:# ifconfig lo:0 10.10.10.11
Now any process hanging while reading data from nfs should come out of kernel
Tuesday, May 24, 2011
Setup RSA SecurID VPN on Nokia N900
This post will highlight the configuration required to setup RSA SecurID software on nokia N900 and use vpnc to authenticate.
Install Java on N900
http://wiki.maemo.org/Java
Java for N900 is available as IcedTea6 in extras or extras-testing.
Install micro-emulator
http://www.nokian900applications.com/install-java-on-nokia-n900/
Install micro-emulator as per above link
Download Microemulator.
Unzip microemulator as root in /opt/: unzip microemulator-2.0.4.zip -d /opt/microemulator/
Install RSA SecurID
http://codehunk.wordpress.com/2010/05/11/rsa-securid-token-on-gnulinux/
$ wget ftp://ftp.rsa.com/pub/agents/j2me/JME23.zip
$ wget ftp://ftp.rsasecurity.com/pub/agents/TokenConverter.tar.gz
$ mkdir securId
$ unzip JME23.zip -d securId/
$ tar -C securId -zxvf TokenConverter.tar.gz
$ cd securId
# Convert your RSA token into required format
$ cp some_directory/token_file.sdtid .
$ chmod +x TokenConverter
$ ./TokenConverter token_file.sdtid -p 'password_you_got_from_admin' -o num_out
$ cat num_out | rev | sed -e :a -e 's/\(.*[0-9]\)\([0-9]\{5\}\)/\1-\2/;ta' | rev
21111-12593-96653-61657-73256-55655-33735-53711-52131-25113-57215-55172-12151-26371-12716-73632-5
# Edit SecurId.jad and add the following lines
X-NumericInput: 21111-12593-96653-61657-73256-55655-33735-53711-52131-25113-57215-55172-12151-26371-12716-73632-5
X-AllowNumericInput: No
$ java -cp /opt/microemulator/microemulator.jar:SecurID.jar org.microemu.app.Main com.rsa.swtoken.j2me.client.SecurID
Enter your PIN and you should get a 8-digit passcode which can be used with vpnc
vpnc can be setup the same as done for desktop linux as in
http://bashingbaru.blogspot.com/2011/05/setup-vpn-using-rsa-securid-software.html
Install Java on N900
http://wiki.maemo.org/Java
Java for N900 is available as IcedTea6 in extras or extras-testing.
Install micro-emulator
http://www.nokian900applications.com/install-java-on-nokia-n900/
Install micro-emulator as per above link
Download Microemulator.
Unzip microemulator as root in /opt/: unzip microemulator-2.0.4.zip -d /opt/microemulator/
Install RSA SecurID
http://codehunk.wordpress.com/2010/05/11/rsa-securid-token-on-gnulinux/
$ wget ftp://ftp.rsa.com/pub/agents/j2me/JME23.zip
$ wget ftp://ftp.rsasecurity.com/pub/agents/TokenConverter.tar.gz
$ mkdir securId
$ unzip JME23.zip -d securId/
$ tar -C securId -zxvf TokenConverter.tar.gz
$ cd securId
# Convert your RSA token into required format
$ cp some_directory/token_file.sdtid .
$ chmod +x TokenConverter
$ ./TokenConverter token_file.sdtid -p 'password_you_got_from_admin' -o num_out
$ cat num_out | rev | sed -e :a -e 's/\(.*[0-9]\)\([0-9]\{5\}\)/\1-\2/;ta' | rev
21111-12593-96653-61657-73256-55655-33735-53711-52131-25113-57215-55172-12151-26371-12716-73632-5
# Edit SecurId.jad and add the following lines
X-NumericInput: 21111-12593-96653-61657-73256-55655-33735-53711-52131-25113-57215-55172-12151-26371-12716-73632-5
X-AllowNumericInput: No
$ java -cp /opt/microemulator/microemulator.jar:SecurID.jar org.microemu.app.Main com.rsa.swtoken.j2me.client.SecurID
Enter your PIN and you should get a 8-digit passcode which can be used with vpnc
vpnc can be setup the same as done for desktop linux as in
http://bashingbaru.blogspot.com/2011/05/setup-vpn-using-rsa-securid-software.html
Monday, May 23, 2011
Ted Talk: Why work doesn't happen at work
Clearly summarises the problem at work places
Saturday, May 21, 2011
rpcbind and portmap on SLES11
SLES11 includes 2 programs, rpcbind and portmap which both provide portmapper functionality. SLES11 contains rpcbind-0.1.6+git20080930-6.15.x86_64.rpm portmap-6.0+git20070716-31.16.x86_64.rpm packages which are supposed to provide portmapper functionality. But while using portmap for portmapper functionality mountd fails to start.
When you start you might see an error, that mound failed to start. If you look at /var/log/messages, you could be seeing
This is because mountd expects to work with rpcbind in SLES11SP1, mountd sees a service on port 111, but cannot register with portmap. It can only register with rpcbind service.
Once you remove portmap and install rpcbind, you should be able to start mountd and nfs using /etc/init.d/nfsserver start
root@sles11sp1-XXX:~# rpm -qa | grep portmap
portmap-6.0+git20070716-31.16
portmap-6.0+git20070716-31.16
root@sles11sp1-XXX:~ # cat /etc/SuSE-release
SUSE Linux Enterprise Server 11 (x86_64)
VERSION = 11
PATCHLEVEL = 1
SUSE Linux Enterprise Server 11 (x86_64)
VERSION = 11
PATCHLEVEL = 1
May 20 05:15:18 sles11sp1-XXX mountd[5703]: unable to register (mountd, 1, udp).
May 20 05:15:53 sles11sp1-XXX mountd[5711]: unable to register (mountd, 1, udp).
May 20 05:15:55 sles11sp1-XXX mountd[5713]: unable to register (mountd, 1, udp).
May 20 05:15:53 sles11sp1-XXX mountd[5711]: unable to register (mountd, 1, udp).
May 20 05:15:55 sles11sp1-XXX mountd[5713]: unable to register (mountd, 1, udp).
root@sles11sp1-XXX:~ # rpm -qa | grep rpcbind
rpcbind-0.1.6+git20080930-6.15
root@sles11sp1-XXX:~ # rpm -qa | grep portmap
root@sles11sp1-XXX:~ #
rpcbind-0.1.6+git20080930-6.15
root@sles11sp1-XXX:~ # rpm -qa | grep portmap
root@sles11sp1-XXX:~ #
Setup VPN using RSA SecurID software Token On Ubuntu
This post will help in configuring RSA SecurID Software Token for use on linux with Cisco VPN client on Ubuntu 10.04
Installing RSA securID software
You should already be having RSA SecurID software Token software and your key file with you.
Install wine on ubuntu if you don't have it yet as
sudo aptitude install wine
Once you have wine installed, you need to configure wine by running
winecfg
Create a new Drive Z: to provide access to either your home directory or to the whole filesystem
Now Install RSA SecurID Software in wine as
wine ./RSA_SecurID_Software_Token_3.0.5.exe
This should install the software, and add a menu item in 'Applications->Wine->Programs'. Run the RSA SecurID software from the menu and import the key.
Installing VPNC
vpnc can be installed from repositories
sudo aptitude install vpnc
If you have your VPN server info as a pcf file, then it needs to be converted into a vpnc format
The above steps would convert the pcf into vpnc format and get it ready for use
Using RSA TokenCode/PassCode with vpnc
Now we need to get vpnc use the token generated by RSA SecurID for authentication. Along with the software token, there is a PIN associated with. Switch RSA to 'Advanced View' and enter PIN and enter PIN there, you should have
When you run vpnc from command line, you need to use 'Current PASSCODE' as your password. It might prompt you for Next passcode in which use the 'Next PASSCODE' as displayed in above image
References
http://www.ubuntugeek.com/how-to-setup-cisco-vpn-using-vpnc-ubuntu-jaunty-9-04.html
http://lists.unix-ag.uni-kl.de/pipermail/vpnc-devel/2009-April/003023.html
http://codehunk.wordpress.com/2010/05/11/rsa-securid-token-on-gnulinux/
Installing RSA securID software
You should already be having RSA SecurID software Token software and your key file with you.
Install wine on ubuntu if you don't have it yet as
sudo aptitude install wine
Once you have wine installed, you need to configure wine by running
winecfg
Create a new Drive Z: to provide access to either your home directory or to the whole filesystem
Now Install RSA SecurID Software in wine as
wine ./RSA_SecurID_Software_Token_3.0.5.exe
This should install the software, and add a menu item in 'Applications->Wine->Programs'. Run the RSA SecurID software from the menu and import the key.
Installing VPNC
vpnc can be installed from repositories
sudo aptitude install vpnc
If you have your VPN server info as a pcf file, then it needs to be converted into a vpnc format
mkdir vpnclient
cd vpnclient
wget http://www.unix-ag.uni-kl.de/~massar/soft/cisco-decrypt.c
sudo apt-get install libgcrypt11-dev
gcc -Wall -o cisco-decrypt cisco-decrypt.c $(libgcrypt-config
--libs --cflags)chmod +x cisco-decrypt
sudo cp cisco-decrypt /usr/bin
wget http://svn.unix-ag.uni-kl.de/vpnc/trunk/pcf2vpnc
sudo cp pcf2vpnc /usr/bin
pcf2vpnc XXX.pcf > XXX.conf
sudo cp XXX.conf /etc/vpnc/
The above steps would convert the pcf into vpnc format and get it ready for use
Using RSA TokenCode/PassCode with vpnc
Now we need to get vpnc use the token generated by RSA SecurID for authentication. Along with the software token, there is a PIN associated with. Switch RSA to 'Advanced View' and enter PIN and enter PIN there, you should have
When you run vpnc from command line, you need to use 'Current PASSCODE' as your password. It might prompt you for Next passcode in which use the 'Next PASSCODE' as displayed in above image
root@XXX:/etc/vpnc# vpnc --xauth-inter XXX
Enter Username and Password.
Passcode for VPN XXX@XXX.XXX.XXX.XXX:
Enter Username and Password.
Passcode for VPN XXX@XXX.XXX.XXX.XXX:
Enter Next PASSCODE:
Passcode for VPN XXX@XXX.XXX.XXX.XXX:
VPNC started in background (pid: 26055)...
root@XXX:/etc/vpnc#
Passcode for VPN XXX@XXX.XXX.XXX.XXX:
VPNC started in background (pid: 26055)...
root@XXX:/etc/vpnc#
References
http://www.ubuntugeek.com/how-to-setup-cisco-vpn-using-vpnc-ubuntu-jaunty-9-04.html
http://lists.unix-ag.uni-kl.de/pipermail/vpnc-devel/2009-April/003023.html
http://codehunk.wordpress.com/2010/05/11/rsa-securid-token-on-gnulinux/
Wednesday, May 18, 2011
How linux mount uses /etc/mtab
From linux man page
To know how mount command uses mtab file can be found by tracing the calls of mount
Finds the current PID, then creates a /etc/mtab~ file. Since there shouldn't be two process with same pid, this should be open the only process which has this file open and even if this process dies and a new mount process is run with the same pid, the new process would be able to use the old file as the 'open' is not called with O_EXCL is not used. Once it ensures that /etc/mtab~1052 has been created using 'open' it goes ahead with set /etc/mtab~ and /etc/mtab~1052 as hard link.
A crash here after creating hard link before 'unlink' of /etc/mtab~ creates problems with mount or umount commands. If a programs dies after creating the file /etc/mtab~, any new mount/umount operations would try to call 'link' which would fail as there is an already /etc/mtab~ file and would assume that somebody is trying to write to the /etc/mtab file.
Rest of the trace for the mount command is
mount will the open the /etc/mtab and append the new mounted filesystem. Removes /etc/mtab~ before exiting.
The programs mount and umount maintain a list of currently mounted filesystems in the file /etc/mtab. If no arguments are given to mount, this list is printed.
When the proc filesystem is mounted (say at /proc), the files /etc/mtab and /proc/mounts have very similar contents. The former has somewhat more information, such as the mount options used, but is not necessarily up-to-date (cf. the -n option below). It is possible to replace /etc/mtab by a symbolic link to /proc/mounts, and especially when you have very large numbers of mounts things will be much faster with that symlink, but some information is lost that way, and in particular using the "user" option will fail.
To know how mount command uses mtab file can be found by tracing the calls of mount
XXX:~ # strace mount -o loop ubuntu-10.04.2-desktop-amd64.iso temp_mount
would generate output of the all system calls that the mount command made
stat("ubuntu-10.04.2-desktop-amd64.iso", {st_mode=S_IFREG|0644, st_size=721129472, ...}) = 0
getcwd("/home/XXX", 4095) = 15
readlink("/home/XXX/ubuntu-10.04.2-desktop-amd64.iso", 0x7fff11803d10, 4096) = -1 EINVAL (Invalid argument)
getcwd("/home/XXX", 4095) = 10
readlink("/home/XXX/temp_mount", 0x7fff11803a40, 4096) = -1 EINVAL (Invalid argument)Checks if the given path is a softlink, then does verification from mtab if a mount has been done already. stat("/sbin/mount.iso9660", 0x7fff118048c0) = -1 ENOENT (No such file or directory)
mount("/dev/loop0", "temp_mount", "iso9660", MS_MGC_VAL, NULL) = 0
readlink("/dev", 0x7fff11803a40, 4096) = -1 EINVAL (Invalid argument)
readlink("/dev/loop0", 0x7fff11803a40, 4096) = -1 EINVAL (Invalid argument)
getcwd("/home/XXX", 4095) = 10
readlink("/home/XXX/temp_mount", 0x7fff11803a40, 4096) = -1 EINVAL (Invalid argument)
lstat("/etc/mtab", {st_mode=S_IFREG|0644, st_size=795, ...}) = 0
read_link("/home/XXX/temp_mount", 0x7fff11803a40, 4096) = -1 EINVAL (Invalid argument)Checks the filesystem type and gets ready to call the corresponding filesystem mount commandgetpid() = 1052
open("/etc/mtab~1052", O_WRONLY|O_CREAT, 0600) = 3
close(3) = 0
link("/etc/mtab~1052", "/etc/mtab~") = 0
open("/etc/mtab~", O_WRONLY) = 3
fcntl(3, F_SETLK, {type=F_WRLCK, whence=SEEK_SET, start=0, len=0}) = 0
unlink("/etc/mtab~1052") = 0
umask(077) = 022
open("/etc/mtab", O_RDWR|O_CREAT|O_APPEND, 0666) = 5
umask(022) = 077Finds the current PID, then creates a /etc/mtab~
A crash here after creating hard link before 'unlink' of /etc/mtab~ creates problems with mount or umount commands. If a programs dies after creating the file /etc/mtab~, any new mount/umount operations would try to call 'link' which would fail as there is an already /etc/mtab~ file and would assume that somebody is trying to write to the /etc/mtab file.
Rest of the trace for the mount command is
open("/etc/mtab", O_RDWR|O_CREAT|O_APPEND, 0666) = 5
umask(022) = 077
fstat(5, {st_mode=S_IFREG|0644, st_size=795, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f7a6819a000
fstat(5, {st_mode=S_IFREG|0644, st_size=795, ...}) = 0
lseek(5, 0, SEEK_SET) = 0
read(5, "/dev/sda6 / ext3 rw,errors=remou"..., 795) = 795
write(5, "/dev/loop0 /home/XXX/temp_m"..., 52) = 52
close(5) = 0
munmap(0x7f7a6819a000, 4096) = 0
close(3) = 0
unlink("/etc/mtab~") = 0mount will the open the /etc/mtab and append the new mounted filesystem. Removes /etc/mtab~ before exiting.
Tuesday, May 17, 2011
Build a single kernel module form source tree
make -C /lib/modules/$(KVERSION)/build M=$(PWD) modules
Thursday, May 12, 2011
Tivoization
| Tivoization refers to the configuring by the manufacturer or vendor of a digital electronic product that uses free software so that the product will operate only with a specific version of such software. Although the concept can initially seem very simple and innocuous, a closer look shows that it could have important implications for the future of free software and for the computer industry as a whole. http://www.linfo.org/tivoization.html |
Tuesday, May 10, 2011
rpcbind port conflict with statd no SLES 11
In sles11 portmap has been replaced with rpcbind, which provides additional features like IPv6 and nfsv4 support. By default like portmap, rpcbind listens on port 111. But rpcbind also uses an additional UDP port that it always keeps open and blocked.
Output for portmap on older SLES version
Output for rpcbind on SLES11
rpcbind uses an additional UDP port, in this case it is port 690. Unfortunately there is no way to control on which port rpcbind will get when it requests a free UDP port.
On a typical NFS server mountd/nfsd/statd are configured to start on specified ports, this is to assist in configuring the firewall. On our machines, statd was configured to start on port 690, but as rpcbind was started before statd, statd could not start with error 'address already in use'
This happens occasionally during reboots, when rpcbind acquires the same port on which statd was configured to start. Since this is a UDP port, it does not show up in 'netstat' and will only show up in lsof
Output for portmap on older SLES version
XXX:~ # lsof -p 4046 COMMAND PID USER FD TYPE DEVICE SIZE NODE NAME portmap 4046 nobody cwd DIR 8,1 24576 2 / portmap 4046 nobody rtd DIR 8,1 24576 2 / portmap 4046 nobody txt REG 8,1 17568 687066 /sbin/portmap portmap 4046 nobody mem REG 8,1 132847 1733314 /lib64/ld-2.4.so portmap 4046 nobody mem REG 8,1 36736 1733389 /lib64/libwrap.so.0.7.6 portmap 4046 nobody mem REG 8,1 14646 1733355 /lib64/libutil-2.4.so portmap 4046 nobody mem REG 8,1 1570331 1733321 /lib64/libc-2.4.so portmap 4046 nobody mem REG 0,0 0 [heap] (stat: No such file or directory) portmap 4046 nobody 0u CHR 1,3 3763 /dev/null portmap 4046 nobody 1u CHR 1,3 3763 /dev/null portmap 4046 nobody 2u CHR 1,3 3763 /dev/null portmap 4046 nobody 3u IPv4 13208 UDP *:sunrpc portmap 4046 nobody 4u IPv4 13220 TCP *:sunrpc (LISTEN) XXX:~ #
Output for rpcbind on SLES11
XXX:~ # lsof -p 9909 COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME rpcbind 9909 root cwd DIR 8,1 4096 2 / rpcbind 9909 root rtd DIR 8,1 4096 2 / rpcbind 9909 root txt REG 8,1 56536 6185085 /sbin/rpcbind rpcbind 9909 root mem REG 8,1 61467 7405594 /lib64/libnss_files-2.11.1.so rpcbind 9909 root mem REG 8,1 19114 7405583 /lib64/libdl-2.11.1.so rpcbind 9909 root mem REG 8,1 39712 7405649 /lib64/libgssglue.so.1.0.0 rpcbind 9909 root mem REG 8,1 108213 7405588 /lib64/libnsl-2.11.1.so rpcbind 9909 root mem REG 8,1 1661454 7405577 /lib64/libc-2.11.1.so rpcbind 9909 root mem REG 8,1 135646 7405603 /lib64/libpthread-2.11.1.so rpcbind 9909 root mem REG 8,1 160248 7405669 /lib64/libtirpc.so.1.0.10 rpcbind 9909 root mem REG 8,1 42016 7405618 /lib64/libwrap.so.0.7.6 rpcbind 9909 root mem REG 8,1 149797 7405570 /lib64/ld-2.11.1.so rpcbind 9909 root 0u CHR 1,3 0t0 2376 /dev/null rpcbind 9909 root 1u CHR 1,3 0t0 2376 /dev/null rpcbind 9909 root 2u CHR 1,3 0t0 2376 /dev/null rpcbind 9909 root 3r REG 8,6 0 563076 /var/run/rpcbind.lock rpcbind 9909 root 4u sock 0,6 0t0 18570 can't identify protocol rpcbind 9909 root 5u unix 0xffff88042b8b63c0 0t0 18543 /var/run/rpcbind.sock rpcbind 9909 root 6u IPv4 18545 0t0 UDP *:sunrpc rpcbind 9909 root 7u IPv4 18549 0t0 UDP *:690 rpcbind 9909 root 8u IPv4 18550 0t0 TCP *:sunrpc (LISTEN) rpcbind 9909 root 9u IPv6 18552 0t0 UDP *:sunrpc rpcbind 9909 root 10u IPv6 18554 0t0 UDP *:690 rpcbind 9909 root 11u IPv6 18555 0t0 TCP *:sunrpc (LISTEN) XXX:~ #
rpcbind uses an additional UDP port, in this case it is port 690. Unfortunately there is no way to control on which port rpcbind will get when it requests a free UDP port.
On a typical NFS server mountd/nfsd/statd are configured to start on specified ports, this is to assist in configuring the firewall. On our machines, statd was configured to start on port 690, but as rpcbind was started before statd, statd could not start with error 'address already in use'
XXX:~ # grep statd /var/log/messages | tail -10
2011 May 10 11:45:38 XXX_01 rpc.statd[27766]: Version 1.2.1 Starting 2011 May 10 11:45:38 XXX_01 rpc.statd[27766]: Could not bind name to socket: Address already in use
This happens occasionally during reboots, when rpcbind acquires the same port on which statd was configured to start. Since this is a UDP port, it does not show up in 'netstat' and will only show up in lsof
XXX:~ # netstat -atn | grep 690 XXX:~ #
Friday, May 6, 2011
Mplayer shortcuts on nokia N900
Nokia N900 has limited of keys in its keyboard. Some of the special characters like '[' and ']' are missing from the keyboard. While using mplayer '[' and ']' are used to increase/decrease the speed of the video.
As these keys are missing from the keyboard, you can re-map increase/decrease speed functionality to other keys by having a custom input.conf file. A sample input.conf to re-map increase/decrease speed to '(' and ')'
As these keys are missing from the keyboard, you can re-map increase/decrease speed functionality to other keys by having a custom input.conf file. A sample input.conf to re-map increase/decrease speed to '(' and ')'
( speed_mult 0.9091 # scale playback speed
) speed_mult 1.1
Tuesday, April 12, 2011
Accessing VMware Server 2 using VMware vSphere client
Though vmware does not support accessing vmware server using VI client, it does work with some limitations. I like vmware server, so i don't have dedicate the server ESXi, this lets you the server for other tasks. Unfortunately the vmware server will run out of support, and it is unlikely that vmware would spend resources to try to make the vmware server GUI any better. Here is how to access to vmware server using vSphere client
Note: You will not able to edit settings of a VM from VI client, you would able to view the VM, do poweron/off operations and view the guest Console.
1. Download VMware vSphere client from vmware site. The version of the software that was tried out is VMware-viclient-all-4-1.0-258902
2. Install the vSphere client on a windows machine
3. Run the vSphere client, and specify IP as full http URL that is used to access vmware server web console like, https://10.209.106.15:8333 and username and password for vmware server access
4. You should see a installer prompt to install compatible client support clients, run the installer, which will restart the vSphere client
5. After vSphere client restarts, enter the vmware server name again and accept the security warning
6. You should now be able to see the vmware server host in vSphere client. You can do poweron/off operations on any of the virtual machines, but you might not be able to edit settings of the virtual machines. VMware should complain about incompatible version. You will able to see the guest console by going to the 'Console' tab. http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1008180 provides vmware comment on this issue
Note: You will not able to edit settings of a VM from VI client, you would able to view the VM, do poweron/off operations and view the guest Console.
1. Download VMware vSphere client from vmware site. The version of the software that was tried out is VMware-viclient-all-4-1.0-258902
2. Install the vSphere client on a windows machine
3. Run the vSphere client, and specify IP as full http URL that is used to access vmware server web console like, https://10.209.106.15:8333 and username and password for vmware server access
4. You should see a installer prompt to install compatible client support clients, run the installer, which will restart the vSphere client
5. After vSphere client restarts, enter the vmware server name again and accept the security warning
6. You should now be able to see the vmware server host in vSphere client. You can do poweron/off operations on any of the virtual machines, but you might not be able to edit settings of the virtual machines. VMware should complain about incompatible version. You will able to see the guest console by going to the 'Console' tab. http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1008180 provides vmware comment on this issue
Subscribe to:
Posts (Atom)







