Skip to content
This repository was archived by the owner on Apr 5, 2024. It is now read-only.

Commit 40c313e

Browse files
committed
Added InodeCount to SystemHealth
1 parent 80029de commit 40c313e

File tree

3 files changed

+6
-0
lines changed

3 files changed

+6
-0
lines changed

src/main/java/de/filefighter/rest/domain/filesystem/business/FileSystemHelperService.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -481,4 +481,8 @@ public long[] transformLongCollectionTolongArray(Collection<Long> collectionToTr
481481
public long getCurrentTimeStamp() {
482482
return Instant.now().getEpochSecond();
483483
}
484+
485+
public long getTotalInodeCount() {
486+
return this.fileSystemRepository.count();
487+
}
484488
}

src/main/java/de/filefighter/rest/domain/health/business/SystemHealthBusinessService.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ public SystemHealth getCurrentSystemHealthInfo() {
3737
long currentEpoch = getCurrentEpochSeconds();
3838
return SystemHealth.builder()
3939
.uptimeInSeconds(currentEpoch - serverStartedAt)
40+
.inodeCount(this.fileSystemHelperService.getTotalInodeCount())
4041
.userCount(userBusinessService.getUserCount())
4142
.usedStorageInBytes(fileSystemHelperService.getTotalFileSize())
4243
.dataIntegrity(calculateDataIntegrity())

src/main/java/de/filefighter/rest/domain/health/data/SystemHealth.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
public class SystemHealth {
1313
private final long uptimeInSeconds;
1414
private final long userCount;
15+
private final long inodeCount;
1516
private final double usedStorageInBytes;
1617
private final DataIntegrity dataIntegrity;
1718
private final String deployment;

0 commit comments

Comments
 (0)