Add process specific open file descriptor limits#2225
Conversation
402c06c to
e708de8
Compare
|
|
7d625ae to
98c2af6
Compare
98c2af6 to
a36fff9
Compare
| @Override | ||
| public long getHardOpenFileLimit() { | ||
| final Resource.Rlimit rlimit = new Resource.Rlimit(); | ||
| OpenBsdLibc.INSTANCE.getrlimit(OpenBsdLibc.RLIMIT_NOFILE, rlimit); |
There was a problem hiding this comment.
💬 15 similar findings have been found in this PR
INTERFACE_NOT_THREAD_SAFE: Unprotected call to method OpenBsdLibc.getrlimit(...) of un-annotated interface oshi.jna.platform.unix.OpenBsdLibc. Consider annotating the interface with @ThreadSafe or adding a lock.
Reporting because the current class is annotated @ThreadSafe.
🔎 Expand here to view all instances of this finding
| File Path | Line Number |
|---|---|
| oshi-core/src/main/java/oshi/software/os/unix/freebsd/FreeBsdOSProcess.java | 275 |
| oshi-core/src/main/java/oshi/software/os/unix/freebsd/FreeBsdOSProcess.java | 287 |
| oshi-core/src/main/java/oshi/software/os/linux/LinuxOSProcess.java | 282 |
| oshi-core/src/main/java/oshi/software/os/linux/LinuxOSProcess.java | 264 |
| oshi-core/src/main/java/oshi/software/os/mac/MacOSProcess.java | 316 |
| oshi-core/src/main/java/oshi/software/os/mac/MacOSProcess.java | 328 |
| oshi-core/src/main/java/oshi/software/os/unix/solaris/SolarisOSProcess.java | 269 |
| oshi-core/src/main/java/oshi/software/os/linux/LinuxOSProcess.java | 270 |
| oshi-core/src/main/java/oshi/software/os/linux/LinuxOSProcess.java | 276 |
| oshi-core/src/main/java/oshi/software/os/unix/openbsd/OpenBsdOSProcess.java | 311 |
Showing 10 of 15 findings. Visit the Lift Web Console to see all.
ℹ️ Learn about @sonatype-lift commands
You can reply with the following commands. For example, reply with @sonatype-lift ignoreall to leave out all findings.
| Command | Usage |
|---|---|
@sonatype-lift ignore |
Leave out the above finding from this PR |
@sonatype-lift ignoreall |
Leave out all the existing findings from this PR |
@sonatype-lift exclude <file|issue|path|tool> |
Exclude specified file|issue|path|tool from Lift findings by updating your config.toml file |
Note: When talking to LiftBot, you need to refresh the page to see its response.
Click here to add LiftBot to another repo.
Was this a good recommendation?
[ 🙁 Not relevant ] - [ 😕 Won't fix ] - [ 😑 Not critical, will fix ] - [ 🙂 Critical, will fix ] - [ 😊 Critical, fixing now ]
| this.majorVersion = major; | ||
| this.minorVersion = minor; | ||
| this.os = os; | ||
| updateAttributes(); |
There was a problem hiding this comment.
💬 15 similar findings have been found in this PR
INTERFACE_NOT_THREAD_SAFE: Unprotected call to method SystemB.getgrgid(...) of un-annotated interface com.sun.jna.platform.mac.SystemB. Consider annotating the interface with @ThreadSafe or adding a lock.
Reporting because the current class is annotated @ThreadSafe.
🔎 Expand here to view all instances of this finding
| File Path | Line Number |
|---|---|
| oshi-core/src/main/java/oshi/software/os/linux/LinuxOSProcess.java | 270 |
| oshi-core/src/main/java/oshi/software/os/linux/LinuxOperatingSystem.java | 179 |
| oshi-core/src/main/java/oshi/software/os/unix/openbsd/OpenBsdOSProcess.java | 313 |
| oshi-core/src/main/java/oshi/software/os/linux/LinuxOSProcess.java | 281 |
| oshi-core/src/main/java/oshi/software/os/mac/MacOSProcess.java | 327 |
| oshi-core/src/main/java/oshi/software/os/unix/aix/AixOSProcess.java | 252 |
| oshi-core/src/main/java/oshi/software/os/unix/openbsd/OpenBsdOSProcess.java | 324 |
| oshi-core/src/main/java/oshi/software/os/mac/MacOSProcess.java | 316 |
| oshi-core/src/main/java/oshi/software/os/linux/LinuxOSProcess.java | 99 |
| oshi-core/src/main/java/oshi/software/os/mac/MacOperatingSystem.java | 174 |
Showing 10 of 15 findings. Visit the Lift Web Console to see all.
ℹ️ Learn about @sonatype-lift commands
You can reply with the following commands. For example, reply with @sonatype-lift ignoreall to leave out all findings.
| Command | Usage |
|---|---|
@sonatype-lift ignore |
Leave out the above finding from this PR |
@sonatype-lift ignoreall |
Leave out all the existing findings from this PR |
@sonatype-lift exclude <file|issue|path|tool> |
Exclude specified file|issue|path|tool from Lift findings by updating your config.toml file |
Note: When talking to LiftBot, you need to refresh the page to see its response.
Click here to add LiftBot to another repo.
Was this a good recommendation?
[ 🙁 Not relevant ] - [ 😕 Won't fix ] - [ 😑 Not critical, will fix ] - [ 🙂 Critical, will fix ] - [ 😊 Critical, fixing now ]
|
Hey @gitseti don't want to rush this PR, but based on a bug report in AIX I'm probably going to try to push out a patch release this weekend. Do you want me to try to wait for you to finish this implementation or is it close enough to release it as-is with some more tweaks for the next version? |
|
Hey @dbwiddis, imo, it should be ready for review now. The only thing left would be to have a solution for Windows as I'm not sure how to do the |
|
We can table the windows Thanks again for your contribution! |
This resolves #2215 as it implements the second needed part.