multi drive view

Webmin
Rob Ghost
2014-03-12
2014-03-15
  • Rob Ghost
    Rob Ghost
    2014-03-12

    I currently use Webmin on a pogoplug running Arch Linux and have 2 drives connected, I would like to know how i can view both drives on the System Information screen? would this be a mod or something else?

    Fig.1
    http://www.robghost.com/plex/Fig1.png

     
    Last edit: Rob Ghost 2014-03-12
    • hansaplast
      hansaplast
      2014-03-12

      My guess.

      Only the root '/' drive statistics are shown in Webmin.

       
      Last edit: hansaplast 2014-03-12
  • Rob Ghost
    Rob Ghost
    2014-03-13

    yes it seems that is whats happening, but i would like to know if there is a way to show the additional attached drives. Any thoughts?

     
  • hansaplast
    hansaplast
    2014-03-13

    Sure. Edit:
    /usr/libexec/webmin/blue-theme/right.cgi (near line: 157)
    /usr/libexec/webmin/gray-theme/right.cgi (near line: 200)

    Then add the extra information.
    Beware that this file is overwritten during updates.

     
    • Rob Ghost
      Rob Ghost
      2014-03-14

      I'm not sure what i should be editing (blue-theme/right.cgi, at line 157-167

       
  • hansaplast
    hansaplast
    2014-03-14

    I guess you're not comfortable with Perl.

    My Perl skills aren't sufficient to come up with some code quickly. Maybe if I point you in the right direction you can figure it out for yourself.

    in /blue-theme/right.cgi near line 157 there is a line: # Disk space on local drives
    Before the if construction do something like this.

    # Disk space on local drives
    get output of command 'df -h' into some var 'filesystems'
    for each filesystem in filesystems do
        if ($filesystem->{'disk_total'}) {
                ($total, $free) = ($filesystem->{'disk_total'}, $filesystem->{'disk_free'});
                print "<tr> <td><b>$filesystem->{'disk_name'}</b></td>\n";
                print "<td>",&text('right_used',
                           &nice_size($total),
                           &nice_size($total-$free)),"</td> </tr>\n";
                print "<tr> <td></td>\n";
                print "<td>",&bar_chart($total, $total-$free, 1),
                      "</td> </tr>\n";
                }
    done
    

    Good luck!

     
  • gus gando
    gus gando
    2014-03-15

    Post awaiting moderation.