At the Japanese Spallation Neutron Source (JSNS) using a mercury target, the transverse beam profile of 3 GeV beam having the power of 1 MW is measured by a multi-wire profile monitor (MWPM) placed at the proton beam window (PBW) being the separator between vacuum and helium area at the target station. The profile monitor is crucial because the beam peak current density should be kept as low as possible to mitigate the damage at the mercury target vessel due to the pitting erosion caused by the high power proton beam. Simple beam expantion at the target is useless because it simply increases the heat load and the radiation dose at the entrance of the target. To mitigate damage, a beam flattening system using non-linear optics with octupole magnets has been developed. It was confirmed the beam shape was controlled as designed using calculations. In order to obtain a 2D profile, we have begun using the profile monitor by observing the infrared from the target by imaging a capillary tube. At JSNS the life time of the PBW is important. To improve the lifetime of the PBW, we measure the gas production rate by using a beam dump. ; SeriesInformation ; Proceedings of the 4th International Beam Instrumentation Conference, IBIC2015, Melbourne, Australia