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 439 of file XrdClXRootDResponses.cc.

439  :
440  pNodesRW( 0 ),
441  pFreeRW( 0 ),
442  pUtilizationRW( 0 ),
443  pNodesStaging( 0 ),
444  pFreeStaging( 0 ),
445  pUtilizationStaging( 0 )
446  {
447  }

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 452 of file XrdClXRootDResponses.cc.

453  {
454  if( !data || strlen( data ) == 0 )
455  return false;
456 
457  std::vector<std::string> chunks;
458  Utils::splitString( chunks, data, " " );
459 
460  if( chunks.size() < 6 )
461  return false;
462 
463  char *result;
464  pNodesRW = ::strtoll( chunks[0].c_str(), &result, 0 );
465  if( *result != 0 )
466  {
467  pNodesRW = 0;
468  return false;
469  }
470 
471  pFreeRW = ::strtoll( chunks[1].c_str(), &result, 0 );
472  if( *result != 0 )
473  {
474  pFreeRW = 0;
475  return false;
476  }
477 
478  pUtilizationRW = ::strtol( chunks[2].c_str(), &result, 0 );
479  if( *result != 0 )
480  {
481  pUtilizationRW = 0;
482  return false;
483  }
484 
485  pNodesStaging = ::strtoll( chunks[3].c_str(), &result, 0 );
486  if( *result != 0 )
487  {
488  pNodesStaging = 0;
489  return false;
490  }
491 
492  pFreeStaging = ::strtoll( chunks[4].c_str(), &result, 0 );
493  if( *result != 0 )
494  {
495  pFreeStaging = 0;
496  return false;
497  }
498 
499  pUtilizationStaging = ::strtol( chunks[5].c_str(), &result, 0 );
500  if( *result != 0 )
501  {
502  pUtilizationStaging = 0;
503  return false;
504  }
505 
506  return true;
507  }
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: