Sponsored Content
Top Forums Shell Programming and Scripting Calculate total space, total used space and total free space in filesystem names matching keyword Post 302374507 by mkastin on Tuesday 24th of November 2009 05:20:36 PM
Old 11-24-2009
If you just want to use "oracle" you wouldn't need a script like this...

Code:
$ cat ./bin/df.bash
#!/bin/bash

echo Please type Filesystem Name:

read fs

rs=`df -h | awk -v fs=$fs 'BEGIN {OFS="\n"} $1 ~ fs {print "Results for: " $1, "Total Size: " $2, "Used Space: " $3, "Free Space: " $4}'`

echo "${rs}"

 

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

df+du=Total space allocated(for a file system)

Hi All, Will df+du=Total space allocted for a file system?? Is the above correct. Please correct me If iam wrong. In one my programs the above is not happening. Please help me out. Many thanks. Regards, Manas (2 Replies)
Discussion started by: manas6
2 Replies

2. AIX

used PPs not match the total disk space showed by df

Hi, I see from lsvg the total used PPs is 1050 (67200 megabytes), but when I check the disk space with df command I can only see 31G total space, can somebody tell how this come? Thanks! Victor # lsvg rootvg # lsvg rootvg VOLUME GROUP: rootvg VG IDENTIFIER: ... (2 Replies)
Discussion started by: victorcheung
2 Replies

3. Red Hat

Total space Determination

Hi experts, # df -h Filesystem Size Used Avail Use% Mounted on /dev/hda9 3.8G 1.7G 2.0G 46% / none 369M 0 369M 0% /dev/shm /dev/hda10 2.0G 33M 1.8G 2% /tmp /dev/hda12 1.4G 1.2G 260M 82% /usr I used df -h... (3 Replies)
Discussion started by: William1482
3 Replies

4. Solaris

swap size, total disk space

Hi experts, In my solaris system when i run the command df -h i got the below response.I have some confusion which i want to share with you guys.1)there are two SWAP file system shows are they same or different?2)if i want to count the total disk space should i take both the swap space or only... (2 Replies)
Discussion started by: rafiassam
2 Replies

5. Solaris

command to get the total disk space (available + free)

is there a command to get the total disk space (available + free) on the solaris server ? thanks (3 Replies)
Discussion started by: sudhiroracle
3 Replies

6. Emergency UNIX and Linux Support

Calculating total space in GB for all files with typical pattern

Hi Experts, In a particular dir, I have many files *AJAY*. How can I get total size of all such files. I tried du -hs *AJAY* but it gave me individual size of all files. All I require is summation of all. Thanks, Ajay (4 Replies)
Discussion started by: ajaypatil_am
4 Replies

7. Solaris

Problem in getting total Disk space using iostat -En command

Hi Everyone, I try to calculate the total hard disk space of a solaris machine using iostat -En command. Iterating the output and summing up all the number present near the Size: will give the exact size of the harddisk. But it is not working for a machine. This command works in many flavors... (2 Replies)
Discussion started by: prasankn
2 Replies

8. Red Hat

Total storage space and Serial number

Hi, Could you please tell me the commands to find Total storage space and Serial number of Linux server. OS -- Red Hat Enterprise Linux Server release 6.6 (Santiago) This is 2 node cluster. Regards, Maddy (1 Reply)
Discussion started by: Maddy123
1 Replies

9. Shell Programming and Scripting

Calculate total memory using free -m

Hi I am trying to calculate memory used by Linux System free -m total used free shared buffers cached Mem: 32109 31010 1099 0 3600 7287 -/+ buffers/cache: 20121 11987 Swap: 10239 1282 8957 Now according to my requirement Im calculating memory using below cmd free -m | awk 'NR==3{printf... (2 Replies)
Discussion started by: sam@sam
2 Replies
acctsuspend(5)							File Formats Manual						    acctsuspend(5)

NAME
acctsuspend, acctresume - suspend and resume accounting when available disk space reaches threshold VALUES
Failsafe Default. Default acctsuspend: acctresume: Allowed values acctresume: acctsuspend: Recommended values acctsuspend: acctresume: (But more than acctsuspend) DESCRIPTION
The and tunables control when accounting stops and resumes due to disk space constraints. When free disk space on the file system being used by accounting reaches the suspension threshold, which is the percentage relative to the percentage of disk space available only to the superuser, accounting is suspended until such time as the free disk space reaches the resumption threshold, which is the percentage rela- tive to the percentage of disk space available only to the superuser. Note: Since the and values are specified relative to the percentage of disk space available only to the superuser, negative values of these parameters can make sense. For example, if the superuser has reserved 10 percent of the disk space on the file system at file system creation time, and acctsuspend is -5 and acctresume is 0, the suspension threshold will be 5 percent of the total disk space and the resumption threshold will be 10 percent of the total disk space. Who Is Expected to Change This Tunable? Anyone using accounting. Restrictions on Changing Changes to this tunable take effect at the next reboot. When Should the Value of This Tunable Be Raised? Increasing either variable should be considered when it is necessary to maintain a higher percentage of free space on the accounting filesystem. What Are the Side Effects of Raising the Value of This Tunable? The higher either value is, the less accounting data may be captured. The further the values are separated, the greater the amount of potentially lost accounting data. When Should the Value of This Tunable Be Lowered? If additional disk space is needed for accounting data, and it cannot be obtained by moving files off of the filesystem, then the value of should be lowered. What Are the Side Effects of Lowering the Value of This Tunable? Filesystem performance (writing accounting records) decreases as the filesystem fills up. In turn, this will decrease the overall perfor- mance of accounting processes. What Other Tunables Should Be Changed at the Same Time? When changing either of these tunables, both should be considered. WARNINGS
All HP-UX kernel tunable parameters are release specific. This parameter may be removed or have its meaning changed in future releases of HP-UX. Installation of optional kernel software, from HP or other vendors, may cause changes to tunable parameter values. After installation, some tunable parameters may no longer be at the default or recommended values. For information about the effects of installation on tun- able values, consult the documentation for the kernel software being installed. For information about optional kernel software that was factory installed on your system, see at AUTHOR
and were developed by HP. SEE ALSO
accton(1M). Tunable Kernel Parameters acctsuspend(5)
All times are GMT -4. The time now is 04:47 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy