Find the answer to your Linux question:
Page 1 of 2 1 2 LastLast
Results 1 to 10 of 14
Hi Guys ^^ i have installed a SNMP agent to monitoring all my server in my office, including the Harddisk capacity. one of my servers is Redhat, which is i ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jul 2011
    Posts
    29

    Harddisk Capacity


    Hi Guys ^^

    i have installed a SNMP agent to monitoring all my server in my office, including the Harddisk capacity. one of my servers is Redhat, which is i got some confusing condition when i compared the harddisk capacity between my SNMP agent and the physical harddisk (i'm using df -h -a command)

    in my SNMP agent showed me that the capacity is 187 GB, but when i check to server remotely and i type df -h -a command, it showed me below output :

    Filesystem Size Used Avail Use% Mounted on
    /dev/sda1 9.5G 7.0G 2.1G 78% /
    proc 0 0 0 - /proc
    sysfs 0 0 0 - /sys
    devpts 0 0 0 - /dev/pts
    tmpfs 1006M 0 1006M 0% /dev/shm
    /dev/sda2 49G 5.3G 41G 12% /webapps
    none 0 0 0 - /proc/sys/fs/binfmt_misc

    and if i added all the size it doesnt match with the capacity on SNMP agent

    my question is, which one is true, whether the SNMP agent or df -a -h Command ?

    need your help guys,
    and Thanks

  2. #2
    Super Moderator Roxoff's Avatar
    Join Date
    Aug 2005
    Location
    Nottingham, England
    Posts
    3,844
    You put this post on the end of an old thread - I only found it by accident. You should always open a new thread rather than jump on someone else's, it makes it much easier for the volunteers here to answer the question you're asking.

    Anyway, have you tried doing 'df -h -H', the -H means to use 1000 instead of 1024 for reported sizes. It may also be that, as you're using the '-h' for 'human readable' that there is a bit of rounding going on.
    Linux user #126863 - see http://linuxcounter.net/

  3. #3
    Trusted Penguin
    Join Date
    May 2011
    Posts
    4,353
    also, check out the output of
    Code:
    fdisk -l /dev/sda
    (run as root). The first line should show you the disk capacity, irregardless of filesystem overhead, etc.

    This command will also show you the output, in MB:
    Code:
    echo "($(cat /sys/block/sda/size)*512)"/1048576|bc -l
    (assuming the block size is 512)

  4. #4
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
    Posts
    11,380
    Have you looked into Nagios for monitoring your servers and systems?
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

  5. #5
    Just Joined!
    Join Date
    Jul 2011
    Posts
    29
    [QUOTE=atreyu;866588]also, check out the output of
    Code:
    fdisk -l /dev/sda
    (run as root). The first line should show you the disk capacity, irregardless of filesystem overhead, etc.

    i have tried the command and showed me this output :

    Disk /dev/sda: 200.0 GB, 200049647616 bytes
    255 heads, 63 sectors/track, 24321 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes

    Device Boot Start End Blocks Id System
    /dev/sda1 * 1 1275 10241406 83 Linux
    /dev/sda2 1276 7802 52428127+ 83 Linux
    /dev/sda3 7803 8318 4144770 82 Linux swap / Solaris
    /dev/sda4 8319 24321 128544097+ 5 Extended

    could you guys help me to read those output ??couse i'm a newbe in the Linux environment

  6. #6
    Administrator jayd512's Avatar
    Join Date
    Feb 2008
    Location
    Kentucky
    Posts
    5,023
    Quote Originally Posted by bram88 View Post
    Disk /dev/sda: 200.0 GB, 200049647616 bytes
    255 heads, 63 sectors/track, 24321 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes

    Device Boot Start End Blocks Id System
    /dev/sda1 * 1 1275 10241406 83 Linux
    /dev/sda2 1276 7802 52428127+ 83 Linux
    /dev/sda3 7803 8318 4144770 82 Linux swap / Solaris
    /dev/sda4 8319 24321 128544097+ 5 Extended
    It's reporting that this is a 200 GB disk.
    Around 4 GB of Swap.
    sda1 is approx 10 GB.
    sda2 is approx 50 GB.
    sda4 is about 125 GB.

    So everything seems to be in order.
    Jay

    New users, read this first.
    New Member FAQ
    Registered Linux User #463940
    I do not respond to private messages asking for Linux help. Please keep it on the public boards.

  7. #7
    Just Joined!
    Join Date
    Jul 2011
    Posts
    29
    so thats meant the disk have 4 partition right?

  8. #8
    Linux Engineer rcgreen's Avatar
    Join Date
    May 2006
    Location
    the hills
    Posts
    1,134
    The fourth partition is extended but contains no logical
    partitions, so it looks like it is unused.

  9. #9
    Just Joined!
    Join Date
    Jul 2011
    Posts
    29
    Quote Originally Posted by rcgreen View Post
    The fourth partition is extended but contains no logical
    partitions, so it looks like it is unused.
    what is the meaning of extended exactly? and if that partition is unused why the size is to big?

    by the way i want to inform you guys this server is not belong to me its my client property and i have a task to maintenance it
    ^^

  10. #10
    Trusted Penguin
    Join Date
    May 2011
    Posts
    4,353
    An extended partition can have logical partitions defined within its boundaries, but it itself is not a partition per se. At least not one that you can format and mount.

    The fact that it is big (relatively) and that it is unused are unrelated. If you wanted to access more unused hard drive space, then you could create a logical partition (e.g. /dev/sda5) within the extended partition. You could make it the entire size of the extended partition, or some subset of it. Then you could format it (with ext3, e.g.) and mount it (to /data, e.g.).

Page 1 of 2 1 2 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •