Source
 
This code is released under the Attribution license (details below).

Please send enhancements or bug-reports/fixes to:     support@classicalsoftware.com
or use:     the Support page.

 
Cocoa contains Objective-C classes for use in Mac OS X programs.

syswatch  is a collection of scripts (run by cron) that monitor various [UNIX] system aspects.
Although fairly simple in concept they've proved surprisingly effective in practice, catching common problems and allowing one person to maintain a number of servers. Each reports via email.

 
Cocoa 22 K
cs_Error General error class.
cs_IntDictionary Similar to NSDictionary but using integer keys instead of objects:
id a = [d objectForIntKey: 3];
cs_NSString_Additions Extended functionality and convenience methods for NSString.
cs_UniqueNameManager Maintains unique names for items in a collection:
@"page 1", @"page 2", @"footnotes page"
cs_Utils Miscellaneous utilities.
 
syswatch 26 K
chk_disk_use Warn if any disks are 90%+ full.
chk_for_stale_POP_locks Move stale POP lock files out of the way.
chk_is_named_running Check for named process, try to restart it if it's not running.
chk_processes Warn if any unknown processes are currently running.
chk_syslog_msgs Scan system message log for todays errors.
extract_mail_stats Extract sendmail stats from syslog file, saving result.
gen_mail_report Actually produce a report
list_mailbox Nice list of messages in mbox
packet_count Collects network traffic statistics [uses netstat]
packet_report Daily graph of network traffic
report_mail_traffic Generate and send a report from the extracted mail data.
 
Utilities 7 K
datestring.pl OS-independent sprintf for dates and times:
"%yesterday%M %0D, %Y" => "May 03, 2004"
short_hostname Print out just the "base" of the hostname
sw_common.pl Commonly used fcns ( send_email_msg , is_arg() , pad_str() , etc) and variables ($SW_CONFIG, $GET_DATE, etc)
sw_common.sh Common fcns and vars for shell scripts

 
License details
 

Creative Commons
543 Howard Street
5th Floor
San Francisco
CA, USA
94105-3013

This source code is Copyright © 2005 by Matt Covey. Some rights reserved.

It is licensed under the Creative Commons Attribution License, version 2.0.
You can request a written copy of the License by writing to the address on the left.

A summary of the Legal Code [the full license], which is not itself a legal document,
says you are free to:

  • copy, distribute, display, and execute the work, either in source or binary form
  • make derivative works
  • make commercial use of the work

Under the following conditions:

  • Attribution. You must give the original author credit.
  • For any reuse or distribution, you must make clear to others the license terms of this work.
  • Any of these conditions can be waived if you get permission from the copyright holder.
  • Your fair use and other rights are in no way affected by the above.

I suggest that published products (i.e., commercial, shareware or freeware) should say something like the following in the "About Box" or its equivalent:

<source code> by Matt Covey, Classical Software
http://www.classicalsoftware.com/

A copy of the software itself would also be appreciated, and/or an e-mail telling me where you used the source code.

 

Home | Programs | Code | Articles | Other | Support | About | Site Map