I am working on https://issues.apache.org/jira/browse/CASSANDRA-16565 and have a small testing program that executes the sigar and equivalent OSHI methods to verify that they are the same. I would like to have this run on various platforms.
I have tgz with all the libraries and code as well as a run.sh bash script to compile and execute it. Is there someplace I can stash the tgz that others can download it from? The file info is : 6269066 okt 24 12:46 compare_oshi_sigar.tgz OSHI does not implement all the methods that Sigar does and there is a difference in the bitness (32/64 bit) of the results. *Maximum Virtual Memory* Sigar dates from the time of 32 bit OS and so when checking for things like maximum virtual memory it returns -1 (INFINITE) for any value over 0x7fffffff. OSHI on the other hand is 64 bit aware and will return long values for the maximum virtual memory. Looking at tools like "ulimit" it converts anything over 0x7fffffff to the text "infinite" in the return. To handle this I set the expected Virtual memory to be 0x7FFFFFFFl and accept any value >= that or -1 as the acceptable value. *Maximum Processes* This appears to be the value of "ulimit -u" which is not supported in OSHI. However, on Linux (and I think Mac OS) we can make a call to the bash interpreter to return "uname -u". On other systems I log that we don't have a way to get this value and return the standard default max processes of 1024. This will cause the "warnIfRunningInDegradedMode" to warn about possible degradation. Claude