# ls -l
total 64
-rw-r--r-- 1 root other 119 Apr 11 01:21 a.sh
-rw-r--r-- 1 root other 151 Apr 11 20:48 b.sh
-rw-r--r-- 1 root other 78 Apr 11 20:48 tmp.out
-rw-r--r-- 1 root other 61 Apr 11 20:34 volume.txt
# cat a.sh
#! /bin/sh
vxdg -g oradg free | nawk '
{
if ($5/2/1024 > 0)
print "... Free chunk on "$1"("$2")"" " $5/2/1024, "MB"
}'
# cat b.sh
#! /bin/sh
for i in `cat volume.txt`
do
echo $i
df -k | grep $i > tmp.out
cat tmp.out | awk '{print "Volume ",$1, "Total size: " $2/1024 " Mb"}'
done
# cat tmp.out
/dev/vx/dsk/oradg/s33_redo2 2097152 1273531 772150 63% /db/stg33/redo2
# cat volume.txt
s33_dbf1
s33_dbf2
s33_dbf3
s33_dbf4
s33_redo1
s33_redo2
#
Subscribe to:
Post Comments (Atom)
UNIX: How to print column nicely using printf
[user@hostfwnms1-oam tmp]# cat b.sh printf "%-26s %-19s %-8s %-8s %-s %-s\n" HOSTNAME IP PING SNMPWALK 0-ok 1-fail for i in `cat n...
-
This does increase the amount of CPU and I/O that both your sending and receiving side use, but I’ve been able to run ~25 parallel instance...
-
syntax: rmvterm –m {msys} –p {lpar} # rmvterm -m Server-9117-570-SN103FACD_B -p WBITVIO2
-
Cluster operations Start VCS hastart [-force-stale] hasys -force system Stop VCS hastop -local [-force-evacuate] hastop -sys system [-force-...
No comments:
Post a Comment