Peter Warasin wrote:
> Mike Tremaine wrote:
>> Under raid this returns 9 0 where 9 is in fact the md devices but there is 
>> no 0 
>> so nothing gets used.
> 
> hmm. i have a 0, interesting. probably it depends on how the raid has
> been built.
> i think i will total up all md* devices, so i am on the safe side to
> gather all, since people use to have also ide drives which have 3 as
> major number :)
> 
> people which use their firewall as nas, which i hope are very few,
> should then not be surprised about their graphs, lol
> 
> peter
> 


If you have a /dev/md0 then I'd expect you to have a zero but I don't know if 
that is going to give you total disk usage in the same way that /dev/hda or 
/dev/hdb

Here are some of my examples

#Example 1 -
[EMAIL PROTECTED] ~]$ df
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/md2              56940972  19679400  34369076  37% /
/dev/md0                101018     18999     76803  20% /boot
none                    509768         0    509768   0% /dev/shm


    3    0 hda 38970433 9541386 2224302607 380750626 33254654 54828055 
705102684 1828428779 0 154074279 2209339536
    3    1 hda1 554 1214 8655 17316
    3    2 hda2 5385575 43080995 1447759 11582072
    3    3 hda3 43127593 2181218718 80517236 644137888
   22    0 hdc 35059178 8781941 1954715857 391226598 33251018 54831764 
705102684 1831914197 0 162731527 2223301251
   22    1 hdc1 255 670 8655 17316
   22    2 hdc2 5351176 42807595 1447759 11582072
   22    3 hdc3 38491459 1911906344 80517236 644137888
    9    0 md0 227 0 720 0 8655 0 17316 0 0 0 0
    9    2 md2 81618662 0 4093124282 0 80517236 0 644137888 0 0 0 0
    9    1 md1 10735977 0 85887816 0 1447759 0 11582072 0 0 0 0


[md1 would be swap]

#Example 2 -

[EMAIL PROTECTED] ~]$ df
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/md0              56775996  32698764  21146580  61% /
none                    387824         0    387824   0% /dev/shm

    3    0 hda 10033 1112 337742 62670 25295 54053 634968 171013 0 51784 233683
    3    1 hda1 11024 336766 73597 588776
   33    0 hde 10929 958 391704 103651 25227 54122 634968 302763 0 70823 406414
   33    1 hde1 11765 390728 73597 588776
   22    0 hdc 0 0 0 0 0 0 0 0 0 0 0
    9    0 md0 22655 0 727226 0 73597 0 588776 0 0 0 0

[In this case swap is a file on md0 - long story ;)]

#Example 3 -

And finally here is an actual Endian box...



    3    0 hda 0 0 0 0 0 0 0 0 0 0 0
    8    0 sda 72780 3449 1487960 733881 10441390 23594608 272601538 70498442 0 
6782590 71244304
    8    1 sda1 24 1132 2 10
    8    2 sda2 16 128 58 464
    8    3 sda3 7822 193914 714227 5713816
    8    4 sda4 68362 1292746 31323018 250584144
    8   16 sdb 72543 3605 1512880 725260 10560371 23476851 272601538 68732896 0 
6516084 69470330
    8   17 sdb1 38 584 2 10
    8   18 sdb2 41 328 58 464
    8   19 sdb3 6999 170624 714227 5713816
    8   20 sdb4 69066 1341304 31323017 250584136

[EMAIL PROTECTED]:/usr/local/bin # df
Filesystem           1K-blocks      Used Available Use% Mounted on
rootfs                51088492    334756  48158440   1% /
none                   1038052       200   1037852   1% /dev
/dev/root             51088492    334756  48158440   1% /
none                   1038052       200   1037852   1% /dev
/dev/md1                 15429      6535      8098  45% /boot
/dev/md4             102167008   1626200  95351016   2% /var

    9    1 md1 62 0 1716 0 2 0 10 0 0 0 0
    9    4 md4 137428 0 2634050 0 31323018 0 250584144 0 0 0 0
    9    3 md3 14821 0 364538 0 714227 0 5713816 0 0 0 0
    9    2 md2 57 0 456 0 58 0 464 0 0 0 0


#####My kludge a few days ago when I noticed the problem DO NOT DO THIS!!!!

[EMAIL PROTECTED]:/usr/local/bin # diff makegraphs makegraphs.bak
306,307c306
<       #my $major = $rdev >> 8;
<       my $major = 8;
---
 >       my $major = $rdev >> 8;
309d307
<       my $sec_minor = 16;
318,329c316,327
<                 if ($temp[1] eq $major and ($temp[2] eq $minor or $temp[2] eq 
$sec_minor)) {
<                                         $readscompleted  += $temp[4];
<                                         $readsmerged     += $temp[5];
<                                         $reads           += $temp[6];
<                                         $readsect        += $temp[7];
<                                         $writecompleted  += $temp[8];
<                                         $writescompleted += $temp[9];
<                                         $writess         += $temp[10];
<                                         $writesect       += $temp[11];
<                                         $writereq        += $temp[12];
<                                         $writereqtime    += $temp[13];
<                                         $time            += $temp[14];
---
 >                 if ($temp[1] eq $major and $temp[2] eq $minor) {
 >                                         $readscompleted  = $temp[4];
 >                                         $readsmerged     = $temp[5];
 >                                         $reads           = $temp[6];
 >                                         $readsect        = $temp[7];
 >                                         $writecompleted  = $temp[8];
 >                                         $writescompleted = $temp[9];
 >                                         $writess         = $temp[10];
 >                                         $writesect       = $temp[11];
 >                                         $writereq        = $temp[12];
 >                                         $writereqtime    = $temp[13];
 >                                         $time            = $temp[14];


Yes it gives results but I have not verified they are meaningful...... ;0

-Mike


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Efw-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/efw-user

Reply via email to