Find Inactive VG


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users Find Inactive VG
# 1  
Old 02-01-2012
Find Inactive VG

HTML Code:
lsvg -o
shows active VGs. Is there a way to find inactive VGs with a command?

Please advise.
# 2  
Old 02-01-2012
If you are using bash:

Code:
lsvg | grep -v <(lsvg -o)

Or with ksh one option is to write the output of lsvg -o to a file, then:
Code:
lsvg -o > lsvg.active
lsvg | grep -vf lsvg.active

Another, not so nice perhaps, option is:
Code:
lsvg $(lsvg) | grep -vp "active" | awk '/^VOL/ {print $3}'

This User Gave Thanks to Scott For This Post:
# 3  
Old 02-01-2012
YES, it works fine. appreciate it!
Login or Register to Ask a Question

Previous Thread | Next Thread

7 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Assistance with my one line command to find all inactive kernels

Hello Forum, I'm using the following command to find all inactive kernels installed on my RHEL server: $ rpm -qa | grep '^kernel-' |grep -vE `uname -r` but the result is in two lines: kernel-3.10.0-1062.1.1.el7.x86_64 kernel-3.10.0-1062.el7.x86_64 Is there a one line command I can... (3 Replies)
Discussion started by: greavette
3 Replies

2. Shell Programming and Scripting

Removing Inactive Sessions

Hi, I have the following script: # Inactive Users Removed # # Created by: stuaz # Created on: 16/03/11 # # This script runs from the Cron #################################### # Variables email=blah@blah.com log=/utils/sdennis/inactiveusers.log # # Command to find inactive... (3 Replies)
Discussion started by: stuaz
3 Replies

3. Programming

How to find inactive time of a process?

Hi, I'm trying to write a C program that finds idle login sessions on RHEL6 and kill the sessions which are idle(inactive) for, say, more than 15 minutes. I tried to use procfs.h is my code. But it doesn't seem to support enough API's as OS Solaris does.(Solaris supports API's that can populate... (10 Replies)
Discussion started by: shreeda
10 Replies

4. UNIX for Dummies Questions & Answers

Inactive Session

Hi, I am new to forum, I am wondering anyone can help me ? Is there a command to tell whether a particular process is already inactive, so I can issue a kill command to end it. I have been encountering scenerio whereby users always shutdown abnormally by closing the windows, and my application... (12 Replies)
Discussion started by: lowtaiwah
12 Replies

5. UNIX for Dummies Questions & Answers

Canīt logout to user inactive

I have SCO OpenServer release 5 I used TIMEOUT and TMOUT in .profile but I donīt Know if is correctly WND=/usr/synergy/dbl DTKMAPFIL=/u/ics/icsdat/icsmap.ics umask 000 ... (1 Reply)
Discussion started by: lalox
1 Replies

6. UNIX for Advanced & Expert Users

inactive pages

hi, plz tell me, how can get the inactive pages in HP UX. bye.... (1 Reply)
Discussion started by: venkat_t
1 Replies

7. Programming

wired and inactive pages

Hello How to find out wired pages and inactive pages in HP -UNIX. Bye (1 Reply)
Discussion started by: manjunath
1 Replies
Login or Register to Ask a Question