The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > OS Specific Forums > AIX
Google UNIX.COM


AIX AIX is IBM's industry-leading UNIX operating system that meets the demands of applications that businesses rely upon in today's marketplace.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Can I know find syntax to find given date files bache_gowda Shell Programming and Scripting 3 03-26-2008 02:37 AM
Little bit weired : Find files in UNIX w/o using find or where command jatin.jain Shell Programming and Scripting 10 09-19-2007 03:47 AM
how to find a file named vijay in a directory using find command amirthraj_12 UNIX for Dummies Questions & Answers 5 10-25-2006 02:39 PM
Find files older than 20 days & not use find halo98 Shell Programming and Scripting 2 05-18-2006 11:19 AM
command find returned bash: /usr/bin/find: Argument list too long yacsil Shell Programming and Scripting 1 12-15-2003 02:38 PM

Reply
 
Submit Tools LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 05-16-2008
Registered User
 

Join Date: Oct 2007
Posts: 230
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit! Stumble this Post!Spurl this Post!
find VG with FS

Hi All,

When ever I need to increase the FS,

I need to list VG first with:

lsvg
rootvg
vg2

It will give the list of VG, then I will do this:

lsvg -l rootvg | grep FS
lsvg -l vg2 | grep FS

If I find in vg2 then I can verify the VG free space and then I can compute how much space I can add.

Is there someone already have a script for this?

If I were thinking of scripting this, I think it's a little difficult because I need to do this "lsvg > listvg" and from that, I need to loop on the file listvg. I can do that but I know someone might have a trick on this with simple bash/korn shell scripting without file reading.

Thanks in advance
itik
Reply With Quote
Forum Sponsor
  #2 (permalink)  
Old 05-16-2008
Dave Miller's Avatar
Registered User
 
Join Date: Dec 2007
Location: Northern NJ, USA
Posts: 140
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit! Stumble this Post!Spurl this Post!
I'm not sure I totally understand what you're trying to do, but have you ever tried using smit ?

smit stands for System Management Interface Tool. Unless I'm mistaken, it's an IBM product that ships with AIX. I.E. Only AIX has it. It provides a simple menu structure to a lot of the seldom used system management stuff.

A neat thing about it is, it creates a log of the actual commands used to do what you've asked it to do. Therefore, you could actually look at THAT and create a script if there's something complicated you do often.

While not too complicated, that's how I created a script to add users.
Reply With Quote
  #3 (permalink)  
Old 05-16-2008
Registered User
 

Join Date: Oct 2007
Posts: 230
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit! Stumble this Post!Spurl this Post!
I got it although some VG are displaying:

lsvg | awk '{print "lsvg -l "$1" | grep -e "$1" -e usr"}' | ksh

Note: you should replace the usr according to what you need to find.

Last edited by itik; 05-30-2008 at 11:21 AM.
Reply With Quote
  #4 (permalink)  
Old 05-16-2008
Registered User
 

Join Date: Oct 2007
Posts: 230
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit! Stumble this Post!Spurl this Post!
BTW, you could use smit or smitty if your AIX is just a few, I'm managing 6. Needs to script it.

Maybe someone could simplify that script! Thanks.

Last edited by itik; 05-16-2008 at 10:51 AM.
Reply With Quote
  #5 (permalink)  
Old 05-19-2008
Bughunter Extraordinaire
 

Join Date: May 2005
Location: In the leftmost byte of /dev/kmem
Posts: 942
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit! Stumble this Post!Spurl this Post!
You don't need to use a script. lsvg will accept a list of VGs at <stdin>, therefore (for example):

Code:
# lsvg -o | lsvg -l | grep FS
This will cycle through all the active VGs (lsvg -o) and do an "lsvg -l" on each of them.

I hope this helps.

bakunin
Reply With Quote
Google UNIX.COM
Reply

Thread Tools
Display Modes


The 50 most popular UNIX and Linux searches.
Google Search Cloud for The UNIX and Linux Forums
"inappropriate ioctl for device" 421 service not available, remote server has closed connection ^m ascii eof autosys awk trim bash eval bash exec bash for loop bash subroutine boot: cannot open kernel/sparcv9/unix close_wait curses.h dead.letter find grep grep multiple lines grep or grep recursive grep unique inappropriate ioctl for device logrotate.conf lynx javascript mailx attachment make: fatal error: command failed for target `all-recursive' mget mtime perl array length ping port read awk output into multiple variables replace space by comma , perl script scp recursive segmentation fault(coredump) sftp batch sftp script snoop unix stale nfs file handle syn_sent tar exclude unix unix .profile unix com unix for loop unix forum unix forums unix interview questions unix memory usage unix mtime unix simulator unix.com while loop within while loop shell script


All times are GMT -7. The time now is 05:14 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008 The CEP Blog All Rights Reserved -Ad Management by RedTyger Visit The Global Fact Book

Content Relevant URLs by vBSEO 3.2.0

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102