williams m-52a ratchet, 1/4-inch drive, round head, fine tooth - williams m-52a 1/4
or try lsvg -L -l rootvg The first -L doesn’t wait for a lock on the volume group. The second one is to list logical volumes
It is entirely possible to use an if statement to check on the locked state and when encountered skip. The following is an example I use to check on the presence of an NTP daemon if it exists the process exits if an NTP daemon does not exist then one is started this is all run thorugh cron to ensure NTP services are running. This same checking methodology could be used for your LVM states you just need to change the tests to suit.
Lumapro flashlightamazon
There is no direct command in AIX to check if a volume group is locked or not. However, you can use ps command to see if any LVM commands are running/hanging: .
Lumapro flashlightbattery
Hi Team, I have written script to collect LVM details of AIX/LINUX servers and run it as cron job but on one of the AIX server VG’s are in locked state because of that cron job is getting failed. I want to check whether VG is locked or not. If locked I want to skip that VG. Can you plz tell the command to check whether VG is locked or not. I tried lsvg -L rootvg. It never worked for me. Please help me.
NTPDAEMON=ps -ef|grep -v grep | grep ntpd.pid if [ “$?” = 0 ] ; then echo " " echo “The NTP daemon process is working for uname -n” echo " " ps -ef|grep -v grep | grep ntpd.pid echo " " echo “exiting…ok” echo " " exit 1 else echo “The NTP Daemon is not working…now starting” /etc/init.d/ntpd start echo “From uname -n” > $LOG ntpq -c readlist >> $LOG echo " " >> $LOG echo “The Pid process for the running ntp daemon is as follows” >> $LOG ps -ef|grep -v grep | grep ntpd.pid >> $LOG
#Variables: PATH=/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin DAY=date +%a LOG=/tmp/ntplog MAILOUT=/usr/local/bin/contrib/mailout echo “Check for the NTP daemon process”
Lumapro flashlightmanual
#!/bin/bash #Location: /usr/local/bin/contrib #Purpose:To maintain the sendmail daemon on the server #Title:checkntpdaemon.sh #Author:Ian Patterson #DATE:Tue Jun 19 13:20:36 NZST 2012 #Modifications:
Thanks for sending example. LVM process is running I want to know the command to check VG is locked or not. If locked I want to skip that VG. I tried lsvg -L rootvg.
Neil
Neil