Skip to content

Commit

Permalink
Meta server: replace no longer used ping response field with field re…
Browse files Browse the repository at this point in the history
…porting number of open (for both read and write) files.

Web UI: report number of open files.
  • Loading branch information
mikeov committed Jul 23, 2020
1 parent 60ef3ef commit 7bb1e22
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
3 changes: 1 addition & 2 deletions src/cc/meta/LayoutManager.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1982,7 +1982,6 @@ LayoutManager::LayoutManager()
mMaxConcurrentWriteReplicationsPerNode(5),
mMaxConcurrentReadReplicationsPerNode(10),
mUseEvacuationRecoveryFlag(true),
mReplicationFindWorkTimeouts(0),
// Replication check 30ms/.20-30ms = 120 -- 20% cpu when idle
mMaxTimeForChunkReplicationCheck(30 * 1000),
mMinChunkReplicationCheckInterval(120 * 1000),
Expand Down Expand Up @@ -9017,7 +9016,7 @@ LayoutManager::Handle(MetaPing& inReq, bool wormModeFlag)
"Pending recovery= " << mChunkToServerMap.GetCount(
CSMap::Entry::kStatePendingRecovery) << "\t"
"Repl check timeouts= " << mReplicationCheckTimeouts << "\t"
"Find repl timemoust= " << mReplicationFindWorkTimeouts << "\t"
"Open Files= " << mChunkLeases.GetFileLeasesCount() << "\t"
"Update time= " << DisplayDateTime(kSecs2MicroSecs * mPingUpdateTime) << "\t"
"Uptime= " << (mPingUpdateTime - mStartTime) << "\t"
"Buffers= " <<
Expand Down
3 changes: 2 additions & 1 deletion src/cc/meta/LayoutManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -345,6 +345,8 @@ class ChunkLeases
{ mDumpsterCleanupTimer.SetNextRunTime(nextRunTime); }
inline void Start(MetaRename& req);
inline void Done(MetaRename& req);
inline size_t GetFileLeasesCount()
{ return mFileLeases.GetSize(); }
private:
class EntryKeyHash
{
Expand Down Expand Up @@ -2314,7 +2316,6 @@ class LayoutManager : public ITimeout
int mMaxConcurrentWriteReplicationsPerNode;
int mMaxConcurrentReadReplicationsPerNode;
bool mUseEvacuationRecoveryFlag;
int64_t mReplicationFindWorkTimeouts;
/// How much do we spend on each internal RPC in chunk-replication-check to handout
/// replication work.
int64_t mMaxTimeForChunkReplicationCheck;
Expand Down
5 changes: 5 additions & 0 deletions webui/qfsstatus.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ def __init__(self):
self.sourceVersion = ''
self.replications = -1;
self.pendingRecovery = -1
self.openFilesCount = -1
self.uptime = -1
self.replicationsCheck = -1
self.pendingReplication = -1
Expand Down Expand Up @@ -327,6 +328,7 @@ def display(
print >> buffer, '<tr> <td> File system </td><td>:</td><td>directories:&nbsp;' + \
splitThousands(systemInfo.dirCount) + \
'&nbsp;files:&nbsp;' + splitThousands(systemInfo.fileCount) + \
'&nbsp;open:&nbsp;' + splitThousands(systemInfo.openFilesCount) + \
'&nbsp;sum&nbsp;of&nbsp;logical&nbsp;file&nbsp;sizes:&nbsp;' + \
bytesToReadable(systemInfo.sumOfLogicalFileSizes) + \
'&nbsp;ID:&nbsp;' + str(systemInfo.fileSystemId) + \
Expand Down Expand Up @@ -1187,6 +1189,9 @@ def processSystemInfo(systemInfo, sysInfo):
if len(info) < 6:
return
systemInfo.pendingRecovery = long(info[5].split('=')[1])
if len(info) < 8:
return
systemInfo.openFilesCount = long(info[7].split('=')[1])
if len(info) < 10:
return
systemInfo.uptime = long(info[9].split('=')[1])
Expand Down

0 comments on commit 7bb1e22

Please sign in to comment.