XRootD
XrdCl::StatInfoVFS Class Reference

VFS stat info. More...

#include <XrdClXRootDResponses.hh>

+ Collaboration diagram for XrdCl::StatInfoVFS:

Public Member Functions

 StatInfoVFS ()
 Constructor. More...
 
uint64_t GetFreeRW () const
 Get size of the largest contiguous area of free r/w space (in MB) More...
 
uint64_t GetFreeStaging () const
 Get size of the largest contiguous area of free staging space (in MB) More...
 
uint64_t GetNodesRW () const
 Get number of nodes that can provide read/write space. More...
 
uint64_t GetNodesStaging () const
 Get number of nodes that can provide staging space. More...
 
uint8_t GetUtilizationRW () const
 Get percentage of the partition utilization represented by FreeRW. More...
 
uint8_t GetUtilizationStaging () const
 Get percentage of the partition utilization represented by FreeStaging. More...
 
bool ParseServerResponse (const char *data)
 Parse server response and fill up the object. More...
 

Detailed Description

VFS stat info.

Definition at line 573 of file XrdClXRootDResponses.hh.

Constructor & Destructor Documentation

◆ StatInfoVFS()

XrdCl::StatInfoVFS::StatInfoVFS ( )

Constructor.

Definition at line 433 of file XrdClXRootDResponses.cc.

433  :
434  pNodesRW( 0 ),
435  pFreeRW( 0 ),
436  pUtilizationRW( 0 ),
437  pNodesStaging( 0 ),
438  pFreeStaging( 0 ),
439  pUtilizationStaging( 0 )
440  {
441  }

Member Function Documentation

◆ GetFreeRW()

uint64_t XrdCl::StatInfoVFS::GetFreeRW ( ) const
inline

Get size of the largest contiguous area of free r/w space (in MB)

Definition at line 592 of file XrdClXRootDResponses.hh.

593  {
594  return pFreeRW;
595  }

Referenced by DoStatVFS(), and XrdPosixXrootd::Statvfs().

+ Here is the caller graph for this function:

◆ GetFreeStaging()

uint64_t XrdCl::StatInfoVFS::GetFreeStaging ( ) const
inline

Get size of the largest contiguous area of free staging space (in MB)

Definition at line 616 of file XrdClXRootDResponses.hh.

617  {
618  return pFreeStaging;
619  }

Referenced by DoStatVFS(), and XrdPosixXrootd::Statvfs().

+ Here is the caller graph for this function:

◆ GetNodesRW()

uint64_t XrdCl::StatInfoVFS::GetNodesRW ( ) const
inline

Get number of nodes that can provide read/write space.

Definition at line 584 of file XrdClXRootDResponses.hh.

585  {
586  return pNodesRW;
587  }

Referenced by DoStatVFS(), and XrdPosixXrootd::Statvfs().

+ Here is the caller graph for this function:

◆ GetNodesStaging()

uint64_t XrdCl::StatInfoVFS::GetNodesStaging ( ) const
inline

Get number of nodes that can provide staging space.

Definition at line 608 of file XrdClXRootDResponses.hh.

609  {
610  return pNodesStaging;
611  }

Referenced by DoStatVFS(), and XrdPosixXrootd::Statvfs().

+ Here is the caller graph for this function:

◆ GetUtilizationRW()

uint8_t XrdCl::StatInfoVFS::GetUtilizationRW ( ) const
inline

Get percentage of the partition utilization represented by FreeRW.

Definition at line 600 of file XrdClXRootDResponses.hh.

601  {
602  return pUtilizationRW;
603  }

Referenced by DoStatVFS(), and XrdPosixXrootd::Statvfs().

+ Here is the caller graph for this function:

◆ GetUtilizationStaging()

uint8_t XrdCl::StatInfoVFS::GetUtilizationStaging ( ) const
inline

Get percentage of the partition utilization represented by FreeStaging.

Definition at line 624 of file XrdClXRootDResponses.hh.

625  {
626  return pUtilizationStaging;
627  }

Referenced by DoStatVFS(), and XrdPosixXrootd::Statvfs().

+ Here is the caller graph for this function:

◆ ParseServerResponse()

bool XrdCl::StatInfoVFS::ParseServerResponse ( const char *  data)

Parse server response and fill up the object.

Definition at line 446 of file XrdClXRootDResponses.cc.

447  {
448  if( !data || strlen( data ) == 0 )
449  return false;
450 
451  std::vector<std::string> chunks;
452  Utils::splitString( chunks, data, " " );
453 
454  if( chunks.size() < 6 )
455  return false;
456 
457  char *result;
458  pNodesRW = ::strtoll( chunks[0].c_str(), &result, 0 );
459  if( *result != 0 )
460  {
461  pNodesRW = 0;
462  return false;
463  }
464 
465  pFreeRW = ::strtoll( chunks[1].c_str(), &result, 0 );
466  if( *result != 0 )
467  {
468  pFreeRW = 0;
469  return false;
470  }
471 
472  pUtilizationRW = ::strtol( chunks[2].c_str(), &result, 0 );
473  if( *result != 0 )
474  {
475  pUtilizationRW = 0;
476  return false;
477  }
478 
479  pNodesStaging = ::strtoll( chunks[3].c_str(), &result, 0 );
480  if( *result != 0 )
481  {
482  pNodesStaging = 0;
483  return false;
484  }
485 
486  pFreeStaging = ::strtoll( chunks[4].c_str(), &result, 0 );
487  if( *result != 0 )
488  {
489  pFreeStaging = 0;
490  return false;
491  }
492 
493  pUtilizationStaging = ::strtol( chunks[5].c_str(), &result, 0 );
494  if( *result != 0 )
495  {
496  pUtilizationStaging = 0;
497  return false;
498  }
499 
500  return true;
501  }
static void splitString(Container &result, const std::string &input, const std::string &delimiter)
Split a string.
Definition: XrdClUtils.hh:56

References XrdCl::Utils::splitString().

+ Here is the call graph for this function:

The documentation for this class was generated from the following files: