Sponsored Content
Top Forums Shell Programming and Scripting Capacity of directory... Pulling hair out :-) Post 302329253 by LRoberts on Friday 26th of June 2009 10:49:08 AM
Old 06-26-2009
Capacity of directory... Pulling hair out :-)

I am new to scripting and thought I was doing rather well however I ran into a issue and I am not sure how to fix it. I am using the following command to obtain the capacity percent of the directory listed however it seems that this command gets the capacity of the whole mount rather then just the directory specified.

Code:
df -bhk /lcl/prd/data/sm2p/archives | cut -d "y" -f1 | awk '{print$5}'

81%

I only want toe capacity of archives and not the capacity of the whole mount. The folder archives is empty yet it comes back with 81% because its looking at the whole mount.

Am I using the wrong command (df)? I am not sure how to obtain what I want here.

Thanks in advance for the help.
 

9 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

i'm pulling my hair out getting a solaris 8 box to work as a caching name server

i've gone through the sun docs as well as a Solaris Network Admin book. while the book is fair, it lacks detail and i'm sure there are things it's missing on getting a caching only name server working. as for the sun docs... what it has is really miserable. i can't make anything out of it. ... (4 Replies)
Discussion started by: xyyz
4 Replies

2. AIX

How to increase capacity?

Hello everybody, is a very simple question how can I increase the capacity of a disk wich is on a DS4300?, I have done the procedure on the Storage Manager but the space is the same on the AIX (5.3) , what should I do to obtain the new ammount of disk space? (16 Replies)
Discussion started by: GermanSkull
16 Replies

3. AIX

capacity planning on aix

Hi All, What do you usually use for capacity planning on AIX? Any idea will do? Thanks in advance, itik (1 Reply)
Discussion started by: itik
1 Replies

4. Shell Programming and Scripting

Monitor capacity of directory

Good morning. I have been attempting to find a way to monitor the capacity of a directory so that when it reaches 80% or higher I can send an event. I was able to find a script that does this for the whole drive by I can not seem to figure out how to do this for just a single directory. ... (1 Reply)
Discussion started by: LRoberts
1 Replies

5. Shell Programming and Scripting

Filesystems using more than 75% capacity

i need to write a shell script for printing the list of filesystems whose disk utilization is more than 75%...i tried using df -h along with awk but cud'nt make the combination work.....:wall: when we do df -h then the filesystems which are using more than 75% capacity shud be printed according to... (11 Replies)
Discussion started by: xtatic
11 Replies

6. Shell Programming and Scripting

Can't Commit Directory... is this guy pulling my leg?

Hello, I hired a coder a couple weeks ago to develop 3 small modules for a popular CMS. I created Github repos for each module so as to manage the code and allow others to download it at will. The CMS in question is structured in such a way that each module is housed in its own... (2 Replies)
Discussion started by: fern
2 Replies

7. AIX

TSM capacity

Dears, The TSM storage that we have is already configured to backup some Application,directories & logs or let's say backup different path from 15 servers, I want to add more Items to be backuped by this storage, how to be confirmed if that possible or not? I mean how do we know the capacity of... (7 Replies)
Discussion started by: arm
7 Replies

8. AIX

Directories getting 100% capacity

I am new to using AIX but ive ran into issues with 100% full and then rebooting and having a socket error repeating over and over. My question is, what can I do besides just monitoring to ensure I dont run into these issues? Scripts? anything? Thanks (3 Replies)
Discussion started by: terry.berger
3 Replies

9. AIX

FS capacity

can anyone tell me how to reduce Fs capacity by using echo zero. (3 Replies)
Discussion started by: nkchand
3 Replies
ACPIBAT(4)						   BSD Kernel Interfaces Manual 						ACPIBAT(4)

NAME
acpibat -- ACPI Battery SYNOPSIS
acpibat* at acpi? DESCRIPTION
The acpibat driver supports ACPI batteries. The battery status is made available through the envsys(4) API. The battery information can be displayed also with the envstat(8) command: $ envstat -d acpibat0 Current CritMax WarnMax WarnMin CritMin Unit present: ON design voltage: 14.400 V voltage: 16.267 V design cap: 74.880 Wh last full cap: 48.260 Wh charge: 47.910 5.000% 0.414% Wh (99.27%) charge rate: N/A discharge rate: 16.641 W charging: OFF charge state: NORMAL Depending on the battery, the unit of measurement is either watt-hour (Wh) or ampere-hour (Ah) for the capacity related information. From these the ``charge'' is usually the most interesting value, but it is possible to derive useful information also from the other values. For example, when acpiacad(4) is disconnected, the ``discharge rate'' gives a coarse approximation of the current power consumption. The ratio between the design capacity and the last full capacity on the other hand reveals the overall ``health'' of deteriorating lithium-ion batter- ies. EVENTS
The acpibat driver is able to send events to powerd(8) daemon when a capacity state has been changed. The new state will be reported as the fourth argument to the /etc/powerd/scripts/sensor_battery script. If a custom capacity limit was set via envstat(8), the acpibat driver will report a user-capacity event to the same script when current capacity limit has been reached. SEE ALSO
acpi(4), envsys(4), envstat(8), powerd(8) HISTORY
The acpibat driver appeared in NetBSD 1.6. BUGS
The ACPI specifications make a distinction between ``control method batteries'' and ``smart batteries''. The acpibat driver only supports control method batteries. Furthermore, acpibat does not yet support some additional battery information introduced in the ACPI 4.0 standard. BSD
March 17, 2010 BSD
All times are GMT -4. The time now is 07:26 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy