604 |
if( Run.httpdssl) { |
if( Run.httpdssl) { |
605 |
|
|
606 |
printf_ssl_socket(res->ssl, |
printf_ssl_socket(res->ssl, |
607 |
"Device '%s' is accessible\n\t" |
"Device '%s' %s\n\t" |
608 |
"Space: %.1f%% [%.1f MB] Inodes: %.1f%% [%ld objects]\n\t" |
"Space: %.1f%% [%.1f MB] Inodes: %.1f%% [%ld objects]\n\t" |
609 |
"UID: %d GID: %d Permission: %o\n\t" |
"UID: %d GID: %d Permission: %o\n\t" |
610 |
"Monitoring status: %s\n", |
"Monitoring status: %s\n", |
611 |
s->name, |
s->name, |
612 |
|
(s->perm&&s->perm->has_error)? |
613 |
|
"permission error": |
614 |
|
(s->uid&&s->uid->has_error)? |
615 |
|
"UID error": |
616 |
|
(s->gid&&s->gid->has_error)? |
617 |
|
"GID error": |
618 |
|
"is accessible", |
619 |
(float) 100 * (s->devinfo->f_blocks - s->devinfo->f_blocksfreetotal) / |
(float) 100 * (s->devinfo->f_blocks - s->devinfo->f_blocksfreetotal) / |
620 |
s->devinfo->f_blocks, |
s->devinfo->f_blocks, |
621 |
(float) (s->devinfo->f_blocks - s->devinfo->f_blocksfreetotal) / |
(float) (s->devinfo->f_blocks - s->devinfo->f_blocksfreetotal) / |
630 |
} else { |
} else { |
631 |
|
|
632 |
fprintf(out, |
fprintf(out, |
633 |
"Device '%s' is accessible\n\t" |
"Device '%s' %s\n\t" |
634 |
"Space: %.1f%% [%.1f MB] Inodes: %.1f%% [%ld objects]\n\t" |
"Space: %.1f%% [%.1f MB] Inodes: %.1f%% [%ld objects]\n\t" |
635 |
"UID: %d GID: %d Permission: %o\n\t" |
"UID: %d GID: %d Permission: %o\n\t" |
636 |
"Monitoring status: %s\n", |
"Monitoring status: %s\n", |
637 |
s->name, |
s->name, |
638 |
|
(s->perm&&s->perm->has_error)? |
639 |
|
"permission error": |
640 |
|
(s->uid&&s->uid->has_error)? |
641 |
|
"UID error": |
642 |
|
(s->gid&&s->gid->has_error)? |
643 |
|
"GID error": |
644 |
|
"is accessible", |
645 |
(float) 100 * (s->devinfo->f_blocks - s->devinfo->f_blocksfreetotal) / |
(float) 100 * (s->devinfo->f_blocks - s->devinfo->f_blocksfreetotal) / |
646 |
s->devinfo->f_blocks, |
s->devinfo->f_blocks, |
647 |
(float) (s->devinfo->f_blocks - s->devinfo->f_blocksfreetotal) / |
(float) (s->devinfo->f_blocks - s->devinfo->f_blocksfreetotal) / |
656 |
} else { |
} else { |
657 |
if( Run.httpdssl) { |
if( Run.httpdssl) { |
658 |
printf_ssl_socket(res->ssl, |
printf_ssl_socket(res->ssl, |
659 |
"Device '%s' is accessible\n\t" |
"Device '%s' %s\n\t" |
660 |
"Space: %.1f%% [%.1f MB]\n\t" |
"Space: %.1f%% [%.1f MB]\n\t" |
661 |
"UID: %d GID: %d Permission: %o\n\t" |
"UID: %d GID: %d Permission: %o\n\t" |
662 |
"Monitoring status: %s\n", |
"Monitoring status: %s\n", |
663 |
s->name, |
s->name, |
664 |
|
(s->perm&&s->perm->has_error)? |
665 |
|
"permission error": |
666 |
|
(s->uid&&s->uid->has_error)? |
667 |
|
"UID error": |
668 |
|
(s->gid&&s->gid->has_error)? |
669 |
|
"GID error": |
670 |
|
"is accessible", |
671 |
(float) 100 * (s->devinfo->f_blocks - s->devinfo->f_blocksfreetotal) / |
(float) 100 * (s->devinfo->f_blocks - s->devinfo->f_blocksfreetotal) / |
672 |
s->devinfo->f_blocks, |
s->devinfo->f_blocks, |
673 |
(float) (s->devinfo->f_blocks - s->devinfo->f_blocksfreetotal) / |
(float) (s->devinfo->f_blocks - s->devinfo->f_blocksfreetotal) / |
677 |
statusnames[s->do_monitor]); |
statusnames[s->do_monitor]); |
678 |
} else { |
} else { |
679 |
fprintf(out, |
fprintf(out, |
680 |
"Device '%s' is accessible\n\t" |
"Device '%s' %s\n\t" |
681 |
"Space: %.1f%% [%.1f MB]\n\t" |
"Space: %.1f%% [%.1f MB]\n\t" |
682 |
"UID: %d GID: %d Permission: %o\n\t" |
"UID: %d GID: %d Permission: %o\n\t" |
683 |
"Monitoring status: %s\n", |
"Monitoring status: %s\n", |
684 |
s->name, |
s->name, |
685 |
|
(s->perm&&s->perm->has_error)? |
686 |
|
"permission error": |
687 |
|
(s->uid&&s->uid->has_error)? |
688 |
|
"UID error": |
689 |
|
(s->gid&&s->gid->has_error)? |
690 |
|
"GID error": |
691 |
|
"is accessible", |
692 |
(float) 100 * (s->devinfo->f_blocks - s->devinfo->f_blocksfreetotal) / |
(float) 100 * (s->devinfo->f_blocks - s->devinfo->f_blocksfreetotal) / |
693 |
s->devinfo->f_blocks, |
s->devinfo->f_blocks, |
694 |
(float) (s->devinfo->f_blocks - s->devinfo->f_blocksfreetotal) / |
(float) (s->devinfo->f_blocks - s->devinfo->f_blocksfreetotal) / |
723 |
if( Run.httpdssl) { |
if( Run.httpdssl) { |
724 |
|
|
725 |
printf_ssl_socket(res->ssl, |
printf_ssl_socket(res->ssl, |
726 |
"File '%s' exist\n\t" |
"File '%s' %s\n\t" |
727 |
"Size: %luB UID: %d GID: %d Permission: %o\n\t" |
"Size: %luB UID: %d GID: %d Permission: %o\n\t" |
728 |
"Monitoring status: %s\n", |
"Monitoring status: %s\n", |
729 |
s->name, |
s->name, |
730 |
|
(s->perm&&s->perm->has_error)? |
731 |
|
"permission error": |
732 |
|
(s->checksum&&s->checksum->has_error)? |
733 |
|
"checksum error": |
734 |
|
(s->uid&&s->uid->has_error)? |
735 |
|
"UID error": |
736 |
|
(s->gid&&s->gid->has_error)? |
737 |
|
"GID error": |
738 |
|
"exist", |
739 |
(unsigned long)stat_buf.st_size, (int)stat_buf.st_uid, (int)stat_buf.st_gid, |
(unsigned long)stat_buf.st_size, (int)stat_buf.st_uid, (int)stat_buf.st_gid, |
740 |
(int)(stat_buf.st_mode & 07777), |
(int)(stat_buf.st_mode & 07777), |
741 |
statusnames[s->do_monitor]); |
statusnames[s->do_monitor]); |
743 |
} else { |
} else { |
744 |
|
|
745 |
fprintf(out, |
fprintf(out, |
746 |
"File '%s' exist\n\t" |
"File '%s' %s\n\t" |
747 |
"Size: %luB UID: %d GID: %d Permission: %o\n\t" |
"Size: %luB UID: %d GID: %d Permission: %o\n\t" |
748 |
"Monitoring status: %s\n", |
"Monitoring status: %s\n", |
749 |
s->name, |
s->name, |
750 |
|
(s->perm&&s->perm->has_error)? |
751 |
|
"permission error": |
752 |
|
(s->checksum&&s->checksum->has_error)? |
753 |
|
"checksum error": |
754 |
|
(s->uid&&s->uid->has_error)? |
755 |
|
"UID error": |
756 |
|
(s->gid&&s->gid->has_error)? |
757 |
|
"GID error": |
758 |
|
"exist", |
759 |
(unsigned long)stat_buf.st_size, (int)stat_buf.st_uid, |
(unsigned long)stat_buf.st_size, (int)stat_buf.st_uid, |
760 |
(int)stat_buf.st_gid, (int)(stat_buf.st_mode & 07777), |
(int)stat_buf.st_gid, (int)(stat_buf.st_mode & 07777), |
761 |
statusnames[s->do_monitor]); |
statusnames[s->do_monitor]); |
778 |
if( Run.httpdssl) { |
if( Run.httpdssl) { |
779 |
|
|
780 |
printf_ssl_socket(res->ssl, |
printf_ssl_socket(res->ssl, |
781 |
"Directory '%s' exist\n\t" |
"Directory '%s' %s\n\t" |
782 |
"UID: %d GID: %d Permission: %o\n\t" |
"UID: %d GID: %d Permission: %o\n\t" |
783 |
"Monitoring status: %s\n", |
"Monitoring status: %s\n", |
784 |
s->name, (int)stat_buf.st_uid, |
s->name, |
785 |
|
(s->perm&&s->perm->has_error)? |
786 |
|
"permission error": |
787 |
|
(s->uid&&s->uid->has_error)? |
788 |
|
"UID error": |
789 |
|
(s->gid&&s->gid->has_error)? |
790 |
|
"GID error": |
791 |
|
"exist", |
792 |
|
(int)stat_buf.st_uid, |
793 |
(int)stat_buf.st_gid, (int)(stat_buf.st_mode & 07777), |
(int)stat_buf.st_gid, (int)(stat_buf.st_mode & 07777), |
794 |
statusnames[s->do_monitor]); |
statusnames[s->do_monitor]); |
795 |
} else { |
} else { |
796 |
fprintf(out, |
fprintf(out, |
797 |
"Directory '%s' exist\n\t" |
"Directory '%s' %s\n\t" |
798 |
"UID: %d GID: %d Permission: %o\n\t" |
"UID: %d GID: %d Permission: %o\n\t" |
799 |
"Monitoring status: %s\n", |
"Monitoring status: %s\n", |
800 |
s->name, (int)stat_buf.st_uid, |
s->name, |
801 |
|
(s->perm&&s->perm->has_error)? |
802 |
|
"permission error": |
803 |
|
(s->uid&&s->uid->has_error)? |
804 |
|
"UID error": |
805 |
|
(s->gid&&s->gid->has_error)? |
806 |
|
"GID error": |
807 |
|
"exist", |
808 |
|
(int)stat_buf.st_uid, |
809 |
(int)stat_buf.st_gid, (int)(stat_buf.st_mode & 07777), |
(int)stat_buf.st_gid, (int)(stat_buf.st_mode & 07777), |
810 |
statusnames[s->do_monitor]); |
statusnames[s->do_monitor]); |
811 |
} |
} |