[ https://issues.apache.org/jira/browse/GEODE-6487?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Sai Boorlagadda updated GEODE-6487: ----------------------------------- Fix Version/s: (was: 1.10.0) 1.9.0 > OsStatistics should use PID for the numericId > --------------------------------------------- > > Key: GEODE-6487 > URL: https://issues.apache.org/jira/browse/GEODE-6487 > Project: Geode > Issue Type: Improvement > Components: statistics > Reporter: Kirk Lund > Assignee: Kirk Lund > Priority: Major > Fix For: 1.9.0 > > > OsStatistics (created by HostStatHelper) uses getHostSystemId() for the > numericId: > {noformat} > /** > * Generate a systemid based off of the ip address of the host. This > duplicates the common > * implementation of <code>long gethostid(void) </code>. Punt on the ipv6 > case and just use the > * same algorithm. > * > * @return a psuedo unique id based on the ip address > */ > private static long getHostSystemId() { > long id = 0L; > try { > InetAddress host = SocketCreator.getLocalHost(); > byte[] addr = host.getAddress(); > id = (addr[1] & 0xFFL) << 24 | (addr[0] & 0xFFL) << 16 | (addr[3] & > 0xFFL) << 8 > | (addr[2] & 0xFFL) << 0; > } catch (UnknownHostException uhe) { > } > return id; > } > {noformat} > I think it would be more useful to change the numericId to be the PID which > will be consistent with all other statistics instances. > We could then add a new long stat to OsStatistics to contain the value of > getHostSystemId() -- I'm not sure this value is actually valuable when > reviewing stats though. -- This message was sent by Atlassian JIRA (v7.6.3#76005)