HPE GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Piece of source code for disk information summary
Operating System - HP-UX
1833016
Members
2742
Online
110048
Solutions
Forums
Categories
Company
Local Language
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
back
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Go to solution
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-08-2002 05:38 AM
05-08-2002 05:38 AM
Hi,
Please share piece of source code in Perl or Shell for printing the following information
pvdisplay for all disks
vgdisplay for all disks
lvdisplay for each volume
Many thanks in advance for saving my time!
BR,
Mihails
Please share piece of source code in Perl or Shell for printing the following information
pvdisplay for all disks
vgdisplay for all disks
lvdisplay for each volume
Many thanks in advance for saving my time!
BR,
Mihails
KISS - Keep It Simple Stupid
Solved! Go to Solution.
1 REPLY 1
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-08-2002 06:05 AM
05-08-2002 06:05 AM
Solution
Hi
This will get you started
I put in line numbers to aid you recomposing it
And uploaded it
1 dlis1=`ioscan -nf|grep /dev/dsk/|sed -e 's:.*/dev/dsk/:/dev/dsk/:'|cut -f1 -d " "`
2 dlis=""
3 for d in $dlis1
4 do
5 dlis=$dlis" "`strings /etc/lvmtab|grep $d`
6 done
7 echo "" > /tmp/filit$PPID
8 for d in $dlis
9 do
10 echo Disc "|"$d"|" >> /tmp/filit$PPID
11 echo "-------------------------------------------------------------------------------" >> /tmp/filit$PPID
12 pvdisplay -v $d 2>&1|grep -v current|
13 grep -v "free " |
14 grep -v "Physical extents"|
15 grep -v "PE Status" >> /tmp/filit$PPID
16 echo " " >> /tmp/filit$PPID
17 echo " ============================ " >> /tmp/filit$PPID
18 done
19 vgs=`grep "VG Name" /tmp/filit$PPID|sed -e 's:.*/dev/::'`
20 echo "||||||||||||||||| VOLUME GROUPS |||||||||||||||||||||||||||||||||||||||||||" >> /tmp/filit$PPID
21 for v in $vgs
22 do
23 echo VG $v >> /tmp/filit$PPID
24 echo "-------------------------------------------------------------------------------" >> /tmp/filit$PPID
25 vgdisplay -v $v 2>&1|grep -v current >> /tmp/filit$PPID
26 echo " " >> /tmp/filit$PPID
27 echo " ============================ " >> /tmp/filit$PPID
28 done
29 lvs=`grep "LV Name" /tmp/filit$PPID|grep dev|sed -e 's:.*/dev:/dev:'|sort -u`
30 echo "||||||||||||||||| LOGICAL VOLUMES ||||||||||||||||||||||||||||||||||||||||||" >> /tmp/filit$PPID
31 for v in $lvs
32 do
33 echo LV $v >> /tmp/filit$PPID
34 echo "-------------------------------------------------------------------------------" >> /tmp/filit$PPID
35 lvdisplay -v $v 2>&1|grep -v current|
36 grep -v "LE PV1"|
37 grep -v "Logical extents" >> /tmp/filit$PPID
38 echo " " >> /tmp/filit$PPID
39 echo " ============================ " >> /tmp/filit$PPID
40 done
41 cat /tmp/filit$PPID|grep -v " 0"
42 rm /tmp/filit$PPID
43 echo ===============================SOFTWARE=========================================
44 swlist -l product|grep -v "#"
Steve Steel
This will get you started
I put in line numbers to aid you recomposing it
And uploaded it
1 dlis1=`ioscan -nf|grep /dev/dsk/|sed -e 's:.*/dev/dsk/:/dev/dsk/:'|cut -f1 -d " "`
2 dlis=""
3 for d in $dlis1
4 do
5 dlis=$dlis" "`strings /etc/lvmtab|grep $d`
6 done
7 echo "" > /tmp/filit$PPID
8 for d in $dlis
9 do
10 echo Disc "|"$d"|" >> /tmp/filit$PPID
11 echo "-------------------------------------------------------------------------------" >> /tmp/filit$PPID
12 pvdisplay -v $d 2>&1|grep -v current|
13 grep -v "free " |
14 grep -v "Physical extents"|
15 grep -v "PE Status" >> /tmp/filit$PPID
16 echo " " >> /tmp/filit$PPID
17 echo " ============================ " >> /tmp/filit$PPID
18 done
19 vgs=`grep "VG Name" /tmp/filit$PPID|sed -e 's:.*/dev/::'`
20 echo "||||||||||||||||| VOLUME GROUPS |||||||||||||||||||||||||||||||||||||||||||" >> /tmp/filit$PPID
21 for v in $vgs
22 do
23 echo VG $v >> /tmp/filit$PPID
24 echo "-------------------------------------------------------------------------------" >> /tmp/filit$PPID
25 vgdisplay -v $v 2>&1|grep -v current >> /tmp/filit$PPID
26 echo " " >> /tmp/filit$PPID
27 echo " ============================ " >> /tmp/filit$PPID
28 done
29 lvs=`grep "LV Name" /tmp/filit$PPID|grep dev|sed -e 's:.*/dev:/dev:'|sort -u`
30 echo "||||||||||||||||| LOGICAL VOLUMES ||||||||||||||||||||||||||||||||||||||||||" >> /tmp/filit$PPID
31 for v in $lvs
32 do
33 echo LV $v >> /tmp/filit$PPID
34 echo "-------------------------------------------------------------------------------" >> /tmp/filit$PPID
35 lvdisplay -v $v 2>&1|grep -v current|
36 grep -v "LE PV1"|
37 grep -v "Logical extents" >> /tmp/filit$PPID
38 echo " " >> /tmp/filit$PPID
39 echo " ============================ " >> /tmp/filit$PPID
40 done
41 cat /tmp/filit$PPID|grep -v " 0"
42 rm /tmp/filit$PPID
43 echo ===============================SOFTWARE=========================================
44 swlist -l product|grep -v "#"
Steve Steel
If you want truly to understand something, try to change it. (Kurt Lewin)
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Events and news
Customer resources
© Copyright 2025 Hewlett Packard Enterprise Development LP