diff --git a/CHANGELOG.md b/CHANGELOG.md index d9659b44f98..a37363f9445 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,11 +1,14 @@ -3.8.0 (in progress) +3.9.0 (in progress) +================ +* Your contribution here. + +3.8.0 (08/20/2018) ================ * [#580](https://github.com/oshi/oshi/pull/580): Windows process uptime wasn't updating. - [@dbwiddis](https://github.com/dbwiddis). * [#585](https://github.com/oshi/oshi/pull/585): Fix WMI type mapping and BSTR allocation. - [@dbwiddis](https://github.com/dbwiddis). * [#586](https://github.com/oshi/oshi/pull/586): Add PerfDataUtil.removeAllCounters. - [@dbwiddis](https://github.com/dbwiddis). * [#587](https://github.com/oshi/oshi/pull/587): Localize PDH instance enumeration. - [@dbwiddis](https://github.com/dbwiddis). * [#588](https://github.com/oshi/oshi/pull/588): WMI backup for all PDH Counters. - [@dbwiddis](https://github.com/dbwiddis). -* Your contribution here. 3.7.2 (08/01/2018) ================ diff --git a/README.md b/README.md index c438d1b45d6..a8c27e86bd1 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ ![OSHI](https://dl.dropboxusercontent.com/s/c82qboyvvudpvdp/oshilogo.png) -[![Maven central](https://maven-badges.herokuapp.com/maven-central/com.github.oshi/oshi-core/badge.svg?)](https://search.maven.org/search?q=com.github.oshi) +[![Maven central](https://maven-badges.herokuapp.com/maven-central/com.github.oshi/oshi-core/badge.svg)](https://search.maven.org/search?q=com.github.oshi) [![Build Status](https://travis-ci.org/oshi/oshi.svg)](https://travis-ci.org/oshi/oshi) [![Coverage Status](https://coveralls.io/repos/github/oshi/oshi/badge.svg?branch=master)](https://coveralls.io/github/oshi/oshi?branch=master) [![codecov.io](https://codecov.io/github/oshi/oshi/coverage.svg?branch=master)](https://codecov.io/github/oshi/oshi?branch=master) @@ -58,8 +58,8 @@ Downloads --------- | Stable Release Version | Current Development Version | Dependencies | | ------------- | ------------- | ------------- | -| [oshi-core-3.7.2](https://repository.sonatype.org/service/local/artifact/maven/redirect?r=central-proxy&g=com.github.oshi&a=oshi-core&v=3.7.2&e=jar) | [oshi-core-3.8.0-SNAPSHOT](https://oss.sonatype.org/service/local/artifact/maven/redirect?r=snapshots&g=com.github.oshi&a=oshi-core&v=3.8.0-SNAPSHOT&e=jar) | [JNA](https://github.com/java-native-access/jna) • [SLF4J](http://www.slf4j.org/) | -| [oshi-json-3.7.2](https://repository.sonatype.org/service/local/artifact/maven/redirect?r=central-proxy&g=com.github.oshi&a=oshi-json&v=3.7.2&e=jar) | [oshi-json-3.8.0-SNAPSHOT](https://oss.sonatype.org/service/local/artifact/maven/redirect?r=snapshots&g=com.github.oshi&a=oshi-json&v=3.8.0-SNAPSHOT&e=jar) | [javax.json](https://jsonp.java.net/download.html) | +| [oshi-core-3.8.0](https://repository.sonatype.org/service/local/artifact/maven/redirect?r=central-proxy&g=com.github.oshi&a=oshi-core&v=3.8.0&e=jar) | [oshi-core-3.9.0-SNAPSHOT](https://oss.sonatype.org/service/local/artifact/maven/redirect?r=snapshots&g=com.github.oshi&a=oshi-core&v=3.9.0-SNAPSHOT&e=jar) | [JNA](https://github.com/java-native-access/jna) • [SLF4J](http://www.slf4j.org/) | +| [oshi-json-3.8.0](https://repository.sonatype.org/service/local/artifact/maven/redirect?r=central-proxy&g=com.github.oshi&a=oshi-json&v=3.8.0&e=jar) | [oshi-json-3.9.0-SNAPSHOT](https://oss.sonatype.org/service/local/artifact/maven/redirect?r=snapshots&g=com.github.oshi&a=oshi-json&v=3.9.0-SNAPSHOT&e=jar) | [javax.json](https://jsonp.java.net/download.html) | Projects using OSHI ------------------- diff --git a/oshi-core/src/main/java/oshi/software/os/windows/WindowsOperatingSystem.java b/oshi-core/src/main/java/oshi/software/os/windows/WindowsOperatingSystem.java index f851b8ea164..5145605326e 100644 --- a/oshi-core/src/main/java/oshi/software/os/windows/WindowsOperatingSystem.java +++ b/oshi-core/src/main/java/oshi/software/os/windows/WindowsOperatingSystem.java @@ -55,14 +55,14 @@ import oshi.jna.platform.windows.Kernel32; import oshi.jna.platform.windows.Pdh; import oshi.jna.platform.windows.WbemcliUtil; +import oshi.jna.platform.windows.WbemcliUtil.WmiQuery; +import oshi.jna.platform.windows.WbemcliUtil.WmiResult; import oshi.jna.platform.windows.WinPerf.PERF_COUNTER_BLOCK; import oshi.jna.platform.windows.WinPerf.PERF_COUNTER_DEFINITION; import oshi.jna.platform.windows.WinPerf.PERF_DATA_BLOCK; import oshi.jna.platform.windows.WinPerf.PERF_INSTANCE_DEFINITION; import oshi.jna.platform.windows.WinPerf.PERF_OBJECT_TYPE; import oshi.jna.platform.windows.Wtsapi32; -import oshi.jna.platform.windows.WbemcliUtil.WmiQuery; -import oshi.jna.platform.windows.WbemcliUtil.WmiResult; import oshi.jna.platform.windows.Wtsapi32.WTS_PROCESS_INFO_EX; import oshi.software.common.AbstractOperatingSystem; import oshi.software.os.FileSystem; @@ -213,7 +213,8 @@ private void initBitness() { if (System.getenv("ProgramFiles(x86)") != null) { this.bitness = 64; } else { - WmiQuery bitnessQuery = WbemcliUtil.createQuery("Win32_Processor", BitnessProperty.class); + WmiQuery bitnessQuery = WbemcliUtil.createQuery("Win32_Processor", + BitnessProperty.class); WmiResult bitnessMap = WmiUtil.queryWMI(bitnessQuery); if (bitnessMap.getResultCount() > 0) { this.bitness = bitnessMap.getInteger(BitnessProperty.ADDRESSWIDTH, 0); @@ -522,7 +523,7 @@ private void updateProcessMapFromRegistry(Collection pids) { } // Update stats - proc.setUpTime(upTime); + proc.setUpTime(upTime < 1L ? 1L : upTime); proc.setBytesRead(pPerfData.getLong(perfCounterBlockOffset + this.ioReadOffset)); proc.setBytesWritten(pPerfData.getLong(perfCounterBlockOffset + this.ioWriteOffset)); proc.setResidentSetSize( diff --git a/src/site/markdown/README.md b/src/site/markdown/README.md index 8b868c59f04..708fb6b2575 100644 --- a/src/site/markdown/README.md +++ b/src/site/markdown/README.md @@ -1,6 +1,6 @@ ![OSHI](https://dl.dropboxusercontent.com/s/c82qboyvvudpvdp/oshilogo.png) -[![Maven central](https://maven-badges.herokuapp.com/maven-central/com.github.oshi/oshi-core/badge.svg?)](http://search.maven.org/#search|ga|1|com.github.oshi) +[![Maven central](https://maven-badges.herokuapp.com/maven-central/com.github.oshi/oshi-core/badge.svg?)](https://search.maven.org/search?q=com.github.oshi) [![Build Status](https://travis-ci.org/oshi/oshi.svg)](https://travis-ci.org/oshi/oshi) [![Coverage Status](https://coveralls.io/repos/github/oshi/oshi/badge.svg?branch=master)](https://coveralls.io/github/oshi/oshi?branch=master) [![codecov.io](https://codecov.io/github/oshi/oshi/coverage.svg?branch=master)](https://codecov.io/github/oshi/oshi?branch=master) @@ -29,7 +29,7 @@ for their support of Open Source projects including OSHI. Essentials ---------- -* [Find OSHI on Maven Central](http://search.maven.org/#search|ga|1|com.github.oshi) +* [Find OSHI on Maven Central](https://search.maven.org/search?q=com.github.oshi) * [FAQ](https://github.com/oshi/oshi/blob/master/FAQ.md) • [API](http://oshi.github.io/oshi/apidocs/) • [Site](http://oshi.github.io/oshi/) * [Upgrading from an earlier version?](https://github.com/oshi/oshi/blob/master/UPGRADING.md) @@ -58,8 +58,8 @@ Downloads --------- | Stable Release Version | Current Development Version | Dependencies | | ------------- | ------------- | ------------- | -| [oshi-core-3.7.2](https://repository.sonatype.org/service/local/artifact/maven/redirect?r=central-proxy&g=com.github.oshi&a=oshi-core&v=3.7.2&e=jar) | [oshi-core-3.8.0-SNAPSHOT](https://oss.sonatype.org/service/local/artifact/maven/redirect?r=snapshots&g=com.github.oshi&a=oshi-core&v=3.8.0-SNAPSHOT&e=jar) | [JNA](https://github.com/java-native-access/jna) • [SLF4J](http://www.slf4j.org/) | -| [oshi-json-3.7.2](https://repository.sonatype.org/service/local/artifact/maven/redirect?r=central-proxy&g=com.github.oshi&a=oshi-json&v=3.7.2&e=jar) | [oshi-json-3.8.0-SNAPSHOT](https://oss.sonatype.org/service/local/artifact/maven/redirect?r=snapshots&g=com.github.oshi&a=oshi-json&v=3.8.0-SNAPSHOT&e=jar) | [javax.json](https://jsonp.java.net/download.html) | +| [oshi-core-3.8.0](https://repository.sonatype.org/service/local/artifact/maven/redirect?r=central-proxy&g=com.github.oshi&a=oshi-core&v=3.8.0&e=jar) | [oshi-core-3.9.0-SNAPSHOT](https://oss.sonatype.org/service/local/artifact/maven/redirect?r=snapshots&g=com.github.oshi&a=oshi-core&v=3.9.0-SNAPSHOT&e=jar) | [JNA](https://github.com/java-native-access/jna) • [SLF4J](http://www.slf4j.org/) | +| [oshi-json-3.8.0](https://repository.sonatype.org/service/local/artifact/maven/redirect?r=central-proxy&g=com.github.oshi&a=oshi-json&v=3.8.0&e=jar) | [oshi-json-3.9.0-SNAPSHOT](https://oss.sonatype.org/service/local/artifact/maven/redirect?r=snapshots&g=com.github.oshi&a=oshi-json&v=3.9.0-SNAPSHOT&e=jar) | [javax.json](https://jsonp.java.net/download.html) | Projects using OSHI -------------------