# Check Asset size and compare to free space on disk

**URL:** <https://techcommunity.softwareag.com/t/check-asset-size-and-compare-to-free-space-on-disk/294833>\
**Category:** Forum\
**Tags:** Adabas-Natural, Adabas, Adabas-on-Linux\
**Created:** [April 18, 2024, 2:09pm UTC](https://techcommunity.softwareag.com/t/check-asset-size-and-compare-to-free-space-on-disk/294833 "2024-04-18T14:09:09Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Hezi](https://avatars.discourse-cdn.com/v4/letter/h/a5b964/32.png) [@Hezi](https://techcommunity.softwareag.com/u/Hezi)\
**Post date:** [April 18, 2024, 2:09pm UTC](https://techcommunity.softwareag.com/t/check-asset-size-and-compare-to-free-space-on-disk/294833/1 "2024-04-18T14:09:09Z")

</div>

Hi  
I am running Adabas 71.1.9 On Linux REHL9.  
Is there a way to compare Adabas asset size to free space on disk?  
Example: Lets assume I want to back an Adabas file, and I want to check if I have sufficient disk storage on my disk (before running backup of course)

---

<div class="post-metadata">

**Author:** ![Douglas\_Kelly](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/douglas_kelly/32/102_2.png) [@Douglas\_Kelly](https://techcommunity.softwareag.com/u/Douglas_Kelly)\
**Post date:** [April 18, 2024, 3:49pm UTC](https://techcommunity.softwareag.com/t/check-asset-size-and-compare-to-free-space-on-disk/294833/2 "2024-04-18T15:49:13Z")

</div>

Size of Adabas files on disk:

```auto
/adabas/db001 > du -ch ASSO* DATA*
64G ASSO1.001
16M ASSO2.001
108G DATA1.001
4.1M DATA2.001
171G total

```

The “total” will be the approximate size of the backup.  
For free space, you can use “df -h” and look in the “Avail” column for an area large enough to hold your backup.

---

<div class="post-metadata">

**Author:** ![Hezi](https://avatars.discourse-cdn.com/v4/letter/h/a5b964/32.png) [@Hezi](https://techcommunity.softwareag.com/u/Hezi)\
**Post date:** [April 21, 2024, 8:45am UTC](https://techcommunity.softwareag.com/t/check-asset-size-and-compare-to-free-space-on-disk/294833/3 "2024-04-21T08:45:23Z")

</div>

Hi  
I meant running an adabas fnr backup, not the actual adabas containers.  
Ex: I have run dbid=1 with fnr:1-10, I want just before run a backup on fnr=1 the size, in order to check if I have enough disk space

---

<div class="post-metadata">

**Author:** ![Sven\_Born](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/sven_born/32/39756_2.png) [@Sven\_Born](https://techcommunity.softwareag.com/u/Sven_Born)\
**Post date:** [April 22, 2024, 6:00am UTC](https://techcommunity.softwareag.com/t/check-asset-size-and-compare-to-free-space-on-disk/294833/4 "2024-04-22T06:00:01Z")

</div>

Hi Hezi,  
you can use a **named pipe** together with the `wc` command.  
See also _Adabas Basics → Using Utilities →_ [Using Named Pipes](https://documentation.softwareag.com/adaos/7.2.0/en/webhelp/adaos-webhelp/basics/use.htm#unp)

```auto
# create a named pipe
mkfifo /tmp/bckpipe
# let ADABCK write to the pipe
export BCK001=/tmp/bckpipe
# since the pipe is blocked until someone reads from it
# start it as a background process and discard the output
adabck dbid=1 dump=1 > /dev/null &

# let wc read from the named pipe and count the bytes
wc -c $BCK001

```

The output contains the number of bytes and the file/pipe name:

```auto
7242088 /tmp/bckpipe

```

---

<div class="post-metadata">

**Author:** ![Hezi](https://avatars.discourse-cdn.com/v4/letter/h/a5b964/32.png) [@Hezi](https://techcommunity.softwareag.com/u/Hezi)\
**Post date:** [May 5, 2024, 8:06am UTC](https://techcommunity.softwareag.com/t/check-asset-size-and-compare-to-free-space-on-disk/294833/5 "2024-05-05T08:06:47Z")

</div>

Hi  
But, still it will create a file dump on disk before checing if disk has enough capacity, no?

---

<div class="post-metadata">

**Author:** ![Hezi](https://avatars.discourse-cdn.com/v4/letter/h/a5b964/32.png) [@Hezi](https://techcommunity.softwareag.com/u/Hezi)\
**Post date:** [May 5, 2024, 8:37am UTC](https://techcommunity.softwareag.com/t/check-asset-size-and-compare-to-free-space-on-disk/294833/6 "2024-05-05T08:37:01Z")

</div>

It works fine  
Tnx

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/techcommunity/original/3X/c/d/cd19967bb605d28a72d77eb83a1cae22f3df2eb8.svg) [@system](https://techcommunity.softwareag.com/u/system)\
**Post date:** [November 1, 2024, 8:37am UTC](https://techcommunity.softwareag.com/t/check-asset-size-and-compare-to-free-space-on-disk/294833/7 "2024-11-01T08:37:38Z")

</div>

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.
