The present invention provides systems utilizing fiber optics for monitoring downhole parameters and the operation and conditions of downhole tools. In one system fiber optics sensors are placed in the wellbore to make distributed measurements for determining the fluid parameters including temperature, pressure, fluid flow, fluid constituents and chemical properties. Optical spectrometric sensors are employed for monitoring chemical properties in the wellbore and at the surface for chemical injection systems. Fiber optic sensors are utilized to determine formation properties including resistivity and acoustic properties compensated for temperature effects. Fiber optic sensors are used to monitor the operation and condition of downhole devices including electrical submersible pumps and flow control devices. In one embodiment, a common fluid line is used to monitor downhole parameters and to operate hydraulically-operated devices. Fiber optic sensors are also deployed to monitor the physical condition of power lines supplying high electric power to downhole equipment. A light cell disposed downhole is used to generate electric power in the wellbore, which is used to charge batteries.