Wikipedia:Reference desk/Archives/Computing/2011 November 11

From Wikipedia, the free encyclopedia
Computing desk
< November 10 << Oct | November | Dec >> November 12 >
Welcome to the Wikipedia Computing Reference Desk Archives
The page you are currently viewing is an archive page. While you can leave answers for any questions shown below, please ask new questions on one of the current reference desk pages.


November 11[edit]

MySQL[edit]

how to calculate the total number of disk writes by MySQL --nijil (talk) 11:51, 11 November 2011 (UTC)[reply]

You want to enable BLOCK IO profiling -- Finlay McWalterTalk 14:19, 11 November 2011 (UTC)[reply]
I want to print the total number of disk writes by MySQL using a c++ program.That's only time I am accessing mysql.--nijil (talk) 05:08, 12 November 2011 (UTC)[reply]
So write a c++ program that enables IO profiling and that later retrieves the profile information, as described in that article. -- Finlay McWalterTalk 07:26, 12 November 2011 (UTC)[reply]

When to change an HDD?[edit]

It´s clear that you won´t wait until it fails, but how long can you use an HDD before it fails? — Preceding unsigned comment added by 80.39.16.11 (talk) 20:55, 11 November 2011 (UTC)[reply]

That depends. Could be an hour after you start using it, could be twenty years. Depends on the the standards the engineers were trying to achieve, and the conditions the drive actually lives in. Keep an on eye on the temps and the SMART warning metrics with a program like SpeedFan, and you might have a better idea of when your drives are about to fail. On the other hand, you might lose a drive without the SMART stats ever climbing to the point where you get a warning. RAID or backups are the only way to be (mostly) safe. Nevard (talk) 22:06, 11 November 2011 (UTC)[reply]
This is non-scientific, but in my experience when it starts to make odd/loud clicking noises, then it's approaching end of life (ok so there is a technical reason for this but the OP can research that). Get a full backup done and run some diagnostic tests on that drive. Don't use it for future valuable data. Sandman30s (talk) 22:46, 11 November 2011 (UTC)[reply]
I have never seen a hard drive failing after 1 hour. I suppose the QA process will take care of such poorly assemble device. I don't remember the exact number of hours, but I suppose it was something like 50,000 working hours. 88.14.195.138 (talk) 22:47, 11 November 2011 (UTC)[reply]
It's very common for a failure to occur early in the product's life. We have an article on bathtub curve, burn-in - but surprisingly not infant mortality (in the industrial-engineering sense of the word). It's a well-known empirical fact that an overwhelming percentage of system-failures occur during the first few hours of use; mass-production facilities therefore test and remove infant mortality unit failures long before they hit the retail shelves. Nimur (talk) 00:15, 12 November 2011 (UTC)[reply]
That would explain why I, as a user, never have had a failure of any device in the first hours of use. I suppose that even unknown companies test their products a little, so the devices are running their first risky hours at the factory and get shed out there. Maybe these are the refurbished products that you can buy at shabby online shops. 88.14.195.138 (talk) 01:19, 12 November 2011 (UTC)[reply]
Particularly with magnetic HDs failure early on can also be caused by improperly transported HDs whether by the supplier or retailer. Nil Einne (talk) 13:47, 13 November 2011 (UTC)[reply]

Given that you should have a backup system, yes, until it fails (or begins failing to the point that it's annoying you or making some part of your system too inefficient). ¦ Reisio (talk) 23:45, 11 November 2011 (UTC)[reply]

Backups are not good enough, since some data could get lost and some people or businesses cannot afford to lose some data. 88.14.195.138 (talk) 01:22, 12 November 2011 (UTC)[reply]
I'm honestly trying to be polite here, but if your backup doesn't contain all the data you need, then you need to change your backup methods to something that will be good enough for you. You may wish to look at our article Continuous data protection as this may be of assistance to you.  ZX81  talk 01:31, 12 November 2011 (UTC)[reply]
Thanks for being polite. But, no, backups, even real-time backups won't protect against some forms of data loss, for example those caused by a corrupted file, which you could back up in real time and have two corrupted files, which are identically corrupted, and sometimes you won't know. There are also silent errors.. In the context of the OP, what you need is a RAID system, which is not a backup, but redundancy. Backups won't harm,of course. 88.14.195.138 (talk) 01:57, 12 November 2011 (UTC)[reply]
RAID won't protect you against corrupted files either though, you'll still have a corrupted file, but you'll have redundancy against losting that (already corrupted) file. If a scheduled backup isn't enough you can use Continuous data protection as per my previous post and just restore to the point in time before it was corrupted (whenever that was).  ZX81  talk 04:15, 12 November 2011 (UTC)[reply]
Indeed in many cases scheduled backups particularly to a remote or disconnected device make far more sense for the end user then RAID if it's an either/or situation. RAID is commonly presented as a panacea for all ills, when the biggest advantage is to those who need continous uptime rather then for data protection per se. (It may be useful for data protection as part of a backup regime.) Nil Einne (talk) 13:40, 13 November 2011 (UTC)[reply]
I'd recommend reading Wikipedia's article on S.M.A.R.T - and in particular, reference 2.--Phil Holmes (talk) 09:48, 12 November 2011 (UTC)[reply]

Protecting your data is certainly much more complicated than having a backup and/or RAID system. — Preceding unsigned comment added by 80.39.16.11 (talk) 19:56, 13 November 2011 (UTC)[reply]

Fax receiving app for Android[edit]

Dear Wikipedians:

I am greatly bewildered by the fact that all the fax apps I can find on Android requires the use of the Internet.

I mean, doesn't the cell phone itself interface with plain old telephone system, and as fax is also a technology that rides on the back of the POTS, shouldn't the cell phone be able to directly send/receive faxes by itself without resorting to the use of the Internet???

Therefore, my question is this: is there an android app, that would be able to intercept an incoming fax-call made to my android phone, and demodulate the fax signals (those modem-like noises) into the original fax document, and store it on my android phone for later perusal?

Thanks,

174.88.35.195 (talk) 21:51, 11 November 2011 (UTC)[reply]

Android's public API provides limited support for telephony: android.telephony package documents those functions that programmers may use. For example, programmatic access to the audio-signal of a telephone call is not supported. Therefore, no Android program can record the audio-signal and decode or demodulate fax data from the telephone service.
Such a program could be written, but it would not be an "Android application" - it would rely on software libraries (possibly provided by a device-manufacturer) other than the Android system suite. Nimur (talk) 23:51, 11 November 2011 (UTC)[reply]
It's not really possible for technical reasons.[1][2][3] A mobile phone doesn't just take the signal from a telephone wire and put it over the air as-is. The audio signal to a mobile phone is heavily compressed using AMR or similar, which dramatically reduces the amount of data bandwidth required for speech but will do nasty things to fax data (the same is true for VoIP). It should be obvious that you can't fit 33600 bps fax data in a 5600 bps audio codec. Control signals used by the fax transmission also suffer in the process. There are ways of getting around this by using special protocols to decode and re-encode the fax data, but this will require support from your mobile network. Internet fax says doing it over the internet is far cheaper than paying for calls (e.g. OneSuite costs 1 US$ per month[4] and some companies even do it for free). Is there a reason you can't use a service like this? Have you tried contacting your mobile network for advice? --Colapeninsula (talk) 23:57, 11 November 2011 (UTC)[reply]
Thanks Colapeninsula. That was a clear and excellent explanation. My original proposal was made out of sheer curiosity. But now that I understand the compression scheme, I know that Internet fax is the only viable route for faxing on a mobile phone. However, I just have one more question: my VoIP, iTalkBB, seems to be able to send faxes just fine. In fact, the other day I have sent a fax to Ottawa using my VoIP. 174.88.35.195 (talk) 01:48, 12 November 2011 (UTC)[reply]
Voops, never mind. Just answered my own question from one of your external references: "However, people often get perfectly good results on lightly loaded LANs. It still isn't perfect, as a burst of data on the LAN can still upset things, but some people get results they can live with." 174.88.35.195 (talk) 01:51, 12 November 2011 (UTC)[reply]
If your VoIP provider supports G.711 then it has enough bandwidth for fax calls however there may still be other issues. Even better if your VoIP provider supports T.38 Nil Einne (talk) 18:13, 13 November 2011 (UTC)[reply]
Resolved

LaTeX print number as a word[edit]

Hi! I have a LaTeX document with a few counters. I can use \arabic{mycounter} to get a numeral for the counter, but I would like to print my counter as a word, like "six" or "nine." While not necessary, it would be cool if I could customize it so that if the counter were greater than some number (say 9), then print it out as a numeral, and then as a word for all lesser values. My Google-fu is poor and thinks I want a word counter. Thanks!--el Aprel (facta-facienda) 23:03, 11 November 2011 (UTC)[reply]

You'll need to use an add-on package, like 'fmtcount'. Loading them is pretty simple, as are If statements. Nevard (talk) 01:14, 12 November 2011 (UTC)[reply]