[TriLUG] RHEL disks
Joseph Mack NA3T
jmack at wm7d.net
Mon May 4 20:06:35 EDT 2009
On Mon, 4 May 2009, stan briggs wrote:
> all,
>
> i trying to programatically gather information on the disks that are
> installed on two different platforms. the solaris side i can handle
> but the RHEL side i can't quite get to. things like 'fdisk -l' and the
> contents of /proc/partitions give me details that i don't need. i just
> want to list the disks (and their sizes, hopefully) that are currently
> connected to the server.
# grep "[sh]da " /proc/partitions | awk '{printf "disk %s size=%d\n", $4, $3}'
disk sda size=1465138584
disk hda size=244198584
Joe
--
Joseph Mack NA3T EME(B,D), FM05lw North Carolina
jmack (at) wm7d (dot) net - azimuthal equidistant map
generator at http://www.wm7d.net/azproj.shtml
Homepage http://www.austintek.com/ It's GNU/Linux!
More information about the TriLUG
mailing list