06.12.2012 Aufrufe

Technische Dokumentation zum Unix-Verbund ... - Dr. Hubert Feyrer

Technische Dokumentation zum Unix-Verbund ... - Dr. Hubert Feyrer

Technische Dokumentation zum Unix-Verbund ... - Dr. Hubert Feyrer

MEHR ANZEIGEN
WENIGER ANZEIGEN

Erfolgreiche ePaper selbst erstellen

Machen Sie aus Ihren PDF Publikationen ein blätterbares Flipbook mit unserer einzigartigen Google optimierten e-Paper Software.

B.30 Monitoring/monitor 320<br />

#if defined(TEST)<br />

#include <br />

/* Yes, we use gets not fgets. Sue me. */<br />

extern char*gets();<br />

int<br />

main()<br />

{<br />

char p[80];<br />

char text[80];<br />

printf("Wildmat tester. Enter pattern, then strings to test.\n");<br />

printf("A blank line gets prompts for a new pattern; a blank pattern\n");<br />

printf("exits the program.\n");<br />

for ( ; ; ) {<br />

printf("\nEnter pattern: ");<br />

(void)fflush(stdout);<br />

if (gets(p) == NULL || p[0] == '\0')<br />

break;<br />

for ( ; ; ) {<br />

printf("Enter text: ");<br />

(void)fflush(stdout);<br />

if (gets(text) == NULL)<br />

exit(0);<br />

if (text[0] == '\0')<br />

/* Blank line; go back and get a new pattern. */<br />

break;<br />

printf(" %s\n", wildmat(text, p) ? "YES" : "NO");<br />

}<br />

}<br />

exit(0);<br />

/* NOTREACHED */<br />

}<br />

#endif /* defined(TEST) */<br />

B.30 Monitoring/monitor<br />

#!/bin/sh<br />

##########################################################################<br />

# The contents of this file are (c) Copyright 1996 by <strong>Hubert</strong> <strong>Feyrer</strong>.<br />

# Any use of the knowledge stored in this file may not be used outside<br />

# of the Fachhochschule Regensburg without contacting me first.<br />

###########################################################################<br />

PATH=/bin:/soft/bin:$PATH<br />

export PATH<br />

#set -v<br />

#set -x<br />

#echo monitor: start | /usr/ucb/mail -s monitor feyrer<br />

(<br />

#mv /etc/mail/sendmail.cf.BAK /etc/mail/sendmail.cf<br />

#sh /etc/init.d/sendmail stop<br />

#sh /etc/init.d/sendmail start<br />

cd /home3/bedienst/feyrer/work/SysOp/Monitoring<br />

./launcher.pl<br />

# echo monitor: launcher done | /usr/ucb/mail -s monitor feyrer<br />

#sleep 300<br />

(c) 1996-2003 <strong>Hubert</strong> <strong>Feyrer</strong> Stand: 21. Oktober 2003

Hurra! Ihre Datei wurde hochgeladen und ist bereit für die Veröffentlichung.

Erfolgreich gespeichert!

Leider ist etwas schief gelaufen!