Any non-linear load (such as a computer, a microwave oven, some refrigerators and electric stoves, or a variable frequency drive) will generate harmonics to some extent. Motors and generators themselves - because of inherent dissymmetries in the manufacture - can create some as well. The variable frequency drives that are referred to as "active front end" topologies are probably the worst, since their whole approach is to introduce specific harmonic content to counteract harmonics already present on the system. However, they do not compensate for the high frequency switching effects of their own "guts", which leaves some fairly significant high-frequency distortion on the distribution system.
This distortion will ultimately result in higher thermal stress on all the connected system components (transformers, motors, VFDs, generators, relays, UPSs, etc). It may also show up as frequent cycling and/or premature failure of UPS units which are trying to "clean up" the waveforms.
The harmonics that will be present for a given type of nonlinear load are directly related to the method of switching. Most often, the highest energy harmonic (created by a single device) will be at +/- 1 from the basic "pulse" count - or multiple of pulse count - of the device. Thus a 6-pulse drive generates 5th and 7th harmonics ... but also at higher multiples of the switching frequency (i.e. 11th, 13th, 17th, 19th, 23rd, 25th, and so on). For a "smoother" (i.e. higher pulse count) drive, everything occurs at still higher frequencies. A 24 pulse drive will generate the most energy in the 23rd and 25th harmonics, with higher multiples such as 47th and 49th ... but may also generate some in 5th and 7th. (See also What is pulse number in drives?)
To test the system, a power quality analyzer will help. This measures line voltages and currents (at the same time), and therefore obtains the correct relationship between waveforms. If the observed signal is not a "pure" sine wave, there is some distortion present ... and therefore some harmonic content. Good analyzers will also be able to generate a "bar chart" type of harmonic plot, which some people find easier to understand.
Talk to the local power quality guys in your area: sometimes checking the system is easy, and other times it takes an expert. This is particularly true for cases where corrective action may be necessary. System impedances can act to dampen or amplify the harmonic content; if the amplitudes get high enough, the connected devices will simply fail.