开发者

What would be the best way to store traceroute results?

One traceroute record may include :

  • Timestamp. Milliseconds resolution.
  • Variable number of hops.
  • 开发者_Python百科Each hops contains, ip address, hostname and rtt.
  • Overall results e.g. successful, network unreachable, timed out.

Thanks.


I would use a database. You could use SQLite if you don't want to run a database server.

More details: There is this nice little sqlite addon for firefox: https://addons.mozilla.org/en-US/firefox/addon/sqlite-manager

That should help you set things up. I would create a field for each of the values I want to store and on for the entire result perhaps and an primary key "id" field.

Getting your data into the database would be least trivial part. If your running linux, you could write a bash shell script that captures the output of traceroute and calls a PHP shell script which inserts the data into the DB. Of course you can use Python or any language you like which supports your DB.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜