| 34 |
|
while((getmntent(f, &mp)) == 0){ |
| 35 |
|
if ((statvfs(mp.mnt_mountp, &df)) !=0){ |
| 36 |
|
errf("Failed to gets fs stats (%m)"); |
| 37 |
< |
die(); |
| 37 |
> |
continue; |
| 38 |
|
} |
| 39 |
+ |
|
| 40 |
+ |
if((((strcmp(mp.mnt_fstype,"ufs"))==0) || (strcmp(mp.mnt_fstype,"tmpfs")) ==0)){ |
| 41 |
|
|
| 42 |
< |
printf("packet.disk.p%d.attributes.mount %s\n", counter, mp.mnt_mountp); |
| 43 |
< |
printf("packet.disk.p%d.attributes.name %s\n", counter, mp.mnt_special); |
| 44 |
< |
printf("packet.disk.p%d.attributes.kbytes %lu\n",counter, ((df.f_frsize/1024) * df.f_blocks)); |
| 45 |
< |
printf("packet.disk.p%d.attributes.used %lu\n",counter, (((df.f_frsize/1024) * df.f_blocks) -((df.f_frsize/1024) * df.f_bfree))); |
| 46 |
< |
printf("packet.disk.p%d.attributes.avail %lu\n",counter, (df.f_frsize/1024) * df.f_bavail); |
| 47 |
< |
printf("packet.disk.p%d.attributes.totalinodes %lu\n", counter, df.f_files); |
| 48 |
< |
printf("packet.disk.p%d.attributes.freeinodes %lu\n",counter, df.f_ffree); |
| 42 |
> |
printf("packet.disk.p%d.attributes.mount %s\n", counter, mp.mnt_mountp); |
| 43 |
> |
printf("packet.disk.p%d.attributes.name %s\n", counter, mp.mnt_special); |
| 44 |
> |
printf("packet.disk.p%d.attributes.kbytes %lu\n",counter, ((df.f_frsize/1024) * df.f_blocks)); |
| 45 |
> |
printf("packet.disk.p%d.attributes.used %lu\n",counter, (((df.f_frsize/1024) * df.f_blocks) -((df.f_frsize/1024) * df.f_bfree))); |
| 46 |
> |
printf("packet.disk.p%d.attributes.avail %lu\n",counter, (df.f_frsize/1024) * df.f_bavail); |
| 47 |
> |
printf("packet.disk.p%d.attributes.totalinodes %lu\n", counter, df.f_files); |
| 48 |
> |
printf("packet.disk.p%d.attributes.freeinodes %lu\n",counter, df.f_ffree); |
| 49 |
|
|
| 50 |
< |
counter++; |
| 50 |
> |
counter++; |
| 51 |
> |
} |
| 52 |
|
} |
| 53 |
|
} |
| 54 |
|
|