There is no program for pinging, since when you ping a server, the game itself (The client) has a special protocol to contact with its server, and if there was another program that can access that server and send it a ping packet, then that is considered "hacking".
You can use "Ping" command using CMD.exe on Windows to ping the server you want, but it wont actually ping the gaming server, it would just send an ICMP message to the server and the server will send it back, and the time it took for your packet to reach the server is called a "ping", and the time it takes for the packet to get back (If it was able to) is called a "pong".
So the best way would be to use a command from inside the game such as -ping in DotA 2.
If anyone is using the Internet while you are playing it will cause a lag, since it will be using bandwidth.