Popular recipes tagged "monitor" but not "proc"http://code.activestate.com/recipes/tags/monitor-proc/2014-04-04T15:54:03-07:00ActiveState Code RecipesLog watcher (tail -F *.log) (Python) 2014-04-04T15:54:03-07:00Giampaolo RodolĂ http://code.activestate.com/recipes/users/4178764/http://code.activestate.com/recipes/577968-log-watcher-tail-f-log/ <p style="color: grey"> Python recipe 577968 by <a href="/recipes/users/4178764/">Giampaolo RodolĂ </a> (<a href="/recipes/tags/color/">color</a>, <a href="/recipes/tags/log/">log</a>, <a href="/recipes/tags/logging/">logging</a>, <a href="/recipes/tags/monitor/">monitor</a>, <a href="/recipes/tags/python/">python</a>, <a href="/recipes/tags/rotate/">rotate</a>, <a href="/recipes/tags/rotations/">rotations</a>, <a href="/recipes/tags/tail/">tail</a>). Revision 10. </p> <p>A python class which "watches" a directory and calls a callback(filename, lines) function every time one of the files being watched gets written, in real time.</p> <p>Practically speaking, this can be compared to <em>"tail -F *.log"</em> UNIX command, but instead of having lines printed to stdout a python function gets called.</p> <p>Similarly to tail, it takes care of "watching" new files which are created after initialization and "unwatching" those ones which are removed in the meantime. This means you'll be able to "follow" and support also rotating log files.</p> <p><strong>History</strong></p> <ul> <li>rev5 (2013-04-05): <ul> <li>sizehint parameter</li> </ul></li> <li>rev4 (2013-03-16): <ul> <li>python 3 support (also dropped support for python &lt;= 2.5)</li> <li>windows support</li> <li>unit tests</li> <li>main class can also be used as a context manager</li> </ul></li> <li>rev3 (2012-01-13): initial release</li> </ul> DistCC 'top' (Python) 2013-12-01T11:19:56-08:00Mike 'Fuzzy' Partinhttp://code.activestate.com/recipes/users/4179778/http://code.activestate.com/recipes/577933-distcc-top/ <p style="color: grey"> Python recipe 577933 by <a href="/recipes/users/4179778/">Mike 'Fuzzy' Partin</a> (<a href="/recipes/tags/color/">color</a>, <a href="/recipes/tags/curses/">curses</a>, <a href="/recipes/tags/distcc/">distcc</a>, <a href="/recipes/tags/distributed/">distributed</a>, <a href="/recipes/tags/monitor/">monitor</a>, <a href="/recipes/tags/pack/">pack</a>, <a href="/recipes/tags/struct/">struct</a>, <a href="/recipes/tags/top/">top</a>, <a href="/recipes/tags/unpack/">unpack</a>). Revision 3. </p> <p>A small recipe for a curses based, 'top'-like monitor for DistCC. I know there is already distccmon-text, but I don't like it, and much prefer this sytle of monitoring. Note that I don't keep hosts around in the list like distccmon-gui/gnome. The screen is drawn for exactly what is currently in state. The terminal size is respected at initialization time, however resize events aren't handled. There is color designation of job types.</p> Nagios plugin for monitoring database servers (Python) 2011-08-23T22:12:20-07:00Matt Keranenhttp://code.activestate.com/recipes/users/38288/http://code.activestate.com/recipes/577599-nagios-plugin-for-monitoring-database-servers/ <p style="color: grey"> Python recipe 577599 by <a href="/recipes/users/38288/">Matt Keranen</a> (<a href="/recipes/tags/database/">database</a>, <a href="/recipes/tags/monitor/">monitor</a>, <a href="/recipes/tags/nagios/">nagios</a>). Revision 4. </p> <p>An example implementation of a Nagios script in Python for monitoring database servers via ODBC queries. The example tests contained are for checking the status of MS SQL Server replication and log shipping, but any status check that can be performed by a query can be implemented. This method is not considered a replacement for SNMP monitoring, but to implement custom logic checks.</p> <p>New tests are implemented by adding an @nagios_test decorator, and called by the -t parameter with the function name. Usage text list available tests.</p> "tail -f" with inode monitor (Python) 2010-09-21T07:37:38-07:00Denis Barmenkovhttp://code.activestate.com/recipes/users/57155/http://code.activestate.com/recipes/577398-tail-f-with-inode-monitor/ <p style="color: grey"> Python recipe 577398 by <a href="/recipes/users/57155/">Denis Barmenkov</a> (<a href="/recipes/tags/inode/">inode</a>, <a href="/recipes/tags/monitor/">monitor</a>, <a href="/recipes/tags/tail/">tail</a>). Revision 3. </p> <p>Sometimes tail -f launched for log file miss the point when program recreates log file. Script in this recipe monitors inode changes for specified file and restarts tail if needed.</p> Monitor standby (C++) 2009-05-14T02:23:53-07:00kjahdksadsahd ahdsahdandhttp://code.activestate.com/recipes/users/4170243/http://code.activestate.com/recipes/576752-monitor-standby/ <p style="color: grey"> C++ recipe 576752 by <a href="/recipes/users/4170243/">kjahdksadsahd ahdsahdand</a> (<a href="/recipes/tags/monitor/">monitor</a>, <a href="/recipes/tags/on_off/">on_off</a>). </p> <p>Monitor On/Off</p>