Announcement

Collapse
No announcement yet.

Extension to Determine Size of Espo CRM

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Extension to Determine Size of Espo CRM


    Is there an extension available in the market that can provide information about the size of our Espo CRM, including the database, files, and attachments?​

  • #2
    Hi,

    this is the only one available at the moment:

    Comment


    • #3
      Hi,
      i think if some one can make a Extention
      i think is better in job.. 1 time / week

      Just need to get the path of install of espocrm and maybe bytes to mega conversion can be better



      PHP Code:
      namespace Espo\Custom\Jobs;

      use 
      Espo\Core\Job\JobDataLess;
      use 
      Espo\Core\ORM\EntityManager;
      use 
      Espo\Core\Utils\Log;
      use 
      Espo\Core\Utils\Config;
      use 
      PDO;


              $databaseParams 
      $this->config->get('database');
              
      $sql "SELECT table_schema as db, ROUND(SUM(data_length + index_length) / 1024 / 1024, 1) as size
                  FROM information_schema.tables
                  where table_schema='
      {$databaseParams['dbname']}'";

              
      $pdo $this->em->getPDO();
              
      $sth $pdo->prepare($sql);
              
      $sth->execute();
              
      $data $sth->fetch(PDO::FETCH_ASSOC);

              
      $this->log->error($data['db'] .'=>' .$data['size']);

              
      $size $this->folderSize('/Volumes/macOSData/path/blabla');

              
      $size round($size/10485761);

              
      $this->log->error($size);​ 
      in the same job, a custom function : (forget to post )

      PHP Code:
      private function folderSize (string $dir) : float
          
      {
              
      $size 0;

              foreach (
      glob(rtrim($dir'/').'/*'GLOB_NOSORT) as $each) {

                  
                  
      $size += is_file($each) ? filesize($each) : $this->folderSize($each);
              }

              return 
      $size;
          }
      ​ 

      Comment


      • Kharg
        Kharg commented
        Editing a comment
        That’s an extension that does almost everything of what you want and is free, you can always customize it to retrieve other data if you need it.

      • item
        item commented
        Editing a comment
        Hi Kharg,
        your link is not update..
        yes i have see in shop, there are a "pack" with this request.
        so .. extension exist

    • #4
      Kharg i have checked with the link you provided . this extension is not available right now

      Comment


      • #5
        Look like it been remove or something wrong with their website? I remember seeing 2-3 pages of extension but now there only 1 page left:

        Comment


        • #6
          Looks like he made an extension package the same day this post was made and removed the extension from being free.

          Comment

          Working...
          X