118 |
<ul> |
<ul> |
119 |
<LI><A HREF="#coresol">Watch and analyze crashdumps (Solaris)</A></LI> |
<LI><A HREF="#coresol">Watch and analyze crashdumps (Solaris)</A></LI> |
120 |
<LI><A HREF="#corelin">Watch and analyze crashdumps (Linux)</A></LI> |
<LI><A HREF="#corelin">Watch and analyze crashdumps (Linux)</A></LI> |
121 |
|
<LI><A HREF="#tcpdump">Start and stop tcpdump based on condition</A></LI> |
122 |
</ul> |
</ul> |
123 |
</li> |
</li> |
124 |
</ul> |
</ul> |
1087 |
</pre> |
</pre> |
1088 |
|
|
1089 |
|
|
1090 |
|
<h3><a name="tcpdump">Start and stop tcpdump based on network outage</a></h3> |
1091 |
|
As soon as the remote SMTP service of host bar is not available tcpdump is started. |
1092 |
|
When the connection is available again, tcpdump is stopped. Monit is running as |
1093 |
|
non-privileged user so sudo was used to provide tcpdump capability. Only first |
1094 |
|
ocurrence is catched (noexec flag is created to prevent another outage monitoring). |
1095 |
|
<pre> |
1096 |
|
check host bar with address 10.1.1.2 |
1097 |
|
if failed port 25 protocol smtp then exec "/bin/bash -c 'if [ ! -f /tmp/noexec ]; then touch /tmp/noexec; sudo tcpdump -w /tmp/foo_bar.dump host bar; fi'" else if recovered then exec "sudo killall tcpdump" |
1098 |
|
</pre> |
1099 |
|
|
1100 |
|
|
1101 |
<?php include '../include/footer.html'; ?> |
<?php include '../include/footer.html'; ?> |