Script for a quick overview of information about hard drives

    I decided to share a small PHP script with the habrasociety, which saves me a little time.

    The essence of the problem


    At home, there is a server that is connected to a small local area network and, in combination, works as an exchanger. It clogs up with all sorts of rubbish instantly and periodically it is necessary to move and throw away “furniture”.

    Script description


    The script generates a list of all hard drives and their partitions. For each partition, a mount point, free disk space in percent and the total capacity of the partition are allocated. Later I added a display of the current temperature of the hard disk using the hddtemp package , as it turned out it helps a lot in determining the cooling efficiency.



    Positive points
    • Ease of presentation - all on one page
    • No need to configure anything (unless sudo)
    • Accessibility from any device with access to the network in which the script works
    • No need to go into ssh to view the entire system
    • Compact script size and low resource requirements
    • Free space information is always fresh.

    Negative points
    • Not everyone is comfortable running a browser.
    • There is no caching and every page refresh pulls the system.


    System requirements


    • Linux
    • Php
    • hddtemp (requires sudo configured as well)


    What does it look like





    Download (ifolder)


    Download (rapidshare)



    P.S. Many thanks to DileSoft , for the plus in karma thanks to which I was able to publish my first topic, I hope it will be useful to someone.

    UPD Soon there will be a free minute to finish the schedules so that you can monitor temperature fluctuations and free space on disks, in general, if there are interesting ideas for finalizing the script, I will be glad to hear and take into account.

    Also popular now: