I like that - I'm using ip at the moment - you'd need to combine it with pid aswell, since you may be running more than one jvm per box.
thanks for the idea/code, Jules On Mar 4, 5:37 pm, Ken Wesson <kwess...@gmail.com> wrote: > On Fri, Mar 4, 2011 at 4:48 AM, Jules <jules.gosn...@gmail.com> wrote: > > So, I introduced the concept of a per-jvm id and hacked it into RT, > > Compiler and LispReader. There were not too many places that needed to > > be changed. > > Why not just use the machine's MAC address? > > user=> (defn mac [] > (if-let [ni (java.net.NetworkInterface/getByInetAddress > (java.net.InetAddress/getLocalHost))] > (seq (.getHardwareAddress ni)))) > #'user/mac > user=> (mac) > (17 148 207 11 74 113) > user=> (do (doseq [m (mac)] (printf "%02x" m)) (println)) > 1194cf0b4a71 > > Note: only works with Java 6, not Java 5. But it should be unique for > each of your nodes. -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en