The most simple-minded way of doing this would be
ls "* *"
but this would not work. This site notes the way to do it - with find:
find ~ -name '* *'
And also lists a neat way of looping through,
find ~ -name '* *' while read FILE;
do
echo $FILE ;
done
The problem is that this lists files in non-alphabetical order. To get it in alphabetical order, The Alphabetizer is available for one-time jobs like my php suggest list. For piping in bash, of course, we can use sort:
find ~ -name '* *' | sort
Mostly work related stuff which I would've entered into my "Log book". Instead of hosting it on an intranet site, outsourcing the hosting to blogger!
Tuesday, June 29, 2010
Friday, June 18, 2010
uploading files to web hosting
Got a DreamHost account, evaluating a move there. Preliminary tests with downloads alone. Initially copied files using ftp from our local machine. Then tried sftp from local machine. Finally the fastest way, sftp from our dedicated server - more than 10 Mbps. Some files which were not present on our local machine had to be selectively uploaded. For that, did the following.
ls /local/audio24 > 24.txt
ls /local/audio96 > 96.txt
diff -Bc 24.txt 96.txt > difference.txt
cat difference.txt grep + > onlynot.txt
onlynot.txt thus has only the files in audio96 which are not in audio24
Used this list to make a sftp batch file - find replace + with put, and put the filenames in quotes.
Had to modify it to
-put "filename.mp3"
because without the hyphen in the front, sftp would stop if any of the files were not found.
ls /local/audio24 > 24.txt
ls /local/audio96 > 96.txt
diff -Bc 24.txt 96.txt > difference.txt
cat difference.txt grep + > onlynot.txt
onlynot.txt thus has only the files in audio96 which are not in audio24
Used this list to make a sftp batch file - find replace + with put, and put the filenames in quotes.
Had to modify it to
-put "filename.mp3"
because without the hyphen in the front, sftp would stop if any of the files were not found.
CDN roundup
Did a review of hosting solutions for upcoming events. Birthday videos etc would need CDNs. Here is an abbreviated review, with cost being the major criterion, good support also being required.
SimpleCDN - $0.02 per GB - but no response to Moderate ticket in 3 days, hence can't risk it.
CloudFront - $0.15 per GB
Velocix - did not even send a quote in three days.
Voxel - $0.10 per GB, quick and responsive support, free trial.
EdgeCast - sent a quote for $0.30 per GB at 2000 GB per month
Internap - sent a quote for Los Angeles POP alone for $0.25 per GB, else $1.32 per GB...
SoftLayer - $0.18 to $0.12 per GB (minimum $45)
CDNetworks - sent a quote for $1.00 per GB.
You can guess who we picked.
Edit: An update to this post is at http://hnsws.blogspot.com/2011/12/more-cdns.html
SimpleCDN - $0.02 per GB - but no response to Moderate ticket in 3 days, hence can't risk it.
CloudFront - $0.15 per GB
Velocix - did not even send a quote in three days.
Voxel - $0.10 per GB, quick and responsive support, free trial.
EdgeCast - sent a quote for $0.30 per GB at 2000 GB per month
Internap - sent a quote for Los Angeles POP alone for $0.25 per GB, else $1.32 per GB...
SoftLayer - $0.18 to $0.12 per GB (minimum $45)
CDNetworks - sent a quote for $1.00 per GB.
You can guess who we picked.
Edit: An update to this post is at http://hnsws.blogspot.com/2011/12/more-cdns.html
Thursday, June 17, 2010
first show with new compressors
As mentioned in my previous post, the new air-cooled compressors had some issues, but after changing their location, seem to be OK. But they do take more power. From an old log reading in 1998 log book of a 2009 reading (yes - 1998 book, 2009 reading) the old system had taken 75 kWhr for 9.45 am to 12.15 pm. Today's consumption was 90 kWhr for 9.55 am to 12 noon. And that too with two of the compressors going off briefly when their thermostats reached the set temperatures. Thermostats were set to 22.5-25-27.5 deg C. The theatre was less frigid than before. Hopefully when the outside temp is higher also we will have similar results. Today outside was just 30 deg C.
Wednesday, June 16, 2010
method to link directly to "listen now'
Following the method given at JGuru and other places, here is something I passed on to my colleagues:
<form method="post" name="submitForm" action="http://www.radiosai.org/program/PlayNow.php">The fids and allfids values will change for different programs. This 22346 value is meant for this link, ie Judy/Sharon Sandweiss interview. For other programs, you can find the fid by searching for the program in our search page, choosing the Listen link after choosing the program of interest, and seeing the code in the PlayNow.php page. For example, for this item, it has the line
<input value="on" type="hidden" name="checkallcb">
<input value="on" type="hidden" name="chosencb">
<input value="22346" type="hidden" name="fids">
<input value="22346" type="hidden" name="allfids">
<input value="1" type="hidden" name="play">
<input value="0" type="hidden" name="paHours">
<input value="0" type="hidden" name="paMinutes">
<a href="javascript:document.submitForm.submit()">Click Here to Play Now</a>
</form>
s1.addVariable("file","http%3A%2F%2Fwww.radiosai.org%2Fprogram%2FPlayList.php%3Fallfids%3D22346");
Wednesday, June 09, 2010
fixing the compressors
The AC guys are here to fix the compressor trouble. Now planning to keep two of them on the first-floor parapet and only one downstairs. Temperature readings with a room thermometer kept horizontally: before we started the test, room temperature indoors was 32 deg C. After putting on one of the compressors (and the blowers) the temp near the window was 41 deg C. The theatre was being barely cooled down to 30 deg C. But at least the compressor did not trip. When we opened the windows, the temp near the window quickly dropped to 33 deg C, indicating that indeed there is an air circulation problem. Hope the two feet clearance between units upstairs will be enough! PR has some ideas of baffle walls to prevent hot air being sucked into the rear inlets, too. Hopefully with all that and all three compressors running, we can get the theatre cooled.
One more issue is with the electrical connections. The starters used and the cables used are all getting heated up with the 22 amps per phase being drawn. And that's just for one compressor! If this is normal, then these compressors are less efficient than our old ones, which used to take around 35 amps each - and we used to run only one of them at a time.
One more issue is with the electrical connections. The starters used and the cables used are all getting heated up with the 22 amps per phase being drawn. And that's just for one compressor! If this is normal, then these compressors are less efficient than our old ones, which used to take around 35 amps each - and we used to run only one of them at a time.
Wednesday, June 02, 2010
Attenuation required
Taking the direct outs from the PA system mixer Mackie Onyx 32.4, found that they are too hot for the XLR inputs of the Tascam US-1641. D made attenuators for me like below:
Only it was not to ground, but to signal return. Checking out the specs in the manual, found that input impedance for the XLR input is 2.2k ohm and for the jack is 10k ohm. So, made the voltage divider circuit above, with a 10k resistor on top, and a 2k below. For the XLR connector, the connection was like
Only it was not to ground, but to signal return. Checking out the specs in the manual, found that input impedance for the XLR input is 2.2k ohm and for the jack is 10k ohm. So, made the voltage divider circuit above, with a 10k resistor on top, and a 2k below. For the XLR connector, the connection was like red wire --- 10k resistor --- pin 2 ---- 2k resistor ---- pin 3.Later, found similar pad circuits with pix of XLR connectors with resistors soldered in. With the attenuation, which turned out to be around 20 dB, the direct outs are fine for the Tascam US-1641, with around 6-10 dB of headroom. Here, what I mean by headroom is that the peak level reaches -10 dB or so when the Mackie direct-out is at its highest level, when the input gain control at the Tascam is turned all the way down.
compressor problems
The new compressors were installed in the second week of May, but apparently they trip within ten minutes due to overheating. 3x 11 ton units from Voltas. The AC guys are supposed to come and do something about it this month. According to a random google search, 8 feet clearance between units seems to be required. But that is for a completely unrelated product....
google spreadsheets and UI design
Multiple ways of accomplishing the same thing is GOOD. Example of a place where this is done - Reaper. Example of where this is not done - Google Spreadsheets. I wanted to "Merge cells" - had to google search for it to find it is done with a toolbar button. The Merge Cells idea came in the first place from K, who is more familiar with Excel...
Monday, May 31, 2010
the sad story of Mandir mixers
After the Yamaha AW4416 went for repairs and came back in the same state, it was the turn of the Tascam TM-D4000 to give problems. Then I shifted to lower-tech - an old Studiomaster Diamond Pro. The Yamaha had Midi working, so I tried to use it in Mandir. Reaper had a good solution for the "PFL" problem with soft-mixers - Cubase 4 LE only had solo, which was going into the main mix also, and Nuendo 3.0.2 did not have the "Listen" button assignable to a MIDI controller. With Reaper, I could make a custom action to mute the monitor tracks, and the monitor tracks were being sent feeds from the main mix tracks. The main mix goes to main out, monitor mix goes to monitor out as a folder. So far so good. But then, once everything was set up, the Yamaha just died. Not powering up at all. Researched and found the Tascam TM-D4000 is capable of acting as a midi controller for faders alone. But it would not physically fit into the current rack! So now I'm looking for a low cost (used?) midi controller, preferably with 16 faders and buttons like the Peavey 1600x or the Korg Nanokontrol. And of course, my flash drive also failed...
Sunday, May 23, 2010
death of a USB flash drive
The Transcend JF220 finally gave up the ghost. After all, it was being used every day. Putting it in Linux or Windows showed an unpartitioned free space. I suppose the partition table got wiped. Tried Recuva as the first step. It could not read. Then tried formatting. Windows complained that it was write-protected - 'Windows was unable to complete the format' and 'The drive cannot be formatted'. Tried various tips for getting over that by registry edits. Did not work. Tried formatting in Linux, gparted complained that it could not write the disk label. Tried wiping the first and last bytes as in the script at itrc.hp.com by doing
sfdisk -smanually and then using that number in
off_t=`sfdisk -s $1`Still no go - the dd took a long time and then said completed, but apparently it was failing. Tried Transcend's own repartition tool from transcendusa.com, that also failed. Concluding that it was a hardware failure.
(( off_t = off_t - 1024 ))
echo "Zap the first megabyte of the device."
echoeval "dd if=/dev/zero of=$1 bs=1k count=1024"
echo "Zap the last megabyte of the device."
echoeval "dd if=/dev/zero of=$1 bs=1k count=1024 seek=$off_t"
Friday, May 07, 2010
streaming over GPRS
RK had complained about buffering in the stream while listening with GPRS. He was using Virtual Radio on an LG Viewty. Tried with TCPMP on my phone with buffer settings as shown.

It played for 5 minutes or so after buffering for half a minute. Then buffered for 3 minutes and played for 7 minutes. So, clearly, network is not fast enough. Downloaded a file from stream.radiosai.org - 5.5 minute file, 976 kB, came through in six minutes. So, I'm getting a throughput of slightly under 24 kbps.... If I remember correctly, I got double that at Bangalore, downloading google maps on the mobile, 1.28 MB, in 3 minutes. Both RK and I are using Airtel, by the way. Airtel customer care tells me that they do not have EDGE anywhere in AP. Bangalore is clearly on EDGE.
Wednesday, April 28, 2010
making conference calls
Found that my Tata Indicom Haier C2030 can't not make conference calls tho' the manual says press Send button after dialling the second number. Probably blocked by Tata. With the Airtel connection on the QTEK 9100, the procedure is
- Make 1st call
- Hold
- Make second call
- Menu -> Conference.
Thursday, April 22, 2010
google maps for mobile
GMaps crashed on the mobile with error message Internal Error: c:\workspaces\gmm-4-0-branch\googlemobile\src\cpp\googlenav\common\resource_loader.cpp:13
This was probably due to me deleting some of the google maps stuff in application data, in order to free up space. There are quite a few people with this problem - ...resource_loader.cpp:13 internal error
Reinstalling gave the same error. Then tried removing old install, then manually deleting files in Program Files and Application Data, then reinstalling. This time it worked. And the new version has voice search enabled!
This was probably due to me deleting some of the google maps stuff in application data, in order to free up space. There are quite a few people with this problem - ...resource_loader.cpp:13 internal error
Reinstalling gave the same error. Then tried removing old install, then manually deleting files in Program Files and Application Data, then reinstalling. This time it worked. And the new version has voice search enabled!
yet another twist in the tale
The possible solution noted before seemed to work with no problems over the last two weeks. But P noted that earlier, the downloads had the path to D: hard-coded into the asp, so the files in D: were being accessed though IIS pointed to E:. This might have led to the earlier problems, he said. To test this out, we put back the 4 GB of stuff to the playout folder in E: - and the streams continued to work fine. Now we have deleted the stuff in D:, and that drive is pending a Scandisk. But that needs a reboot, so probably we'll keep it pending. Or maybe we can move all the data to E: and do it without a reboot - will think about it.
Friday, April 16, 2010
possible solution to streaming problems
Remembered A telling me that there could be performance issues if too many files are in the same folder. Moved out 600+ files, 4 GB+, to another folder. After that, the streams seem to have stabilized, playing out from E drive. Now I have enabled the Radiosai downloads also, all seems fine. We'll work out some mechanism to avoid this from happening again as we add files. Some sort of directory hierarchy.
Tuesday, April 13, 2010
ngpay and Java midlets on my phone
My previous post was "under controlled conditions. Finally in a crunch situation, ngpay let me down. Not really ngpay's fault, I should add. This is what happened: At 8 o'clock, had to book a tatkal ticket. The irctc.co.in website was crawling, since thousands of people all over the country would be trying the same thing. Hopped on to ngpay over wifi on my phone. Connected very nicely, got through to the payment page. But.... The HDFC bank password kept getting rejected. Known issue with midlets on this phone, at least I have seen it often with Opera Mini - the shift key or function key appear to get activated on their own. On a normal text field, this can be corrected. But on a password field, can't do much, since only **** is seen. Now I've added my credit card to the ngpay wallet. Maybe with that, I can avoid this issue. Another way out would be to use MyMobiler, like I did last time. MyMobiler can connect over wifi too, so I should test it out.
Edit: April 22 - Did try MyMobiler, did connect over wifi fine. Another solution when without a PC - using the Phone Pad input method.
Then, the passwords etc are visible in clear text before you enter them.
Tuesday, April 06, 2010
problems with streaming - hard disk usage
Our streams had problems, as noted before. IIS was a possible culprit, with our own download service being the prime suspect. Limiting number of connections per IP address seemed a possible way out. But IIS does not have a mechanism to do that - only global total number of connections can be limited. The disk from which the audio files were being taken seemed highly fragmented - maybe because of all these small files? Anyway, wanted to try defragmenting it. So, copied all to another volume on another drive. Copied using RichCopy to minimize disruptions during the process, with

No problem with the streams while the copy went on. A minor issue when the playout was restarted, the temp audio files could not be overwritten by colinux. Had to manually delete them from Windows.
But after shifting playout to the new volume, again the skipping re-occured in a couple of hours! So, there is some system-wide hard disk usage? The first reaction was to shut down IIS by stopping the websites one by one. That did not solve the problem - at least, it did not reflect in any reduction in the hard disk usage with Performance Monitor as given in my previous post.
Investigating with the tips given on these pages, to identify the process which uses large amount of disk usage by checking out Task Manager, Start -> Run -> taskmgr, looking for processes with rapidly changing values for I/O Read Bytes and I/O Write Bytes and later using Process Monitor to view files accessed by that process. csrss.exe seems to be the process using the filesystem to some extent - Client Server Runtime Subsystem. But it does not display excess CPU utilization as noted here. This forum post notes a similar hard disk issue with csrss. Or maybe there is some process which we did not catch in time. Will keep investigating.
- trickle
- serialize disk access
- single thread only
- system buffer disable

No problem with the streams while the copy went on. A minor issue when the playout was restarted, the temp audio files could not be overwritten by colinux. Had to manually delete them from Windows.
But after shifting playout to the new volume, again the skipping re-occured in a couple of hours! So, there is some system-wide hard disk usage? The first reaction was to shut down IIS by stopping the websites one by one. That did not solve the problem - at least, it did not reflect in any reduction in the hard disk usage with Performance Monitor as given in my previous post.
Investigating with the tips given on these pages, to identify the process which uses large amount of disk usage by checking out Task Manager, Start -> Run -> taskmgr, looking for processes with rapidly changing values for I/O Read Bytes and I/O Write Bytes and later using Process Monitor to view files accessed by that process. csrss.exe seems to be the process using the filesystem to some extent - Client Server Runtime Subsystem. But it does not display excess CPU utilization as noted here. This forum post notes a similar hard disk issue with csrss. Or maybe there is some process which we did not catch in time. Will keep investigating.
revisiting internet banking from mobile
In my earlier post, I'd described failure of IE mobile and Opera Mini. This time, Skyfire worked with HDFC bank. It still doesn't work with Canara bank and SBI. Of course, it goes through Skyfire's servers, but so does Opera Mini, so hopefully it is as safe as it's privacy policy states. Skyfire drinks bandwidth, so feasible only on an unlimited plan or for emergencies.
Monday, April 05, 2010
ngpay and mchek
Tried out these mobile payment solutions first with the new credit card. mchek has the disadvantage of having only Airtel recharge as the USP. Can't recharge other operators' mobiles if your operator is Airtel! ngpay's USP for me is KSRTC booking. Even when KSRTC's AWATAR system is down, which is often, ngpay works. But ngpay does not have Airtel recharge for AP circle or All India, though the menu item exists. Navigating ngpay is a pain because of the QTEK 9100 mobile's terrible touch screen. Much easier to do it by tethering it to a PC and using MyMobiler.
mchek registration had some hiccups, since the registration is followed by a card number verification which requires a popup. The first time I enabled the popup, had to retry. And on retrying so quickly, I think the card processing back end would have refused the connection, and hence returned "Invalid card". I thought this was because the card was earlier registered with my Tata number. Customer care assured me that the earlier unsubscribe was effected. Anyway, waiting for some time - 15 minutes - and retrying - solved the issue.
mchek registration had some hiccups, since the registration is followed by a card number verification which requires a popup. The first time I enabled the popup, had to retry. And on retrying so quickly, I think the card processing back end would have refused the connection, and hence returned "Invalid card". I thought this was because the card was earlier registered with my Tata number. Customer care assured me that the earlier unsubscribe was effected. Anyway, waiting for some time - 15 minutes - and retrying - solved the issue.
Subscribe to:
Posts (Atom)
