The easiest and so far most reliable way that I've found to tell if the server itself is lagging or it's my network connection is to see if monsters are affected by lag. If monsters freeze too, it's not me.
Network diagnostic tools are useful, but they give incomplete information. Be careful to not draw too many conclusions from them.
"The network connection" tends to be rather long and complex, and the performance of an individual connection is subject to many variables. A partial list includes:
-local link (to your ISP)
-ISP connection to other networks (peering)
-"Internet weather" that day, (e.g. Level 3 Communications had some of their backbone routers crash last week, so traffic across them was briefly unreliable)
-performance of long-haul connections (e.g. scheduled maintenance on a transoceanic cable causes ISPs to re-route traffic through other countries)
-network congestion near the server
Each of those stages could also add factors like prioritization (Internet phone/VoIP and certain other uses might get higher priority and "bump" the game) and just plain old overloaded links which cause data to be dropped.
The reason I went into such detail is to illustrate how difficult it can be to get the full picture. For example, "ping" and "traceroute" are basically casual requests for the other end to acknowledge it's alive. One the one hand, this is often considered low-priority data and might be the first to get dropped if there's a problem. On the other hand, a problem that affects large data packets or large sequences of packets (such as game data) might not even show in a simple network test. To further confuse the situation, connections like manaworld that use the TCP protocol automatically notice when packets are dropped and silently pause and try again. This often causes packet loss to show up as simple "lag."
Even with their limitations, tools like ping, traceroute, and mtr (and more technical ones like netcat, hping, and even telnet) are often the first steps in identifying network problems. Use them in good health.
