TSV
A TSV is found by calculating your Player ID and Secret ID
Use this Calculator
ESV
This I found by calulating your Egg PID
Again this Calulator will do it for you
Secret ID
The only way to find out your Secret ID is by cheating.
Here is a question on DB about it
Egg PID
A little on the long run :
>- Turn off Auto Save when Battling (Options>Forced Save>Don't Save) - NOTE this does not affect the Auto Save when trading. You can't turn that off
- Get 5 unhatched Eggs and manually save your game on DS 1 (best if you have two 3DS's but not required)
- If you made above change, you will not be forced to save
- Hatch those 5 eggs and then go into a Local Battle with the 5 hatched pokes (you must enter all 5 into the battle)
- Forfeit battle and on DS 2, save the Battle Video and upload to Pokecheck- On DS 1, hard reset (hold power button down)
- Reload game on DS 1 - all your hatched pokes should be Eggs again
- Query the Battle Video on Pokecheck and you will see the PIDs for each poke as well as the IVs