Sponsored Content
Full Discussion: File system usage
Top Forums Shell Programming and Scripting File system usage Post 302918918 by navsan420 on Friday 26th of September 2014 06:41:17 AM
Old 09-26-2014
File system usage

Hi Experts,

I am trying to write script to find the FS usage.

My requirement is first i need to gather all the mountpoint details.like below.
Code:
df -k 2> /dev/null | awk '{print "FS=" $1 "\tMP=" $6 "\tTOT(KB)=" $2 "\tUSED(KB)=" $3 }'

Then I need to find which FS is using space >10GB.some thing like this.
Code:
echo "Sub="`pwd` "\tSize(KB)"=`du -s| awk '{ print $1}'`

if it is greater than 10GB I need to list all files with size inside that directory.
Required output something like this
Code:
MP=/tmp
/tmp/file1   2.05G
/tmp/file2   3.5G
/tmp/file3   8.0G
MP=/var/
/var/f1 10G
/var/f2 12G


Last edited by rbatte1; 09-26-2014 at 01:37 PM.. Reason: Removed needless bold/colours and font from CODE blocks
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

How to get system memory usage like top

Hello all im working on sunos machine that dont have the top installed and can't be install , now i need to get information similar to what top gives me about the cpu usage and so can it be done somehow else where ? (3 Replies)
Discussion started by: umen
3 Replies

2. AIX

System usage check

Hi , i have been usning AIX unix ,besides sar and topas what are the other commands thru which we could see the resource utilisation and CPU usage. thanks pushkar (3 Replies)
Discussion started by: pushkar.verma
3 Replies

3. UNIX and Linux Applications

The usage of mount file system of different servers

There is a file system in server1 which is mounted on different file system on server2. Filesystem kbytes used avail capacity Mounted on server1:/users/user1 7047581 5994192 982914 86% /u01 /data/datafiles/user1 The data in... (1 Reply)
Discussion started by: vamshikrishnab
1 Replies

4. AIX

system usage list

Hi, I would like to produce a list of system usage for each process, if I use 'ps v' it can only show one process a time, i.e. ps v 20876 PID TTY STAT TIME PGIN SIZE RSS LIM TSIZ TRS %CPU %MEM COMMAND 20876 - A 0:00 0 4752 43556 32768 27289 38724 0.0 5.0... (2 Replies)
Discussion started by: victorcheung
2 Replies

5. HP-UX

how can I find cpu usage memory usage swap usage and logical volume usage

how can I find cpu usage memory usage swap usage and I want to know CPU usage above X% and contiue Y times and memory usage above X % and contiue Y times my final destination is monitor process logical volume usage above X % and number of Logical voluage above can I not to... (3 Replies)
Discussion started by: alert0919
3 Replies

6. Red Hat

File system and its usage

HI all, Can anybody send me some useful links or explain about file system and its usage.As i want to know before using it. Actually, i am going to install linux and then planning to install oracle on it. OS -- Red hat linux 8.0 Regards, Willaim (2 Replies)
Discussion started by: William1482
2 Replies

7. AIX

How to monitor the IBM AIX server for I/O usage,memory usage,CPU usage,network..?

How to monitor the IBM AIX server for I/O usage, memory usage, CPU usage, network usage, storage usage? (3 Replies)
Discussion started by: laknar
3 Replies

8. Ubuntu

High System CPU Usage

I am running a Dell PE R815 with 4 x AMD 12 core CPUs with 128GB of RAM and a RAID 5 array of 6 SAS disks. This is an HPC application and is definitely CPU bound, however once I run 16 of these processes (thus pinning 16 cores) the work performed slows down dramatically, to maybe 5 or 10% of what... (2 Replies)
Discussion started by: mowmentous
2 Replies

9. Linux

System Went panic after CPU usage high

Hi All, Yesterday my Linux server went panic and even a small command took a lot of time to run. When i monitored pl find the below output Cpu(s): 0.1%us, 98.4%sy, 0.0%ni, 1.5%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st the time spent on kernel mode is 98 % and also idle time is around 1.5 %...... (4 Replies)
Discussion started by: jegaraman
4 Replies

10. Linux

Berkeley version bdf: combination of inode and file system usage

hello, i need a command like "bdf" of HP-UX. ( report number of free disk blocks (Berkeley version) ). it should report inode and file system usage in one line like bdf -i manpage : Man Page for bdf (all Section 1m) - The UNIX and Linux Forums HP-UX command "" report inode and file... (2 Replies)
Discussion started by: bora99
2 Replies
ATF-SH(1)						    BSD General Commands Manual 						 ATF-SH(1)

NAME
atf-sh [-s shell] -- interpreter for shell-based test programs SYNOPSIS
atf-sh script DESCRIPTION
atf-sh is an interpreter that runs the test program given in script after loading the atf-sh(3) library. atf-sh is not a real interpreter though: it is just a wrapper around the system-wide shell defined by ATF_SHELL. atf-sh executes the inter- preter, loads the atf-sh(3) library and then runs the script. You must consider atf-sh to be a POSIX shell by default and thus should not use any non-standard extensions. The following options are available: -s shell Specifies the shell to use instead of the value provided by ATF_SHELL. ENVIRONMENT
ATF_LIBEXECDIR Overrides the builtin directory where atf-sh is located. Should not be overridden other than for testing purposes. ATF_PKGDATADIR Overrides the builtin directory where libatf-sh.subr is located. Should not be overridden other than for testing purposes. ATF_SHELL Path to the system shell to be used in the generated scripts. Scripts must not rely on this variable being set to select a specific interpreter. EXAMPLES
Scripts using atf-sh(3) should start with: #! /usr/bin/env atf-sh Alternatively, if you want to explicitly choose a shell interpreter, you cannot rely on env(1) to find atf-sh. Instead, you have to hardcode the path to atf-sh in the script and then use the -s option afterwards as a single parameter: #! /path/to/bin/atf-sh -s/bin/bash ENVIRONMENT
ATF_SHELL Path to the system shell to be used in the generated scripts. SEE ALSO
atf-sh(3) BSD
September 27, 2014 BSD
All times are GMT -4. The time now is 01:58 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy