4337 links
  • Arnaud's links
  • Home
  • Login
  • RSS Feed
  • ATOM Feed
  • Tag cloud
  • Picture wall
  • Daily
Links per page: 20 50 100
page 1 / 1
3 results tagged size x
  • Disk Usage - PostgreSQL wiki
    WITH RECURSIVE pg_inherit(inhrelid, inhparent) AS
        (select inhrelid, inhparent
        FROM pg_inherits
        UNION
        SELECT child.inhrelid, parent.inhparent
        FROM pg_inherit child, pg_inherits parent
        WHERE child.inhparent = parent.inhrelid),
    pg_inherit_short AS (SELECT * FROM pg_inherit WHERE inhparent NOT IN (SELECT inhrelid FROM pg_inherit))
    SELECT table_schema
        , TABLE_NAME
        , row_estimate
        , pg_size_pretty(total_bytes) AS total
        , pg_size_pretty(index_bytes) AS INDEX
        , pg_size_pretty(toast_bytes) AS toast
        , pg_size_pretty(table_bytes) AS TABLE
      FROM (
        SELECT *, total_bytes-index_bytes-COALESCE(toast_bytes,0) AS table_bytes
        FROM (
             SELECT c.oid
                  , nspname AS table_schema
                  , relname AS TABLE_NAME
                  , SUM(c.reltuples) OVER (partition BY parent) AS row_estimate
                  , SUM(pg_total_relation_size(c.oid)) OVER (partition BY parent) AS total_bytes
                  , SUM(pg_indexes_size(c.oid)) OVER (partition BY parent) AS index_bytes
                  , SUM(pg_total_relation_size(reltoastrelid)) OVER (partition BY parent) AS toast_bytes
                  , parent
              FROM (
                    SELECT pg_class.oid
                        , reltuples
                        , relname
                        , relnamespace
                        , pg_class.reltoastrelid
                        , COALESCE(inhparent, pg_class.oid) parent
                    FROM pg_class
                        LEFT JOIN pg_inherit_short ON inhrelid = oid
                    WHERE relkind IN ('r', 'p')
                 ) c
                 LEFT JOIN pg_namespace n ON n.oid = c.relnamespace
      ) a
      WHERE oid = parent
    ) a
    ORDER BY total_bytes DESC;
    November 13, 2020 at 12:00:07 PM GMT+1 - permalink - archive.org - https://wiki.postgresql.org/wiki/Disk_Usage
    postgresql size
  • Note: EFS size by api

    aws efs describe-file-systems| jq '.FileSystems|.[]|[.Name, .SizeInBytes.Timestamp, .SizeInBytes.Value]' -c

    Retourne une ligne par EFS
    Sur chaque ligne, un array avec :
    [0] = nom de l'efs
    [1] = timestamp du moment où la taille a été calculée
    [2] = la taille en bytes

    Pour avoir la taille en GB :

    aws efs describe-file-systems| jq '.FileSystems|.[]|[.Name, .SizeInBytes.Timestamp, .SizeInBytes.Value / 1024 /1024 / 1024]' -c

    aws efs describe-file-systems| jq '.FileSystems|.[]|[.Name, .SizeInBytes.Value / 1024 /1024 / 1024]' -c

    June 13, 2017 at 11:56:27 AM GMT+2 * - permalink - archive.org - https://links.infomee.fr/?MzuW2A
    aws efs size
  • Note: s3 bucket size by api

    aws s3api list-objects --bucket BUCKET_NAME --output json --query "[sum(Contents[].Size), length(Contents[])]"

    Retourne la taille en bytes et le nombre d'objets

    Avec un ficheir qui contient le nom des bucket :

    for BUCKET_NAME in $(cat s3list); do echo -n "$BUCKET_NAME " ; region=$(aws s3api get-bucket-location --bucket $BUCKET_NAME|jq '.LocationConstraint' -r); aws s3api list-objects --region $region --bucket $BUCKET_NAME --output json --query "sum(Contents[].Size)"; done

    June 13, 2017 at 11:55:28 AM GMT+2 * - permalink - archive.org - https://links.infomee.fr/?pbKktw
    s3 size
Links per page: 20 50 100
page 1 / 1
Shaarli - The personal, minimalist, super-fast, database free, bookmarking service by the Shaarli community - Help/documentation